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(security): Implement consul token header in API Gateway #3391

Conversation

jim-wang-intel
Copy link
Contributor

@jim-wang-intel jim-wang-intel commented Apr 20, 2021

  • Add implementation for enabling request transformer plugin on consul service for Kong's route through proxy-setup
  • Fix unit test issues
  • Add necessary starting sequence and env. for proxy-setup in snap packaging

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x ] 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/edgex-go/blob/master/.github/Contributing.md.

What is the current behavior?

no consul service available in Kong

Issue Number: #3368

What is the new behavior?

add consul service/route to Kong and enable consul header through kong's request transform plugins on the added consul service.

Does this PR introduce a breaking change?

  • Yes
  • [x ] No

New Imports

  • Yes
  • [x ] No

Specific Instructions

Are there any specific instructions or things that should be known prior to reviewing?
Note: This has been re-based on top of @beaufrusetta's branch from his PR #3328
Would need some merging coordination with his PR: until then, made this PR as draft.

Beau's PR has already merged, updated to fit only commits I've now.

Other information

@jim-wang-intel jim-wang-intel added this to the Ireland milestone Apr 20, 2021
@jim-wang-intel jim-wang-intel self-assigned this Apr 20, 2021
@jim-wang-intel jim-wang-intel changed the title feat(security): Implement consul token header proxy feat(security): Implement consul token header in API Gateway Apr 20, 2021
@jim-wang-intel jim-wang-intel force-pushed the implement-consul-token-header-proxy branch from 26176fb to 3daad41 Compare April 21, 2021 00:10
internal/security/proxy/service.go Outdated Show resolved Hide resolved
internal/security/proxy/service.go Outdated Show resolved Hide resolved
internal/security/proxy/service.go Outdated Show resolved Hide resolved
internal/security/secretstore/init.go Outdated Show resolved Hide resolved
@jim-wang-intel
Copy link
Contributor Author

rebased against master and removed the previous beaus' commit; now it only contains the stuff for adding consul route and header into Kong.

@jim-wang-intel jim-wang-intel marked this pull request as ready for review May 5, 2021 00:15
@jim-wang-intel jim-wang-intel linked an issue May 5, 2021 that may be closed by this pull request
lenny-goodell
lenny-goodell previously approved these changes May 5, 2021
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

LGTM

- Add implementation for enabling request transformer plugin on consul service for Kong's route through proxy-setup
- Fix unit test issues
- Add necessary starting sequence and env. for proxy-setup in snap packaging

Closes: edgexfoundry#3368

Signed-off-by: Jim Wang <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 5, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.4% 0.4% Duplication

@lenny-goodell lenny-goodell requested a review from bnevis-i May 5, 2021 23:03
@lenny-goodell lenny-goodell merged commit 58f175f into edgexfoundry:master May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Secure Consul Ph. 2] Add consul token header for Kong's route
3 participants