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

feat: Use SecretProvider to get Config/Registry access tokens #202

Merged
merged 2 commits into from
Apr 7, 2021

Conversation

lenny-goodell
Copy link
Member

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?

SecretProvider currently create via bootstrap handler long after Config and Registry clients are created.

Issue Number: #199

What is the new behavior?

SecretProvider now created during config processing and used to get access tokens when creating the Config and registry clients

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

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.

suggested minor tweaks

bootstrap/config/config.go Outdated Show resolved Hide resolved
bootstrap/config/config.go Outdated Show resolved Hide resolved
bootstrap/config/config.go Outdated Show resolved Hide resolved
bootstrap/interfaces/secret.go Show resolved Hide resolved
lenny added 2 commits April 6, 2021 16:04
SecretProvider now created during config processing and used to get access token(s) when using Config and registry clients

closes #199

Signed-off-by: lenny <[email protected]>
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.

LGTM

@codecov-io
Copy link

Codecov Report

Merging #202 (82dd4e3) into master (e966ad5) will increase coverage by 4.23%.
The diff coverage is 22.05%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #202      +/-   ##
==========================================
+ Coverage   48.24%   52.47%   +4.23%     
==========================================
  Files          15       11       -4     
  Lines         711      646      -65     
==========================================
- Hits          343      339       -4     
+ Misses        356      293      -63     
- Partials       12       14       +2     
Impacted Files Coverage Δ
bootstrap/config/config.go 0.00% <0.00%> (ø)
bootstrap/environment/variables.go 89.65% <ø> (ø)
bootstrap/registration/registry.go 39.13% <28.57%> (-1.35%) ⬇️
bootstrap/secret/secret.go 81.13% <71.42%> (ø)
bootstrap/secret/insecure.go 71.87% <100.00%> (-18.45%) ⬇️
bootstrap/secret/secure.go 100.00% <100.00%> (ø)
bootstrap/handlers/httpserver.go
bootstrap/handlers/ready.go
bootstrap/handlers/message.go
... and 1 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 e966ad5...82dd4e3. Read the comment docs.

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.

[Secure Consul Ph2] Refactor SecretProvider initialization so it is available to get AccessToken for consul
4 participants