Skip to content

Add creation and vending of dynamic team tokens#14

Open
dpowley wants to merge 2 commits into
hashicorp:mainfrom
dpowley:main
Open

Add creation and vending of dynamic team tokens#14
dpowley wants to merge 2 commits into
hashicorp:mainfrom
dpowley:main

Conversation

@dpowley
Copy link
Copy Markdown

@dpowley dpowley commented Sep 26, 2022

This PR adds a backwards-compatible role field called token_type to distinguish between the types of TFC token vending that this secrets engine handles:

  • user
  • organization
  • team

This PR also adds a new token_type: dynamic_team. With this method, Vault will create revocable, time-bound teams under a TFC organization and vend tokens for those teams. The permissions for the teams that Vault creates are configured on the Vault role using the team_options field. For reference, here is an example Vault role configuration:

vault write terraform/role/my-role-team token_type=dynamic_team organization=$TFC_ORGANIZATION team_options='{"visibility": "secret", "organization_access": {"manage-policies": true, "manage-run-tasks": true}, "workspace_access": [{"workspace": $TFC_WORKSPACE, "options": {"access": "custom", "run-tasks": true}}]}'

I also upgrade the go-tfe package in order to recognize the most current organization and workspace permissions for the dynamic_team token type.

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

Successfully merging this pull request may close these issues.

1 participant