-
Notifications
You must be signed in to change notification settings - Fork 8
DOM-54018 Allow GCP access to flyte-dataplane IAM #411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| "accounts.google.com:aud": "${local.deploy_id}-flyte-gcp-${random_id.server.hex}" | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Azure will look something like this
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::<AWS_ACCOUNT_ID>:oidc-provider/sts.windows.net/<AZURE_AD_TENANT_ID>/"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"sts.windows.net/<AZURE_AD_TENANT_ID>/:aud": "<AZURE_AD_APPLICATION_ID>"
}
}
}
]
}
OR
{
"Version": 2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::<AWS Account ID>:oidc-provider/sts.windows.net/<Microsoft Entra Tenant ID>/"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"sts.windows.net/<Microsoft Entra Tenant ID>/:aud": "<Application ID URI>",
"sts.windows.net/<Microsoft Entra Tenant ID>/:sub": "<Managed Identity’s Object (Principal)ID>"
}
}
}]
}
More details in https://aws.amazon.com/blogs/security/how-to-access-aws-resources-from-microsoft-entra-id-tenants-using-aws-security-token-service/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened up a separate PR at #412 for that since it will generally be a pain
f37e20c to
beb3e70
Compare
Secretions
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing tf-lint had an effect on the docs again. :( General changes lgtm, just need to tweak that doc before merge.
- Allow GCP tokens with a custom audience matching the string
{deploy_id}-flyte-gcp-{random_id} to access Flyte blobs
Inspired by policy definition at
https://jason-umiker.medium.com/cross-cloud-identities-between-gcp-and-aws-from-gke-and-or-eks-182652bddadb
NOTE: jwt validation usually takes into account several factors
- issuer
- audience
- signature
- subject
- scope
- custom claims
This policy verifies only the "aud" claim in the token, which in
theory is spoofable by anyone using GCP to produce tokens. Therefore,
include a random piece of data in the "aud" value that only the
control plane will know. When generating executions on remote data
planes (by dispatcher / workload operator), this value will be passed
so that tokens produced from GCP will have this shared value.
To do so requires exporting the value from the terraform code into
the catalog and through to Nucleus
beb3e70 to
92a91a4
Compare
|
Confirmed in a test environment with an infra upgrade that things check out with the 16 character id at the end |
Allow GCP tokens with a custom audience matching the string
{deploy_id}-flyte-gcp-{random_id} to access Flyte blobs
Inspired by policy definition at
https://jason-umiker.medium.com/cross-cloud-identities-between-gcp-and-aws-from-gke-and-or-eks-182652bddadb
NOTE: jwt validation usually takes into account several factors
This policy verifies only the "aud" claim in the token, which in
theory is spoofable by anyone using GCP to produce tokens. Therefore,
include a random piece of data in the "aud" value that only the
control plane will know. When generating executions on remote data
planes (by dispatcher / workload operator), this value will be passed
so that tokens produced from GCP will have this shared value.
To do so requires exporting the value from the terraform code into
the catalog and through to Nucleus