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: implement proxy using msal-go #142

Merged
merged 1 commit into from
Aug 12, 2021
Merged

feat: implement proxy using msal-go #142

merged 1 commit into from
Aug 12, 2021

Conversation

aramase
Copy link
Member

@aramase aramase commented Aug 10, 2021

Signed-off-by: Anish Ramasekar [email protected]

Reason for Change:

  • Implements proxy sidecar using msal-go
  • Updates docker base images for proxy-init and proxy

Requirements

  • squashed commits
  • included documentation
  • added unit tests and e2e tests (if applicable).

Issue Fixed:

fixes #57
fixes #14

Please answer the following questions with yes/no:

Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?

  • yes
  • no

Notes for Reviewers:

@aramase aramase marked this pull request as ready for review August 11, 2021 23:51
Copy link
Contributor

@chewong chewong left a comment

Choose a reason for hiding this comment

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

Mostly LGTM

pkg/proxy/proxy_test.go Outdated Show resolved Hide resolved
pkg/proxy/proxy.go Outdated Show resolved Hide resolved
@@ -248,14 +252,18 @@ $(E2E_TEST):
# Ginkgo configurations
GINKGO_FOCUS ?=
GINKGO_SKIP ?=
GINKGO_NODES ?= 3
GINKGO_NODES ?= 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it not possible to run e2e tests in parallel?

Copy link
Member Author

Choose a reason for hiding this comment

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

The proxy test and token exchange test currently use the same service account for tests and running in parallel will cause a race. I can add trust for a new service account and enable parallel again in a follow-up PR.

Makefile Outdated Show resolved Hide resolved
klog.InfoS("received token request", "method", r.Method, "uri", r.RequestURI)
w.Header().Set("Server", version.GetUserAgent("proxy"))
clientID, resource := parseTokenRequest(r)
// TODO (aramase) should we fallback to the clientID in the annotated service account
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we implement this in this PR or a follow-up PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is still up for debate so I didn't want to add this as part of this PR. I'll add a follow-up PR once we make a decision on this.

Signed-off-by: Anish Ramasekar <[email protected]>

update token acquire logic

Signed-off-by: Anish Ramasekar <[email protected]>

test: add e2e tests for proxy

Signed-off-by: Anish Ramasekar <[email protected]>
@aramase aramase merged commit 887abce into Azure:main Aug 12, 2021
@aramase aramase deleted the proxy-msal-go branch August 12, 2021 20:43
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.

Update sidecar to use msal-go Update docker base images
2 participants