Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Since OP version 4.2, the OAUTH2.PAR profile configuration bean enables support for OAuth2 Pushed Authorization Requests (PAR), a method for clients to push the payload of an OAuth 2.0 authorization request to AS/OP via a direct request and provides them with a request URI that is used as reference to the data in a subsequent call to the authorization endpoint.

Configuration

The requestUriType option can be used for defining the type how the resulting request_uri values are produced. The default (empty) value refers to the use of opaque format: it encodes all the requested parameters inside the token which is encrypted via data sealer. The benefit is that no server-side state is needed, but very long request parameter values may cause its length to exceed 512 ASCII characters, which is not recommended by the specs. The value “ss” refers to the use of configurable storage service: then the value remain short but the same storage must be available for authorization endpoint (OIDC.SSO profile) when the request_uri is used.

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.

Expand
titleCommon
Include Page
IDP4:ProfileConfiguration-Common
IDP4:ProfileConfiguration-Common
Expand
titleFlow Types
Include Page
OPProfileConfiguration-FlowTypes
OPProfileConfiguration-FlowTypes
Expand
titleClient Authentication
Include Page
OPProfileConfiguration-ClientAuthentication
OPProfileConfiguration-ClientAuthentication

For convenience, this is also controllable globally via the idp.oidc.tokenEndpointAuthMethods property.

Expand
titleProfile-Specific

Options specific to the PAR flow:

Name

Type

Default

Description

forcePKCE

Boolean

false

Whether client is required to use PKCE

allowPKCEPlain

Boolean

false

Whether client is allowed to use PKCE code challenge method "plain"

useRequestObject

Boolean

false

Whether to enforce use of request objects

signRequestObject

Boolean

true

Whether to enforce signing of request objects if they’re used.

encryptRequestObject

Boolean

false

Whether to enforce encryption of request objects if they’re used.

responseModes

Set<String>

Specifies allowed values for response_mode in the authorization/authentication requests. Null/empty means that all supported values are allowed.

requireAuthenticationRequest

Boolean

true

Whether to enforce use of OIDC authentication sequence (involving openid scope).

Note! In SAML metadata-driven configuration, only the use of requireAuthenticationRequestPredicate is supported.

customRedirectUriValidationStrategy

BiPredicate<

URI,

ProfileRequestContext

>

null

Custom validation strategy for the redirect_uri parameter. If a value is set, it overrides the default validation logic for both registered and unregistered clients.

requestUriType

String

Format of request_uri. Supports values are “ss” or nothing/empty/null, implying opaque tokens.

“ss” refers to the use of storage service (defined byidp.oauth2.par.StorageService, defaulting to in-memory service): this way the values remain shorter as the URI value only contains a reference to the storage record.

requestUriLifetime

Duration

PT1M

Lifetime for the request_uri to remain valid

requestUriClaimsSetManipulationStrategy

BiFunction<
ProfileRequestContext,
Map<String,Object>,
Map<String,Object>
>

Manipulation strategy for customising request_uri claims set contents. The BiFunction inputs are the ProfileRequestContext and the current contents of request_uri as a Map<String,Object>.

If the result is non-null, the result (Map<String,Object) is used to replace the contents of the id_token. It is the deployer’s responsibility to ensure the results remain valid/appropriate.

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

  • idp.oidc.forcePKCE

  • idp.oidc.allowPKCEPlain

  • idp.oauth2.requireAuthenticationRequestPredicate

  • idp.oidc.requestobject.used

  • idp.oidc.requestobject.signed

  • idp.oidc.requestobject.encrypted

  • idp.oauth2.responseModes

  • idp.oauth2.par.requestUriType

  • idp.oauth2.par.requestUriLifetime

  • idp.oauth2.par.serializationStrategies

  • idp.oauth2.par.StorageService