JWTBearerOAuth2AccessTokenProvider

Description

Provides OAuth 2.0 access tokens that can be used as Bearer authorization header in HTTP requests. This controller service is for implementing the OAuth 2.0 JWT Bearer Flow.

Tags

access token, authorization, hjwt, oauth2, provider

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Assertion Parameter Name *Assertion Parameter NameassertionName of the parameter to use for the JWT assertion in the request to the token endpoint.
AudienceAudienceThe audience claim (aud) for the JWT. Space-separated list of audiences if multiple are expected.
Grant Type *Grant Typeurn:ietf:params:oauth:grant-type:jwt-bearerValue to set for the grant_type parameter in the request to the token endpoint.
IssuerIssuerThe issuer claim (iss) for the JWT.
JWT Expiration Time *JWT Expiration Time1 hourExpiration time used to set the corresponding claim of the JWT. In case the returned access token does not includean expiration time, this will be used with the refresh window to re-acquire a new access token.
JWT IDJWT IDThe “jti” (JWT ID) claim provides a unique identifier for the JWT. The identifier value must be assigned in amanner that ensures that there’s a negligible probability that the same value will be accidentally assigned to adifferent data object; if the application uses multiple issuers, collisions MUST be prevented among values producedby different issuers as well. The “jti” value is a case-sensitive string. If set, it is recommended to set thisvalue to ${UUID()}.
Key IDKey IDThe ID of the public key used to sign the JWT. It’ll be used as the kid header in the JWT.
Private Key Service *Private Key ServiceThe private key service to use for signing JWTs.
Refresh Window *Refresh Window5 minutesThe service will attempt to refresh tokens expiring within the refresh window, subtracting the configured duration from the token expiration.
SSL Context Service *SSL Context ServiceAn instance of SSLContextProvider configured with a certificate that will be used to set the x5t header. Must be using RSA algorithm.
ScopeScopeThe scope claim (scope) for the JWT.
Set JWT Header X.509 Cert Thumbprint *Set JWT Header X.509 Cert Thumbprintfalse
  • true
  • false
If true, will set the JWT header x5t field with the base64url-encoded SHA-256 thumbprint of the X.509 certificate’s DER encoding.If set to true, an instance of SSLContextProvider must be configured with a certificate using RSA algorithm.
Signing Algorithm *Signing AlgorithmPS256
  • RS256
  • RS384
  • RS512
  • PS256
  • PS384
  • PS512
  • ES256
  • ES384
  • ES512
  • Ed25519
The algorithm to use for signing the JWT.
SubjectSubjectThe subject claim (sub) for the JWT.
Token Endpoint URL *Token Endpoint URLThe URL of the OAuth2 token endpoint.
Web Client Service *Web Client ServiceThe Web Client Service to use for calling the token endpoint.

State management

This component does not store state.

Restricted

This component is not restricted.

System Resource Considerations

This component does not specify system resource considerations.