-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Encapsulate Token operations #5502
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c3e12fa
to
f87689f
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.
Is this ready for review? :) @WillardHu
Yes, this task has been completed. |
This change passed some tests in my k8s cluster
PTAL @fisherxu @Shelley-BaoYue |
@@ -141,7 +142,9 @@ func verifyCertSubject(cert *x509.Certificate, nodeName string) error { | |||
// verifyAuthorization verifies the token from EdgeCore CSR | |||
func verifyAuthorization(w http.ResponseWriter, r *http.Request) bool { | |||
authorizationHeader := r.Header.Get("authorization") | |||
klog.V(4).Info("authorization token is: ", authorizationHeader) |
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.
log the token info may cause the security problem
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.
The log print has been deleted, thanks
Signed-off-by: WillardHu <wei.hu@daocloud.io>
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Encapsulate Token operations to improve readability and maintainability.
Which issue(s) this PR fixes:
A part of issue #5498
Special notes for your reviewer:
Does this PR introduce a user-facing change?: