-
Notifications
You must be signed in to change notification settings - Fork 484
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): Implementation for adding Consul ACL policies, roles #3273
feat(security): Implementation for adding Consul ACL policies, roles #3273
Conversation
1563183
to
c15de42
Compare
c15de42
to
2697b09
Compare
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.
Review complete. Please double check HTTP response code processing in getPolicyByName
@bnevis-i i've double checked and it returns 403 on my local box. I've also removed the code to save management token as you indicate we use the bootstrap token for now. |
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
New addition for implementing for Consul's ACL policies creation and roles for Consul tokens generated later on via go-mod-secret - Add logic to check whether the ACL policy is already per-existing before creation of new policy - Add implementation to create a new ACL policy - Add implementation to create a role for EdgeX's services via Vault's /consul/roles/* APIs: this sets the stage for creating role-based Consul tokens used by EdgeX services - Add logic for creating token roles based on EdgeX service keys from configuration file - Update token-file-provider on edgex's default policy to add the permission for calling /consul/creds/"service-key" endpoint Closes: edgexfoundry#3254, edgexfoundry#3160 Signed-off-by: Jim Wang <[email protected]>
ade5e89
3290b09
to
ade5e89
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
commits squashed and rebased before the merging |
Codecov Report
@@ Coverage Diff @@
## master #3273 +/- ##
==========================================
+ Coverage 42.14% 42.41% +0.26%
==========================================
Files 181 183 +2
Lines 15598 15742 +144
==========================================
+ Hits 6574 6677 +103
- Misses 8614 8634 +20
- Partials 410 431 +21
Continue to review full report at Codecov.
|
New addition for implementing for Consul's ACL policies creation and roles for Consul tokens generated later on via
go-mod-secret
/consul/creds/"service-key"
endpointCloses: #3254, #3160
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?
this is a new feature, no ACL policies and roles existing yet.
Issue Number: #3254
What is the new behavior?
Add Consul's ACL policies for EdgeX services and management token.
Add roles for Vault so that we can utilize the /consul/creds/rolename api to create Consul tokens for services later.
Add consul management token
Augment the Vault's ACL policy of /consul/creds/servicekey on file-token-provider
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?
With this PR and run the docker compose,
docker logs edgex-core-consul
should give successful logging messages like the following:Other information