application_grants
Creates, updates, deletes, gets or lists an application_grants resource.
Overview
| Name | application_grants |
| Type | Resource |
| Id | aws.sso_admin.application_grants |
Fields
The following fields are returned by SELECT queries:
- get_application_grant
- list_application_grants
| Name | Datatype | Description |
|---|---|---|
authorization_code | object | Configuration options for the authorization_code grant type. |
jwt_bearer | object | Configuration options for the urn:ietf:params:oauth:grant-type:jwt-bearer grant type. |
refresh_token | object | Configuration options for the refresh_token grant type. |
token_exchange | object | Configuration options for the urn:ietf:params:oauth:grant-type:token-exchange grant type. |
| Name | Datatype | Description |
|---|---|---|
grant | object | The configuration structure for the selected grant. |
grant_type | string | The type of the selected grant. (authorization_code, refresh_token, urn:ietf:params:oauth:grant-type:jwt-bearer, urn:ietf:params:oauth:grant-type:token-exchange) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_application_grant | select | region | Retrieves details about an application grant. | |
list_application_grants | select | region | List the grants associated with an application. | |
put_application_grant | replace | region, ApplicationArn, GrantType | Creates a configuration for an application to use grants. Conceptually grants are authorization to request actions related to tokens. This configuration will be used when parties are requesting and receiving tokens during the trusted identity propagation process. For more information on the IAM Identity Center supported grant workflows, see SAML 2.0 and OAuth 2.0. A grant is created between your applications and Identity Center instance which enables an application to use specified mechanisms to obtain tokens. These tokens are used by your applications to gain access to Amazon Web Services resources on behalf of users. The following elements are within these exchanges: Requester - The application requesting access to Amazon Web Services resources. Subject - Typically the user that is requesting access to Amazon Web Services resources. Grant - Conceptually, a grant is authorization to access Amazon Web Services resources. These grants authorize token generation for authenticating access to the requester and for the request to make requests on behalf of the subjects. There are four types of grants: AuthorizationCode - Allows an application to request authorization through a series of user-agent redirects. JWT bearer - Authorizes an application to exchange a JSON Web Token that came from an external identity provider. To learn more, see RFC 6479. Refresh token - Enables application to request new access tokens to replace expiring or expired access tokens. Exchange token - A grant that requests tokens from the authorization server by providing a ‘subject’ token with access scope authorizing trusted identity propagation to this application. To learn more, see RFC 8693. Authorization server - IAM Identity Center requests tokens. User credentials are never shared directly within these exchanges. Instead, applications use grants to request access tokens from IAM Identity Center. For more information, see RFC 6479. Use cases Connecting to custom applications. Configuring an Amazon Web Services service to make calls to another Amazon Web Services services using JWT tokens. | |
delete_application_grant | delete | region | Deletes a grant from an application. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_application_grant
- list_application_grants
Retrieves details about an application grant.
SELECT
authorization_code,
jwt_bearer,
refresh_token,
token_exchange
FROM aws.sso_admin.application_grants
WHERE region = '{{ region }}' -- required
;
List the grants associated with an application.
SELECT
grant,
grant_type
FROM aws.sso_admin.application_grants
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- put_application_grant
Creates a configuration for an application to use grants. Conceptually grants are authorization to request actions related to tokens. This configuration will be used when parties are requesting and receiving tokens during the trusted identity propagation process. For more information on the IAM Identity Center supported grant workflows, see SAML 2.0 and OAuth 2.0. A grant is created between your applications and Identity Center instance which enables an application to use specified mechanisms to obtain tokens. These tokens are used by your applications to gain access to Amazon Web Services resources on behalf of users. The following elements are within these exchanges: Requester - The application requesting access to Amazon Web Services resources. Subject - Typically the user that is requesting access to Amazon Web Services resources. Grant - Conceptually, a grant is authorization to access Amazon Web Services resources. These grants authorize token generation for authenticating access to the requester and for the request to make requests on behalf of the subjects. There are four types of grants: AuthorizationCode - Allows an application to request authorization through a series of user-agent redirects. JWT bearer - Authorizes an application to exchange a JSON Web Token that came from an external identity provider. To learn more, see RFC 6479. Refresh token - Enables application to request new access tokens to replace expiring or expired access tokens. Exchange token - A grant that requests tokens from the authorization server by providing a ‘subject’ token with access scope authorizing trusted identity propagation to this application. To learn more, see RFC 8693. Authorization server - IAM Identity Center requests tokens. User credentials are never shared directly within these exchanges. Instead, applications use grants to request access tokens from IAM Identity Center. For more information, see RFC 6479. Use cases Connecting to custom applications. Configuring an Amazon Web Services service to make calls to another Amazon Web Services services using JWT tokens.
REPLACE aws.sso_admin.application_grants
SET
ApplicationArn = '{{ ApplicationArn }}',
GrantType = '{{ GrantType }}',
Grant = '{{ Grant }}'
WHERE
region = '{{ region }}' --required
AND ApplicationArn = '{{ ApplicationArn }}' --required
AND GrantType = '{{ GrantType }}' --required;
DELETE examples
- delete_application_grant
Deletes a grant from an application.
DELETE FROM aws.sso_admin.application_grants
WHERE region = '{{ region }}' --required
;