Step 2. Preparing the authorization server
PingOne Advanced Identity Cloud PingAM
This page prepares PingOne Advanced Identity Cloud or PingAM to accept authorization_details requests and route them through the Remote Consent Service (RCS) you hosted in Step 1. Hosting a Remote Consent Service, and registers the OAuth 2.0 clients that the sample app uses.
Prerequisites
You need the following to prepare the authorization server for RAR and complete the tasks on this page:
-
Either of the following servers:
-
PingAM
-
PingOne Advanced Identity Cloud version 23604.0 or later.
To check your PingOne Advanced Identity Cloud version, sign in to the tenant admin console, open the tenant menu, and go to Tenant Settings > Details. The version appears under Identity Cloud Version.
-
-
The RCS demo app from Step 1. Hosting a Remote Consent Service is running and reachable by using your local IP address.
Task 1. Enabling RAR in the OAuth2 provider service
By default, the OAuth2 Provider service silently ignores the authorization_details request parameter.
Complete the following steps to enable Remote Consent and RAR processing:
-
If you are using PingOne Advanced Identity Cloud, in the administration console, select Native Consoles > Access Management.
-
In the Access Management admin console, select your realm, click Services, and then click OAuth2 Provider.
-
On the Advanced tab, enable Rich Authorization Requests with Remote Consent Service.
-
Click Save Changes.
You must click Save Changes before switching to another tab, otherwise the changes will be lost
-
On the Consent tab, enable Enable Remote Consent.
If the Consent tab is not visible, click the down arrow, and select it from the drop-down menu:
-
Save your changes.
Task 2. Creating the Remote Consent Agent
A Remote Consent Agent tells the authorization server where your RCS is and how to trust its responses.
Complete the following steps to create an agent for the sample RCS:
-
If you are using PingOne Advanced Identity Cloud, in the administration console, select Native Consoles > Access Management.
-
In the Access Management admin console, select the realm you are using.
-
Go to Applications > OAuth 2.0 > Remote Consent.
-
Click Add Remote Consent Agent.
-
In Agent ID, enter
myCustomRCS, and then click Create. -
Configure the agent with these values, replacing
<your-local-ip>with the local IP address of the machine running the sample RCS:Properties Value Why Redirect URL
https://<your-local-ip>:8081/consentThe authorization server redirects the browser here with the consent request JWT.
The local IP address can change if your machine obtains its address with DHCP.
If a RAR flow suddenly fails to reach the sample RCS, confirm the address is still correct, and update the agent values if it has changed.
Enable consent request Encryption
Disabled
The sample RCS parses signed three-part JWTs.
Encrypted five-part JWEs fail with an "Unexpected number of Base64URL parts, must be three" error.
Public key selector
JWKsThe sample RCS runs on a local machine, which the authorization server’s cloud services cannot reach to fetch keys from a URI.
Providing the keys directly means the authorization server does not need to contact the sample RCS to verify consent response signatures.
Json Web Key
The JWK set output by the sample RCS when it starts.
For example:
{"keys":[{"kty":"RSA","n":"...","e":"AQAB","kid":"rcs-demo-signing-key","alg":"RS256","use":"sig"}]}The sample RCS signs consent responses with RS256, and the authorization server verifies the signatures against these keys.
Copy the complete value from the sample RCS console output, from the opening brace to the closing brace.
-
Save your changes.
Wait 30 to 60 seconds after making RCS agent changes before starting a RAR flow.
The server caches agent attributes, and a flow started immediately after saving can fail with the stale values.
Task 3. Configuring an OAuth 2.0 client for authentication
The sample apps perform a standard login that does not use authorization_details, and they authenticate as a separate client for it.
This is because consent handling is a per-client setting: the RAR client must have implied consent disabled, but the standard login should complete without stopping at a consent prompt.
Register the standard client as a public OAuth 2.0 client as follows:
-
PingOne Advanced Identity Cloud
-
PingAM
Public clients do not use a client secret to obtain tokens because they are unable to keep them hidden. The Orchestration SDKs commonly use this type of client to obtain tokens, as they cannot guarantee safekeeping of the client credentials in a browser or on a mobile device.
To register a public OAuth 2.0 client application for use with the SDKs in PingOne Advanced Identity Cloud, follow these steps:
-
Log in to your PingOne Advanced Identity Cloud tenant.
-
In the left panel, click Applications.
-
Click Custom Application.
-
Select OIDC - OpenId Connect as the sign-in method, and then click Next.
-
Select Native / SPA as the application type, and then click Next.
-
In Name, enter a name for the application, such as
Public SDK Client. -
In Owners, select a user that is responsible for maintaining the application, and then click Next.
When trying out the SDKs, you could select the demouser you created previously. -
In Client ID, enter
sdkPublicClient -
Select Configure for SDK Sample Apps.
-
Click Create Application.
PingOne Advanced Identity Cloud creates the application and displays the details screen.
-
On the Sign On tab:
-
In Sign-In URLs, ensure the following values appear, or add them if they don’t:
com.example.demo://oauth2redirectAlso add any other domains where you host SDK applications. -
In Grant Types, ensure the following values appear:
Authorization CodeRefresh Token -
In Scopes, ensure the following values appear:
openid profile email address
-
-
Click Show advanced settings, and on the Authentication tab, confirm the following properties:
-
In Token Endpoint Authentication Method, select
none. -
In Client Type, select
Public. -
Enable the Implied Consent property.
-
-
Click Save.
The application is now configured to accept client connections from and issue OAuth 2.0 tokens to the example applications and tutorials covered by this documentation.
Public clients do not use a client secret to obtain tokens because they are unable to keep them hidden. The Orchestration SDKs commonly use this type of client to obtain tokens, as they cannot guarantee safekeeping of the client credentials in a browser or on a mobile device.
To register a public OAuth 2.0 client application for use with the SDKs in AM, follow these steps:
-
Log in to the PingAM admin UI as an administrator.
-
Navigate to Applications > OAuth 2.0 > Clients, and then click Add Client.
-
In Client ID, enter
sdkPublicClient. -
Leave Client secret empty.
-
In Redirection URIs, enter the following values:
com.example.demo://oauth2redirectAlso add any other domains where you will be hosting SDK applications. -
In Scopes, enter the following values:
openid profile email address -
Click Create.
PingAM creates the new OAuth 2.0 client, and displays the properties for further configuration.
-
On the Core tab:
-
In Client type, select
Public. -
Disable Allow wildcard ports in redirect URIs.
-
Click Save Changes.
-
-
On the Advanced tab:
-
In Grant Types, enter the following values:
Authorization Code Refresh Token -
In Token Endpoint Authentication Method, select
None. -
Enable the Implied consent property.
-
-
Click Save Changes.
Task 4. Configuring an OAuth 2.0 client for RAR
Configure an OAuth 2.0 client on the server that the sample apps use for the RAR flow.
It should be a public client with the authorization code grant, permitted to request your authorization detail types, and routed through the RCS:
-
If you are using PingOne Advanced Identity Cloud, in the administration console, select Native Consoles > Access Management.
-
In the Access Management admin console, navigate to Applications > OAuth 2.0 > Clients, and then click Add Client.
-
In Client ID, enter
rarClient. -
In Redirection URIs, enter the redirect URI the sample apps use:
com.example.demo://oauth2redirect -
Click Create.
The console creates the new OAuth 2.0 client, and displays the properties for further configuration.
-
On the Core tab:
-
In Client type, select
Public. -
In Scope(s), add the same scopes you gave the standard client in Task 3:
openid profile email addressThe token response includes an ID token when the
openidscope is granted. -
In Authorization Detail Type(s), enter the types your app requests:
payment_initiationaccount_informationRequesting an unlisted typeIf the app requests a type that is not in the client’s Authorization Detail Type(s) list, the authorization request fails with
invalid_authorization_detailsand an error description naming the rejected type. -
Click Save Changes.
You must click Save Changes before changing tabs, otherwise the page discards any changes you made on the tab.
-
-
On the Advanced tab:
-
In Grant Types, ensure
Authorization Codeis listed. -
In Token Endpoint Authentication Method, select
none. -
Disable Implied Consent.
Implied consent and
authorization_detailsare incompatible.A client with implied consent enabled that receives an
authorization_detailsrequest always fails withinvalid_request. -
Click Save Changes.
-
-
On the OAuth2 Provider Overrides tab:
-
Set Enable OAuth2 Provider Overrides to Enabled.
-
Set Enable Remote Consent to Enabled.
-
In Remote Consent Service ID, select the agent you created in Task 2. Creating the Remote Consent Agent.
For example,
myCustomRCS. -
Click Save Changes.
-