4.4 OAuth2

OAuth2 is an authorization framework that grants restricted access to the protected resource. In this framework, the client delegates authentication to an authorization server and obtains the access token to grant access to an application or a web service. The client can be web applications, mobile phones, hand-held devices, and desktop applications.

While using the OAuth2 framework, the OAuth server validates users and grants access to the corresponding account of Privileged Account Manager. Here, Privileged Account Manager serves as the OAuth2 client.

In order for OAuth 2.0 to be used, the Client must first obtain its own credentials from the Authorization Server, a client id and client secret, in order to identify and authenticate itself when requesting an Access Token.The Client, such as a smartphone app, website, smart TV app, desktop programme, etc., initiates access requests using OAuth 2.0. This is the usual flow for the token request, exchange, and response:The Client submits an authorization request (authorization request) to the Authorization server along with the client id, client secret, scopes, and an endpoint URI (redirect URI) to which the Access Token or the Authorization Code should be sent.The Authorization server validates the Client's identity and confirms that the requested scopes are legal.

4.4.1 OAuth2 Roles

OAuth2 consists of the following four roles:

  • Resource Owner: A system or a person (end-user) who owns the resource and grants access to it.

  • Resource Server: A server that hosts the protected resources. It accepts and validates requests from the Client to grant access to the resource.

  • Client: An application that requests and gets authorization on behalf of the resource owner to access the protected resource. For example, Privileged Account Manager.

  • Authorization Server: A server that provides access tokens to the Client after validating the resource owner and obtaining authorization. For example, Advanced Authentication server.

The following diagram describes the flow of authorization:

Figure 4-1 Flow of Authorization Code

When a resource owner wants to access the client website or application, the following steps describe the flow of authorization code:

  1. PAM initiates the flow and directs the user agent of the resource owner to the authorization server. PAM includes its client identifier, requested scope, local state, and a redirection URI.

  2. The authorization server authenticates the resource owner through the user agent and recognizes whether the resource owner grants or denies the access request.

  3. If the resource owner grants access, PAM uses the redirection URI provided earlier to redirect the user agent back to the corresponding account or resource. The redirection URI includes an authorization code and any local state previously provided by PAM.

  4. PAM requests an access token from the authorization server through the token endpoint. Then PAM authenticates with its client credentials and includes the authorization code received in the previous step. PAM also includes the redirection URI used to obtain the authorization code for verification.

  5. The authorization server validates the client credentials and the authorization code. The server also ensures that the redirection URI received matches the URI used to redirect the client in Step 3. If valid, the authorization server responds back with an access token.

4.4.2 OAuth2 Server Settings

To integrate Privileged Account Manager with OAuth2 server, it is necessary to configure the authorization server details in Privileged Account Manager. You can fetch the OSP OAuth server cfg using the API: \ncurl --insecure https://10.71.16.158/osp/a/TOP/auth/oauth2/.well-known/oauth-authorization-server

NOTE:Privileged Account Manager 4.2 supports only the Advanced Authentication server as the OAuth2 server. In the upcoming releases, support will extend for other authorization servers. Also, PAM can leverage Risk Service configured in Advanced Authentication.

NOTE:You can obtain the following details while configuring the OAuth2 authorization server.

To configure the authorization server details, perform the following:

  1. Click Settings > External Services > OAuth2 Server on the Privileged Account Manager console.

  2. Specify the following details:

    Field

    Details

    Client Configuration

    Client ID

    A unique ID that is generated when you configure the authorization server.

    Client Secret

    A unique value that is generated when you configure the authorization server. This value is shared between the OAuth client (Privileged Account Manager) and the authorization server.

    Select Edit Secret to edit the Client Secret post integration with the authorization server.

    Server Endpoints

    OAuth2 Authorization

    Login URL of the authorization server to prompt the users for authentication and directs to the Redirect URL. Login URL must be specified in the following format:

    https://<authorization server ip address>/osp/a/TOP/auth/oauth2/grant

    OAuth2 Token URL

    Token URL that the client uses to initiate the request. This token is issued by the authorization server. Token URL must be specified in the following format:

    https://<authorization server ip address>/osp/a/TOP/auth/oauth2/token

    OAuth2 User Info URL

    : An endpoint from where you can retrieve the user information after authentication. User info URL must be specified in the following format:

    https://<authorization server ip address>/osp/a/TOP/auth/oauth2/userinfo

    OAuth2 Logout URL

    URL that logs the user out of authentication session. Logout URL must be specified in the following format:

    https://<authorization server ip address>/osp/a/TOP/auth/oauth2/logout

    Enforce OAuth for Web Authentication

    The OAuth authentication framework is applied for web-based applications by default. With this option disabled, the administrator allows users to the web console login by other external authentication that is configured, such as LDAP, RADIUS, and so on. Users can log in with the URL https://<privilege-account-manager-ipaddress>/pam.

    NOTE:This option does not apply to local users, ssh relay, and credential providers.

    Retrieve authorization attributes from LDAP Server

    By default, this option gathers the authorization attributes, such as email address, groups with which the user is associated, and so on, from LDAP Server post-authentication. Some attributes are essential in access control, like group DN that verifies the user's group before granting the access.

     

     

  3. Save the configuration.

