Editing a resource
Use the Resources page to modify existing resources in PingOne.
|
You can enable an OIDC-based application to request scopes from multiple resources in a single request. Learn more about the Request scopes to access multiple resources option in Editing an application - OIDC. |
Steps
-
In the PingOne admin console, go to Applications > Resources and browse or search for the resource you want to edit.
The results list updates as you enter the search query. The current resources are shown in the list.
-
Click a resource entry to open the details panel for the resource.
-
On the Overview tab, click the Pencil icon () and enter or edit the following:
Field Description Resource Name
A unique identifier for the resource.
Audience (optional)
The intended audience for the resource. If you don’t provide a value, PingOne defaults to the resource name.
Description (optional)
A brief description of the resource.
Access token time to live (seconds)
The maximum time, in seconds, that the access token will be valid for use in the application.
Token Introspection Endpoint Authentication Method
Specifies how to authenticate using the client credentials for the application to which the token was issued. You can select from:
-
None -
Client secret basic -
Client secret post -
Client secret JWT -
Private key JWTFor
Private key JWT, select JWKS URL or JWKS. Provide either the URL where PingOne can retrieve the JSON Web Key Set (JWKS) or the web key set itself.
-
-
On the Attributes tab, map resource attributes to user attributes in PingOne.
-
Enter a resource attribute and then select the corresponding PingOne attribute from the list.
For example, you could map the
OIDC family_nameattribute to the PingOneFamily Nameattribute.Resources can use JSON attributes in their attribute mappings. You can use these attributes to pass complex information to applications through an access token. Learn more in Adding user attributes.
-
(Optional) Click the Gear icon () to use advanced expressions. Learn more in Using the expression builder.
-
(Optional) Select the Required checkbox to make the attribute required.
- For any attributes except the
subattribute -
If it can’t find a value for an attribute set as required, PingOne doesn’t issue an access token for the resource and instead issues an error message in the token response.
- For the
subattribute -
The following table lists how PingOne handles the
subattribute based on whether it’s set as required and what grant type the application is using:subset as required?Application grant type If PingOne can’t find an attribute mapping value? Yes
Any grant type requiring user interaction, such as authorization code
PingOne doesn’t issue an access token for the resource and instead issues an error message in the token response.
Yes
Client credentials
PingOne doesn’t issue an access token for the resource and instead issues an error message in the token response.
No
Any grant type requiring user interaction
PingOne populates the
subattribute with the PingOne user ID of the authenticated user.No
Client credentials
PingOne returns an access token without including the
subattribute.
- For any attributes except the
-
To add more attributes, click Add and enter an attribute and the corresponding PingOne mapping. Learn more in Mapping attributes.
-
To delete an attribute, click the Delete icon () for the appropriate attribute.
-
Click Save.
-
-
On the Scopes tab:
-
Locate the scope you want to edit, and then click .
-
Enter or edit the Scope Name and Description.
-
To map attributes to the scope:
-
Select the Enable Mapped Attributes checkbox.
-
In the Mapped Attributes field, select attributes in the list as needed and click Save.
If you select the Enable Mapped Attributes checkbox but don’t add any attributes, PingOne still includes the
subattribute in access tokens by default.Attributes set as Required are only enforced if the scope includes that attribute mapping. If the scope includes a required attribute but the attribute mapping returns no value, PingOne returns an error and doesn’t mint the access token. If the scope doesn’t include that attribute mapping, PingOne ignores the missing value and mints the access token.
The standard access token claims, such as
iss,exp, andaud, are always included and aren’t configurable.Example with multiple scopes
When an access token request includes multiple scopes, PingOne includes the combination of attributes from those scopes for the custom resource. If any requested scope for that custom resource doesn’t use mapped attributes, PingOne includes all custom resource attributes.
For example, suppose a custom resource has attributes
sub,attrX1,attrX2, andattrX3with the following scopes:-
scope1: The Enable Mapped Attributes checkbox is selected with mapped attributessubandattrX1. -
scope2: The Enable Mapped Attributes checkbox is selected with mapped attributessubandattrX2. -
scope3: The Enable Mapped Attributes checkbox isn’t selected.The following table shows which attributes are included in the access token for each scope combination at runtime:
Requested scopes Attributes included in the access token scope1sub,attrX1scope2sub,attrX2scope1 scope2sub,attrX1,attrX2scope3sub,attrX1,attrX2,attrX3scope1 scope3sub,attrX1,attrX2,attrX3scope2 scope3sub,attrX1,attrX2,attrX3
-
-
-
To add a scope:
-
Click Add Scope.
-
Enter the Scope Name and Description.
-
Add any mapped attributes to which you want the scope to have access.
-
-
Click Save.
-
-
(Optional) On the Permissions tab:
-
Click the Include user permissions in Access Token toggle to include application permissions in access tokens created for this resource.
To enable the Permissions tab, add PingOne Authorize to your environment.
Permissions for the authenticated user will be included in the
p1.permissionsclaim in the access token. Learn more in Application permissions. -
To add an application resource and permissions, click Add Permissions.
Learn more in Adding application permissions.
-
To edit an application resource, click next to the application resource.
-
Edit the application resource Name and Description.
-
To add a permission, click Add and enter an Action and Description for the permission.
-
Edit the Action and Description for existing permissions.
-
To delete a permission, click next to the permission.
-
-
(Optional) To delete an application resource, click next to the application resource.
-
Click Save.
-