Authentication and Authorization

The Oracle Communications Unified Inventory Management (UIM) REST API uses HTTP Basic authentication, which requires a base64-encoded value of a UIM user's ID and password to authenticate requests.

To set up your requests for Basic authentication:

  1. Generate a base64-encoded value of a UIM user's ID and password joined by a single colon (ID:password). For information about creating a UIM user, see "Task 2: Create a User".

    For example, if the ID is Aladdin and the password is OpenSesame, the base64-encoding of Aladdin:OpenSesame would be QWxhZGRpbjpPcGVuU2VzYW1l.

  2. Pass the base64-encoded value in the header of every REST request sent to UIM REST API services.

    For example, to run a GET request for a logical device:

    curl -X GET http://hostname:port/Inventory/RSOpenAPI/resourceInventoryManagement/version/logicalDevice/1-11111 -H Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l

    where:

    • hostname is the URL for the UIM server.

    • port is the port for the Oracle Communications UIM server.
    • version is the version of the API you're using, such as v1. See Versioning.

Set Up Requests for OAuth 2.0 Bearer-Token Authentication

A REST client sends one authentication header per request. Use either Basic authentication credentials or an OAuth 2.0 bearer token in a request, but not both. Use HTTPS for all requests. Verify existing Basic clients after enabling OAuth to confirm the intended coexistence behavior.

To set up requests for OAuth 2.0 bearer-token authentication:

  1. Enable OAuth 2.0 authentication by setting the following property:
    oauth.enabled=true
  2. Configure the existing OAuth 2.0 properties for your identity provider. Configure the UIM REST API OAuth 2.0 properties to identify the username claim and the role or group claim in the access token.

    The access token must contain the group specified by the existing uim-users group requirement. If oauth.audience is configured, the access token must also contain the configured audience value.

    Configure any excluded paths that do not require OAuth 2.0 authentication.

  3. Send an access token in the Authorization header of each REST request:
    Authorization: Bearer access_token