-
Notifications
You must be signed in to change notification settings - Fork 30
feat(auth)!: build token implementation #765
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
Conversation
waiting for go-vela/types changes to merge in
Codecov Report
@@ Coverage Diff @@
## main #765 +/- ##
==========================================
+ Coverage 54.39% 54.70% +0.31%
==========================================
Files 225 232 +7
Lines 16188 16392 +204
==========================================
+ Hits 8806 8968 +162
- Misses 6989 7024 +35
- Partials 393 400 +7
|
Co-authored-by: dave vader <[email protected]>
jbrockopp
left a comment
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.
proposal?
|
jbrockopp
left a comment
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.
LGTM
Server PR for Epic 1: Build Tokens.
Changes:
router/middleware/tokenpackage torouter/middleware/auth, which will now only retrieve auth headers from http requests, rather than generate/parse tokensinternal/tokenpackage, which features amanagerthat is set up in the context using various new flags added tomain.go. In brief, it's a one-stop-shop for token minting and validating and offers configurability to a degree.Claimsstruct, including information about the token type as well as relevant fields for that token (build tokens have build ids and repo).MustWorker()permissions check, which validates the symmetric token shared between server and workerMustBuildAccess()permissions check, which validates the build token, which is provided as a unique auth scope for each build.MustSecretAdminwhich will scope requests with build token auth based on the repo within the tokendepends on: go-vela/types#276