Skip to content
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

Set attribute condition for github.tools.sap wif provider #11819

Open
dekiel opened this issue Sep 6, 2024 · 0 comments
Open

Set attribute condition for github.tools.sap wif provider #11819

dekiel opened this issue Sep 6, 2024 · 0 comments

Comments

@dekiel
Copy link
Contributor

dekiel commented Sep 6, 2024

Github OIDC provider is shared provider which issues tokens for all repositories hosted in the instance. Such tokens are valid from perspective of federated infrastructure. Identities represented by these tokens can be granted access to the gcp resources. If permissions will be granted by mistake there is no configuration which will prevent accessing resources by unauthorised workload.

The workload identity federation provider has property attribute_condition which value is a CEL expression string. The expression is evaluated to decide if token should be accepted. This allow to conditionally control which tokens should be allowed to access resources.

Recently we set attribute condition for github.com provider limiting allowed tokens to the tokens issued for repositories owned by kyma-project organisation.

IaC config setting attribute_condition for provider.

attribute_condition = var.gh_com_kyma_project_wif_attribute_condition

Default value of attribute_condition CEL expression.

default = "attribute.repository_owner_id == \"39153523\""

The same configuration should be added for github.tools.sap provider.

@dekiel dekiel assigned dekiel and unassigned dekiel Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant