Data-Plane Http OAuth2
This extension can be used when there's a data endpoint that requires OAuth2 authentication through the
client credentials flow
It applies on both on source and sink side of the data transfer, when the data address containes the oauth2
related properties, the extension will request a token and add it as a Bearer in the Authorization header.
Please note that this extension doesn't currently support neither expiration nor refresh tokens, as they are not mandatory specifications that are up to the OAuth2 server implementation used.
How to use it
The extension works for all the HttpData addresses that contain the "oauth2" properties (defined in
Oauth2DataAddressSchema).
It supports both types of client credential:
shared secret and private-key based.
Common properties
oauth2:tokenUrl: the url where the token will be requestedoauth2:scope: (optional) the requested scope
Private-key based client credential
This type of client credential is used when the HttpData address contains the oauth2:privateKeyName property. This type of client
credential is considered as more secured as described here.
The mandatory for working with type of client credentials are:
oauth2:privateKeyName: the name of the private key used to sign the JWT sent to the Oauth2 serveroauth2:validity: the validity of the JWT token sent to the Oauth2 server (in seconds)
Shared secret client credential
This type of client credential is used when the HttpData address DOES not contain the oauth2:privateKeyName property.
The mandatory for working with type of client credentials are:
oauth2:clientId: the client idoauth2:clientSecret: (deprecated) shared secret for authenticating to the Oauth2 serveroauth2:clientSecretKey: the key with which the shared secret for authenticating to the Oauth2 server is stored into theVault