jenkinsci / oic-auth-plugin

A Jenkins plugin which lets you login to Jenkins using your own, self-hosted or public openid connect server.
https://plugins.jenkins.io/oic-auth
MIT License
71 stars 88 forks source link

Add support for Microsoft AD FS #368

Closed jtnord closed 2 weeks ago

jtnord commented 1 month ago

Enable the plugin to work with AD FS which sends the user back to securityRealm/finishLogin with a HTTP Post.

Adds a Crumb exclusion extension for this endpoint. Extract any POST data provided into a fake URL so it can be fed to the google code in a way that it can work with Adds some rudimentary docs

fixes #352

Testing done

Submitter checklist

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.

Project coverage is 71.88%. Comparing base (b7205f1) to head (a08b47e). Report is 22 commits behind head on master.

Files Patch % Lines
...ain/java/org/jenkinsci/plugins/oic/OicSession.java 91.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #368 +/- ## ============================================ - Coverage 72.02% 71.88% -0.14% - Complexity 234 239 +5 ============================================ Files 11 12 +1 Lines 990 1010 +20 Branches 142 145 +3 ============================================ + Hits 713 726 +13 - Misses 199 206 +7 Partials 78 78 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jtnord commented 1 month ago

@michael-doubez the metrics for code coverage appear broken.

https://app.codecov.io/gh/jenkinsci/oic-auth-plugin/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=checks&utm_campaign=pr+comments&utm_term=jenkinsci#7dda26682abc4c20fa99de9ee4c7c0aa-L1423 is showing -0.75% coverage (src/main/java/org/jenkinsci/plugins/oic/OicSecurityRealm.java) yet this class in unchanged nor do any changes in test or production code affect it..

The base used for the diff is 11 commits behind master, yet the base for this PR is https://github.com/jtnord/oic-auth-plugin/commit/3df533875ca18afb1e96b6efbb1058e3b0751c6a which is the same as jenkinsci/master at the time of writing this.

image

image

https://app.codecov.io/gh/jenkinsci/oic-auth-plugin is having the last report as b7205f1 so this PR is being penalised for all other changes on master since that was merged.

jtnord commented 1 month ago

code coverage upload is failing on the master branch

Error: Codecov token not found. Please provide Codecov token with -t flag.
Warning: Codecov: Failed to properly create commit: The process '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov' failed with exit code 1

https://github.com/jenkinsci/oic-auth-plugin/issues/369