-
Notifications
You must be signed in to change notification settings - Fork 18
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
Handle service accounts #127
Conversation
811d56e
to
46bfa30
Compare
middleware/user.go
Outdated
if id.Identity.Type != "User" { | ||
username = id.Identity.User.Username | ||
} else if id.Identity.Type != "ServiceAccount" { | ||
if id.Identity.ServiceAccount == nil { |
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.
Gotta watch out for the null pointer here. hmm...
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #127 +/- ##
==========================================
+ Coverage 45.08% 45.72% +0.63%
==========================================
Files 18 18
Lines 1313 1334 +21
==========================================
+ Hits 592 610 +18
- Misses 680 682 +2
- Partials 41 42 +1 ☔ View full report in Codecov by Sentry. |
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 changes looks good to me 👍
f3b2072
to
aa4429e
Compare
289a022
to
b80e76a
Compare
I'm going to get PR#128 merged in first, then rebase this one to include PR#128. |
Moving to platform-go-middlewares v2 Moving to golang 1.20
b80e76a
to
4e36823
Compare
What?
Moved to platform-go-middlewares v2
Modified the middlewares to accept a service-account
Why?
Add support for service-accounts
Testing
Added service-account tests to user middleware
Anything Else?
Any other notes about the PR that would be useful for the reviewer.
Secure Coding Practices Checklist Link
Secure Coding Checklist