OPTokenAudience

This profile configuration was introduced in V3.1 of this plugin in support of use cases involving access tokens issued to resource servers.

File(s): conf/relying-party.xml, conf/oidc.properties
Format: Native Spring, Spring Properties

Overview

The OIDC.TokenAudience profile configuration bean enables support for uses of the OAUTH 2 Token endpoint in which access tokens are being issued to resource servers rather than the client, as in OIDC. It supports generic use of the IdP as an OAuth Authorization Server.

At present, the only supported use case is the client_credentials grant type, in which the client directly requests a token for a resource server. This profile configuration represents the resource server role in this interaction and controls various settings of relevance to the resource server rather than to the client (which is represented by the OIDC.Token profile configuration).

Note that while OAuth in theory allows for tokens to be issued to multiple resource servers, this is not in practice well handled (e.g., encrypting a JWT can only be done to a single key given the JWT serialization format permitted by the RFC governing JWT access tokens). This implementation treats the “primary” resource server/audience as the entity to which the profile configuration is meant to apply.

Configuration

The most typical options used are described in more detail below, but not every obscure option is discussed. See the javadoc for all of the possible configuration options for this profile (note that some of them are inherited from parent classes).

Virtually all the configuration options below can be set via two different properties: a static property that explicitly sets the value to use and a lookup strategy or predicate property that takes a Function or Predicate and returns the value to use. The dynamic property is generally named "propertyNamePredicate" or "propertyNameLookupStrategy" for Boolean- and non-Boolean-valued properties respectively.

Options specific to generic or OAuth usage of the Token flow:

Name

Type

Default

Description

Name

Type

Default

Description

resolveAttributes

Boolean

true

Whether to resolve attributes during the token issuance process

encryptionOptional

Boolean

false

Whether the absence of encryption details in a resource server’s metadata should fail when issuing an access token

accessTokenType

String

 

Format of access token. Supported values are “JWT” or nothing/empty/null, implying opaque tokens.

accessTokenLifetime

Duration

PT10M

Lifetime of access token issued to client for resource server

The following properties can be used to globally adjust some of the settings above (some of them affect other profiles as well).

  • idp.oauth2.encryptionOptional

  • idp.oauth2.accessToken.type

  • idp.oauth2.accessToken.defaultLifetime