This repository was archived by the owner on Nov 6, 2025. It is now read-only.
Feature/gh 618 vault dynamic secrets for gcp#632
Open
Loic-R wants to merge 19 commits into
Open
Conversation
Co-authored-by: Loïc Albertin <loic.albertin@gmail.com>
…c-secrets-for-gcp
|
Kudos, SonarCloud Quality Gate passed!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request description
Description of the change
Make google location now able to read dynamic secrets in a vault.
What I did
I made Yorc capable to read dynamic secrets in a google cloud secret engine. It is now capable to read a OAuth token used by Terraform to provision Google infrastructure.
How I did it
How to verify it
The easiest way to demonstrate this issue, is to run a dev Vault server in 1.3.2 version, configure it, and run the corresponding Yorc server of the pull request on the same machine.
Setup
Vault
Start a vault dev server :
vault server -dev -dev-root-token-id="root"In another terminal, configure the Vault server (don't forget to replace your-project-id with your actual project id). The vault service account should have a set of permissions listed here https://www.vaultproject.io/docs/secrets/gcp#required-permissions
Yorc
You'll need:
Start a consul server dev as well as a Yorc server with this vault configuration:
Create a google location:
./yorc locations add --data '{"name": "GoogleCloud", "type": "google", "properties" :{ "project" : "{{ (secret \"/secret/data/yorc/credentials\" \"data=project\").String }}","oauth_access_token" : "{{ (secret \"/gcp/token/yorc-token-roleset\" \"data=token\").String }}" }}Replace in the sample topology, the location of your ssh-key for your google resources as well as the user used to connect to the VM. For example:
Save and deploy/undeploy the app
What to check ?
Tear down
# Delete the roleset and so the service account created on your GCP vault delete gcp/roleset/yorc-token-rolesetDelete also all the files downloaded
Description for the changelog
Applicable Issues
closes #618