Setting up the authorization code flow for Contentful
Contentful uses the OAuth 2.0 authorization code flow. When you create the connection in AWS Glue Studio, you are redirected to Contentful to authorize AWS Glue, and AWS Glue then obtains and refreshes the access token for you.
To set up the authorization code flow for Contentful:
In Contentful, create an OAuth application to obtain a client ID and client secret. For more information, see OAuth
on the Contentful website. For the redirect URI, enter the redirect URI that the AWS Glue console uses:
If multi-session support is turned on in the AWS Management Console, use
https://3rdp.oauth.console.api.aws.Otherwise, use
https://.region.console.aws.amazon.com/gluestudio/oauth
Replace the following value:
region– The AWS Region where you create the connection.
Grant the read-only scope
content_management_read.In Secrets Manager, create a secret with the key
USER_MANAGED_CLIENT_APPLICATION_CLIENT_SECRETset to the client secret.When you create the connection, choose OAuth 2.0 and enter the client ID in the Client ID field. Choose the secret and the IAM role that AWS Glue assumes to read and update the secret. Then complete the authorization in Contentful.
After you authorize the connection, AWS Glue stores the access token in your secret and refreshes it automatically.