Skip to content
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

Upgrading to Jenkins 2.160 breaks CAS logins #9

Closed
danschmidt5189 opened this issue Jan 16, 2019 · 9 comments
Closed

Upgrading to Jenkins 2.160 breaks CAS logins #9

danschmidt5189 opened this issue Jan 16, 2019 · 9 comments
Assignees

Comments

@danschmidt5189
Copy link

danschmidt5189 commented Jan 16, 2019

Upgrading to Jenkins 2.160 (from 2.159) causes CAS logins to fail with an infinite loop, as Jenkins does not respect the result of the authorization flow. To reproduce:

  • Start with a working Jenkins 2.159 and CAS Plugin
  • Upgrade to Jenkins 2.160
  • Try logging back in and observe that you're thrown into an infinite loop

Note:

  • I'm running Jenkins behind nginx.
  • This update procedure has never previously failed.
  • Jenkins 2.160 introduces an obvious related change.
  • The problem persists even after clearing cookies.
  • Downgrading from 2.160 to 2.159 fixes the problem.
@danschmidt5189 danschmidt5189 changed the title Upgrading to Jenkins 2.60 breaks CAS logins Upgrading to Jenkins 2.160 breaks CAS logins Jan 17, 2019
@kgeis
Copy link

kgeis commented Jan 17, 2019

I am having the same issue.

differences:

  • Apache as reverse proxy
  • running 2.150.2 LTS (just upgraded this morning); 2.160 security fix was backported to 2.150
  • downgrading to 2.150.1 fixes the problem

@ToeBee
Copy link

ToeBee commented Jan 17, 2019

Same problem after after upgrading from 2.150.1 to 2.150.2 last night.
The exchange goes like this:

  • GET / -> 403 Forbidden
  • GET /securityRealm/commenceLogin -> 302 to CAS server
  • CAS login successful, 302 back to Jenkins
  • GET /securityRealm/finishLogin?ticket=xxxxxx -> 302 back to /
  • GET / -> 403 Forbidden
  • Repeat

I don't see anything happening in the Jenkins log file while this is going on.

@fcrespel
Copy link
Owner

Thanks for the notice. This issue is related to the SECURITY-901 fix in Jenkins. I'll try to implement the necessary adjustments in CAS plugin ASAP, until then you can either downgrade Jenkins or apply the workaround described in the Upgrade Guide.

@ToeBee
Copy link

ToeBee commented Jan 18, 2019

Ah, the upgrade guide did not mention this when I looked yesterday. Unfortunately the workaround of setting that Java property does not seem to fix it for me. But we can stay at .1 for now.

@ToeBee
Copy link

ToeBee commented Jan 18, 2019

Turns out, there was a typo in the property name on the release notes. Someone updated the wiki page and release notes and things are working for me on .2 now. Just need to remember to unset the property after the CAS plugin is updated :)

@fcrespel
Copy link
Owner

The fix for this issue is available in jenkinsci#2, but before I release it could you please try the test build available on the CI server? (get cas-plugin.hpi, rename it to cas-plugin.jpi, put it in your Jenkins plugins folder and restart).

@tanrobotix
Copy link

@fcrespel I've tested. It's run OK. Thank you so much for you fixing.
image
Please release it in Jenkins Plugin market. Thank you

@Wadeck
Copy link

Wadeck commented Jan 21, 2019

get cas-plugin.hpi, rename it to cas-plugin.jpi, put it in your Jenkins plugins folder and restart

Not even required to rename, the hpi files are also correctly handled :)

@fcrespel fcrespel self-assigned this Jan 21, 2019
@fcrespel
Copy link
Owner

Thanks for the feedback, CAS plugin version 1.4.3 is now released. It may take a few hours to appear in the Update Center, until then you can grab it from the Maven repository.

fcrespel added a commit that referenced this issue Jun 29, 2021
Add option to customize validation URL params
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants