-
Notifications
You must be signed in to change notification settings - Fork 94
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
Allow access using a Jenkins API token without an OIDC Session #386
Allow access using a Jenkins API token without an OIDC Session #386
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #386 +/- ##
============================================
+ Coverage 71.44% 72.47% +1.03%
- Complexity 232 244 +12
============================================
Files 11 12 +1
Lines 991 1021 +30
Branches 142 148 +6
============================================
+ Hits 708 740 +32
+ Misses 205 201 -4
- Partials 78 80 +2 ☔ View full report in Codecov by Sentry. |
src/main/resources/org/jenkinsci/plugins/oic/OicSecurityRealm/config.properties
Outdated
Show resolved
Hide resolved
...ources/org/jenkinsci/plugins/oic/OicSecurityRealm/help-traditionalApiTokenAccessEnabled.html
Outdated
Show resolved
Hide resolved
…config.properties Co-authored-by: Antonio Muniz <[email protected]>
Co-authored-by: Vincent Latombe <[email protected]>
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.
Looks good to me (needs spotless fixes).
src/main/resources/org/jenkinsci/plugins/oic/OicSecurityRealm/config.properties
Outdated
Show resolved
Hide resolved
I plan to merge this at the end of the day today unless anyone has an objection cc: @jenkinsci/oic-auth-plugin-developers |
Proposing a new option of the
OicSecurityRealm
that will allow an administrator to Allow access using a Jenkins API token without an OIDC Session.Currently, when using the
oic-auth
plugin, if a user explicitly logs out of the IdP then they will now longer be able to perform any sort of action usingjenkins api tokens
because theoic-auth
plugin will reject the request due to theOicSession
being null. This behavior may make sense for some users, but it can cause problems for other users who may be relying on external automation tools which make use ofjenkins api tokens
for authentication.This PR introduces a new (optional, disabled by default) configuration which lets an admin re-enable the traditional jenkins api token access behavior. This is accomplished by checking to see if a request appears to be using a valid
jenkins api token
, and if so hands of the request processing to the next filter in the chain instead of procssessing it as an OIC based access request.Testing done
new unit test has been added to validate the new functionality
Submitter checklist