4.4.3 Integrating with NetIQ Advanced Authentication and Risk Service Using the OAuth2 Settings

Using the OAuth2 framework, you can integrate NetIQ Advanced Authentication with Privileged Account Manager to use multi-factor authentication and utilize Risk Service capabilities. Advanced Authentication delivers various authentication mechanisms that enable identity assurance in addition to typical username and password-based authentication. Risk Service evaluates the contextual information associated with an access attempt, detects unknown risks, and takes necessary action based on the defined rules.

The Risk Service allows you to accomplish the following:

  • Prevent fraudulent access to a web application or network and improve its security.

  • Determine the level of risk based on several criteria and user behavior patterns (for example, browser type, time of login).

  • Enhance the user experience. Users are only required to give additional information for authentication when the associated risk is high.

The Risk Service also facilitates in detecting different malicious activities listed in Integrating with ArcSight Intelligence.

To integrate Privilege Account Manager with Advanced Authentication, perform the following tasks:

Prerequisite

Ensure that Advanced Authentication 6.3.5.1 and later versions with the supported version of Risk Service are installed and configured.

For information about how to install Advanced Authentication, see Advanced Authentication Server Installation and Upgrade Guide.

For information about how to configure Advanced Authentication, see Advanced Authentication Administration Guide.

Configuring the Advanced Authentication OAuth 2.0 Event

  1. Open the Advanced Authentication Administration portal.

  2. Click Events > New Event.

  3. Specify a name for the event.

  4. Select OAuth2 from Event type.

  5. Select the required chains to assign to the event.

  6. In Risk Policy, select the policy that you want to assign to this event for assessing the risk associated with a login attempt.

  7. Click Create New Policy to create a new risk policy for this event.

    Clicking this option opens the Risk Settings page.

    IMPORTANT:Risk Policy and Create New Policy options are available when you enable Risk Settings. For more information, see Risk Settings and Risk Policy.

  8. In Redirect URIs, specify https://<privilege-account-manager-ipaddress>/sso. After successful authentication, users are directed to this URL.

    If there are multiple PAM managers, you can specify all URLs as the Redirect URI. So, users can access the preferred instance of PAM.

    For example, if there two PAM managers https://www.pam-abc.com/sso and https://pam-123/sso, specify both the URLs in Redirect URIs.

    NOTE:The Client ID and Client secret are generated automatically. You cannot view the Client secret later, therefore you must make a note of this value as these are required to complete the configuration in Privileged Account Manager.

  9. Click Save.

Configuring the OAuth2 Server Settings in Privileged Account Manager

  1. Log in to the Privileged Account Manager console.

  2. Navigate to Settings > External Services > OAuth2 Server.

  3. Specify the Client ID and Client Secret that are generated while configuring the OAuth2 event in Advanced Authentication.

  4. Specify login URL of the Advanced Authentication server to direct the users for authentication in OAuth2 Authorization URL.

    NOTE:Privileged Account Manager 4.2 supports the Advanced Authentication server with OSP as the OAuth2 server. Therefore, examples include IP address of AA/OSP. In the upcoming releases, support will extend for other authorization servers.

    For example, https://<ip-address-or-dns-or-advanced-authentication>/osp/a/TOP/auth/oauth2/grant

  5. Specify the token URL that initiates the authentication request in OAuth2 Token URL.

    For example, https://<ip-address-or-dns-or-advanced-authentication>/osp/a/TOP/auth/oauth2/token

  6. Specify the location from where the information of users are retrieved post authentication in OAuth2 User Info URL.

    For example, https://<ip-address-or-dns-or-advanced-authentication>/osp/a/TOP/auth/oauth2/userinfo

  7. Specify the URL to log users out of the authentication session in OAuth2 Logout URL.

    For example, https://<authorization server ip address>/osp/a/TOP/auth/oauth2/logout

  8. Retain default settings for Enforce OAuth for Web Authentication and Retrieve authorization attributes from LDAP Server.

  9. Save the settings.

NOTE:After completing the configurations, you must map the LDAP servers to assign the browsing capability to User roles in Access Control.

NOTE:Use one of the following URLs to authenticate to Privileged Account Manager using the OAuth2 authorization protocol:

  • Old console: https://pam_ip_or_dns/sso?console=legacy

  • New console: https://pam_ip_or_dns/sso/