-
Notifications
You must be signed in to change notification settings - Fork 485
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
feat(security): Create a Vault mgmt token for Consul Secrets API Operations #3192
Merged
lenny-goodell
merged 3 commits into
edgexfoundry:master
from
jim-wang-intel:create-special-vault-token
Feb 26, 2021
Merged
feat(security): Create a Vault mgmt token for Consul Secrets API Operations #3192
lenny-goodell
merged 3 commits into
edgexfoundry:master
from
jim-wang-intel:create-special-vault-token
Feb 26, 2021
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
jim-wang-intel
added
enhancement
New feature or request
security-services
3-high
priority denoting release-blocking issues
ireland
labels
Feb 24, 2021
jim-wang-intel
requested review from
beaufrusetta,
hutchic,
tonyespy,
cloudxxx8,
bnevis-i and
lenny-goodell
February 24, 2021 22:55
jim-wang-intel
force-pushed
the
create-special-vault-token
branch
2 times, most recently
from
February 25, 2021 14:45
123b826
to
5c6281c
Compare
lenny-goodell
requested changes
Feb 25, 2021
internal/security/secretstore/tokenfilewriter/tokenfilewriter.go
Outdated
Show resolved
Hide resolved
internal/security/secretstore/tokenfilewriter/tokenfilewriter.go
Outdated
Show resolved
Hide resolved
internal/security/secretstore/tokenfilewriter/tokenfilewriter_test.go
Outdated
Show resolved
Hide resolved
bnevis-i
previously requested changes
Feb 25, 2021
internal/security/secretstore/tokenfilewriter/tokenfilewriter.go
Outdated
Show resolved
Hide resolved
internal/security/secretstore/tokenfilewriter/tokenfilewriter.go
Outdated
Show resolved
Hide resolved
internal/security/secretstore/tokenfilewriter/tokenfilewriter_test.go
Outdated
Show resolved
Hide resolved
jim-wang-intel
force-pushed
the
create-special-vault-token
branch
from
February 26, 2021 01:09
5c6281c
to
8169d6f
Compare
Changes in secretstore-setup: - add token file writer implementation for creating and writing Vault's Consul secrets admin token - add Consul ACL feature flag "ENABLE_REGISTRY_ACL" - add configuration setting for ConsulSecretAdminTokenPath for specifying token file location - refactor TokenMaintenance to share code with token file writer's implementation Closes: edgexfoundry#3155 Signed-off-by: Jim Wang <[email protected]>
Address feedbacks on tokenfile writer Signed-off-by: Jim Wang <[email protected]>
lenny-goodell
requested changes
Feb 26, 2021
internal/security/secretstore/tokenfilewriter/tokenfilewriter_test.go
Outdated
Show resolved
Hide resolved
PR comments addressed Signed-off-by: Jim Wang <[email protected]>
jim-wang-intel
force-pushed
the
create-special-vault-token
branch
from
February 26, 2021 19:05
8169d6f
to
ee855b8
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
lenny-goodell
approved these changes
Feb 26, 2021
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.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3-high
priority denoting release-blocking issues
enhancement
New feature or request
ireland
security-services
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.
Part of Phase 1 Securing Consul stories: Create a Vault token to configure consul access
Changes in
secretstore-setup
:"ENABLE_REGISTRY_ACL"
ConsulSecretAdminTokenPath
for specifying token file locationCloses: #3155
Signed-off-by: Jim Wang [email protected]
PR Checklist
Please check if your PR fulfills the following requirements:
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/master/.github/Contributing.md.
What is the current behavior?
N/A
Issue Number: #3155
What is the new behavior?
New Vault token created for special purpose of management Consul Secrets APIs operations policy: configure access / create update roles later on. This token will be later used by Consul's bootstrapper.
Does this PR introduce a breaking change?
New Imports
Specific Instructions
Are there any specific instructions or things that should be known prior to reviewing?
Other information
To verify this locally, one can git clone this PR and build a dev version of
docker_secretstore_setup
and then add the following environment variables to docker-compose file ofsecretstore-setup
:so that the ACL feature is turned on. Run
make run dev
and then observe the following docker logs fromedgex-secretstore-setup
:docker logs edgex-secretstore-setup | grep "edgex-consul/admin/token"
And also list the file, too:
$ sudo ls -al /tmp/edgex/secrets/edgex-consul/admin/