-
Notifications
You must be signed in to change notification settings - Fork 43
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
Remove token enforcement for true tokenless endpoints #533
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #533 +/- ##
=======================================
Coverage 95.95% 95.95%
=======================================
Files 84 84
Lines 3067 3067
=======================================
Hits 2943 2943
Misses 124 124
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
✅ All tests successful. No failed tests were found. 📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
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.
Generally LGTM. Just a few comments about the type annotation.
Agreed, this looks good to me. I'd like to know, however, that this change has been tested on
|
49b978f
to
d0eab69
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.
just fix the lint
Went through the upload endpoints on API:
endpoints where we want to allow tokenless: I've made sure the method uses
get_token_header()
which allowsNone
for thetoken
, which will allow tokenless requests through to the api.endpoints where we don't want to allow tokenless: I've made sure they use
get_token_header_or_fail()
which does not allowNone
, so the request will be kicked out before it gets to api. This is not required for the tokenless logic to work, but is nice to have since it prevents junk requests from clogging api.update: we are going to allow tokenless uploads on all upload related endpoints, so switched them all to
get_token_header()
.get_token_header_or_fail()
is now unused, but I'm leaving it in code for if we need to switch an endpoint back to token required.codecov/engineering-team#2300