Skip to content
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

refactor: Secret Provider for all services #134

Merged
merged 5 commits into from
Dec 20, 2020

Conversation

lenny-goodell
Copy link
Member

@lenny-goodell lenny-goodell commented Dec 10, 2020

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/go-mod-bootstrap/blob/master/.github/Contributing.md.

What is the current behavior?

Secret provider only used by core/support services. App service has own implementation. Device services don't have one.

Issue Number: #126

This PR is dependent on edgexfoundry/go-mod-secrets#71

What is the new behavior?

Refactored Secret Provider per ADR so it can be used by all services (core, support, App & Device)

Does this PR introduce a breaking change?

  • Yes
  • No

New Imports

  • Yes
  • No

Specific Instructions

Are there any specific instructions or things that should be known prior to reviewing?

Other information

Refactored Secret Provider per ADR so it can be used by all services  (core, support, App & Device)

closes #126

Signed-off-by: lenny <[email protected]>
@lenny-goodell
Copy link
Member Author

lenny-goodell commented Dec 10, 2020

In Draft until Secret Provider ADR is approved and dependent PR merged.

bootstrap/container/secret.go Outdated Show resolved Hide resolved
bootstrap/container/token.go Outdated Show resolved Hide resolved
bootstrap/interfaces/secret.go Show resolved Hide resolved
@lenny-goodell lenny-goodell force-pushed the secret-provider branch 2 times, most recently from eb10c7c to e3ea31a Compare December 15, 2020 20:54
@lenny-goodell lenny-goodell marked this pull request as ready for review December 15, 2020 20:54
@codecov-io
Copy link

Codecov Report

Merging #134 (a8a073e) into master (244b676) will decrease coverage by 2.10%.
The diff coverage is 80.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #134      +/-   ##
==========================================
- Coverage   58.07%   55.97%   -2.11%     
==========================================
  Files           8       14       +6     
  Lines         458      661     +203     
==========================================
+ Hits          266      370     +104     
- Misses        183      277      +94     
- Partials        9       14       +5     
Impacted Files Coverage Δ
bootstrap/config/config.go 0.00% <0.00%> (ø)
bootstrap/handlers/httpserver.go 0.00% <ø> (ø)
bootstrap/handlers/message.go 0.00% <ø> (ø)
bootstrap/handlers/ready.go 0.00% <ø> (ø)
bootstrap/secret/helper.go 0.00% <0.00%> (ø)
bootstrap/handlers/secret.go 79.62% <85.71%> (ø)
bootstrap/secret/insecure.go 90.32% <90.32%> (ø)
bootstrap/secret/secure.go 100.00% <100.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 244b676...a8a073e. Read the comment docs.

Copy link
Contributor

@jim-wang-intel jim-wang-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks pretty good. just some minor tweaks to change

bootstrap/secret/secure_test.go Outdated Show resolved Hide resolved
bootstrap/secret/secure_test.go Outdated Show resolved Hide resolved
bootstrap/secret/secure.go Outdated Show resolved Hide resolved
bootstrap/secret/secure.go Outdated Show resolved Hide resolved
bootstrap/secret/secure.go Outdated Show resolved Hide resolved
bootstrap/secret/insecure.go Show resolved Hide resolved
bootstrap/config/config.go Show resolved Hide resolved
bootstrap/container/configuration.go Outdated Show resolved Hide resolved
bootstrap/container/configuration.go Outdated Show resolved Hide resolved
bootstrap/container/logging.go Outdated Show resolved Hide resolved
bootstrap/container/secret.go Outdated Show resolved Hide resolved
bootstrap/container/token.go Outdated Show resolved Hide resolved
bootstrap/container/token.go Outdated Show resolved Hide resolved
bootstrap/secret/secure.go Show resolved Hide resolved
bootstrap/secret/secure.go Outdated Show resolved Hide resolved
Reworked container DIC get functions
Swith to use RWMutex for secrest cache.

Signed-off-by: lenny <[email protected]>
Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lenny-goodell lenny-goodell merged commit 6cb9329 into edgexfoundry:master Dec 20, 2020
@lenny-goodell lenny-goodell deleted the secret-provider branch December 20, 2020 16:57
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.

4 participants