gitpod
command in Gitpod. The generated JWT token includes claims about the environment and its owner, and is exchanged with AWS for an STS token. That STS token is associated with an IAM role and inherits any access granted to that role. Access control configuration is the responsibility of the AWS account owner/administrator.
https://app.gitpod.io
sts.amazonaws.com
/.well-known/openid-configuration
to the end of the identity provider’s URL to see the provider’s publicly available configuration document and metadata: https://app.gitpod.io/.well-known/openid-configuration
gitpod idp token --decode --audience sts.amazonaws.com
inside a Gitpod environment. Pay attention to the sub
claim containing the organization, project, and environment information.app.gitpod.io
) followed by the claim (:aud
, :sub
, etc.). The examples below show how this works. Read more about these OIDC condition keys here.
Here are some examples restricting who can assume the role depending on the sub
key contents:
This example shows that only environments created within a specific organization can assume this role:
aws sts assume-role-with-web-identity
.assume-role
command manually, or use the helper command within the gitpod
CLI, gitpod idp login aws
which will automatically update your AWS CLI credentials file.
The token expiry can be customized using --duration-seconds=<token-expiry-in-seconds>
, this configuration option exactly matches the --duration-seconds
configuration option offered by AWS CLI. The default is 3600
seconds. Note, to use a longer expiry your AWS Administrator must allow for longer sessions.
You can can run the following to assume the role and retrieve secrets from AWS Secrets Manager, or you can extend your Automation to authenticate with AWS automatically on startup.
gitpod idp token --decode --audience sts.amazonaws.com
to print your environment JWT token. Ensure that any claims against the sub
match the trust policy in AWS.