-
Notifications
You must be signed in to change notification settings - Fork 23
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
Feature/gh 618 vault dynamic secrets for gcp #632
Open
Loic-R
wants to merge
19
commits into
vault-dynamic-secrets
Choose a base branch
from
feature/GH-618-vault-dynamic-secrets-for-gcp
base: vault-dynamic-secrets
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/gh 618 vault dynamic secrets for gcp #632
Loic-R
wants to merge
19
commits into
vault-dynamic-secrets
from
feature/GH-618-vault-dynamic-secrets-for-gcp
Conversation
This file contains 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
Co-authored-by: Loïc Albertin <[email protected]>
…c-secrets-for-gcp
Loic-R
requested review from
loicalbertin,
stefbenoist,
laurentganne,
adidanes and
HildericSB
and removed request for
loicalbertin and
stefbenoist
April 15, 2020 09:01
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-roleset
Delete also all the files downloaded
Description for the changelog
Applicable Issues
closes #618