You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Not a problem per se. Perhaps it may lead to being able to better conform to certain AWS IAM best practices around using tags and ABAC-style policies.
Describe the solution you'd like
I have an example use case where it would be desirable for the AWS secrets backend to be able to apply session tags on credentials issued by the aws/sts/creds API. This would allow greater dynamism in the AWS backend.
example use case:
I want to auth OIDC tokens from my CI using the auth/jwt backend and a single auth role. Most CI providers are offering per-job OIDC tokens now. I will use Buildkite in this example but it applies to GHA and others.
I want to be able to auth OIDC tokens from any repo in the org without having to create a new auth/jwt/role/<REPO> role for each.
I want a single AWS Secrets role that each repo can get IAM creds (assumed_role) from and have the claims from the JWT applied as session tags.
The session tags allow me to treat each issued AWS credential as unique by writing ABAC-style policies that use tags to differentiate each "user" (repo/pipeline in this example)
Buildkite pipelines would use their OIDC token to auth to vault and fetch AWS creds. These creds would have a pipeline_slug session tag.
Then, an S3 bucket could be made available for all pipelines to use with a single bucket policy. They would be restricted to read/write/list on the path cache/<PIPELINE> where <PIPELINE> is the pipeline_slug conveyed from the claims on the BK OIDC token down to a session tag on the AWS IAM creds:
Using Vault, the alternative is to explicitly create jwt auth roles and secrets/aws roles for each pipeline.
This is a lambda-based example using GitHub Actions OIDC tokens. In this example a GHA job would send its JWT to the lambda which would parse out the claims and call the sts:AssumeRole API with those claims as session tags, returning the resulting creds to the caller. https://github.com/glassechidna/ghaoidc/blob/main/api/api.go
Explain any additional use-cases
In general I think this would go a long way towards allowing folks to expressing more ABAC-style IAM policies with Vault.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Not a problem per se. Perhaps it may lead to being able to better conform to certain AWS IAM best practices around using tags and ABAC-style policies.
Describe the solution you'd like
I have an example use case where it would be desirable for the AWS secrets backend to be able to apply session tags on credentials issued by the
aws/sts/creds
API. This would allow greater dynamism in the AWS backend.example use case:
I want to auth OIDC tokens from my CI using the
auth/jwt
backend and a single auth role. Most CI providers are offering per-job OIDC tokens now. I will use Buildkite in this example but it applies to GHA and others.auth/jwt/role/<REPO>
role for each.How this might look in practice:
auth/jwt
rolebuildkite-pipelines
:buildkite-pipelines
. This role will be assumed by any BK pipeline in our org.buildkite-pipelines
that will assume the role created in the previous step:Buildkite pipelines would use their OIDC token to auth to vault and fetch AWS creds. These creds would have a
pipeline_slug
session tag.Then, an S3 bucket could be made available for all pipelines to use with a single bucket policy. They would be restricted to read/write/list on the path
cache/<PIPELINE>
where<PIPELINE>
is thepipeline_slug
conveyed from the claims on the BK OIDC token down to a session tag on the AWS IAM creds:Describe alternatives you've considered
sts:AssumeRole
API with those claims as session tags, returning the resulting creds to the caller. https://github.com/glassechidna/ghaoidc/blob/main/api/api.goExplain any additional use-cases
In general I think this would go a long way towards allowing folks to expressing more ABAC-style IAM policies with Vault.
The text was updated successfully, but these errors were encountered: