Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30455

Find a way to make REST call with CAS Authentication stateful



    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 10.10-HF44
    • Fix Version/s: None
    • Component/s: Authentication
    • Tags:
    • Backlog priority:


      Currently REST call with CAS auth are stateless: the consequence is that no Cookie is set in the response and therefore an authentication needs to be done for any REST call.

      Steps to observe the problem:

      1. use the attached configuration and start Nuxeo
      2. in a private window, navigate to http://localhost:8080/nuxeo/site/api/v1/user/casuser
      3. observe that you're redirected to CAS
      4. use casuser/casuser for the credentials and submit the form
      5. observe that you're redirected to the REST URL with a "ticket" parameter and the result of the request is displayed as expected
      6. now remove the "ticket" parameter from the URL and submit it again
      7. observe that you're again redirected to CAS whereas you would expect to see the result immediately thanks to the previous authentication

      If you open the Developer tools during this scenario and look at the response headers of the request to http://localhost:8080/nuxeo/site/api/v1/user/casuser?ticket=XXX you'll see that there is no "Set-Cookie: JSESSIONID=yyy", which is the reason why a new authentication is required.

      Expected behavior: at least having a parameter to indicate that we want a stateful result when using CAS authentication in this context. It was the purpose of "needStartingURLSaving" but we had to set it to "false" to have a HTTP 302 redirection and not the default HTTP 401 with JS redirection.


          Issue Links



              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created:

                  Time Tracking

                  Original Estimate - Not Specified
                  Not Specified
                  Remaining Estimate - Not Specified
                  Not Specified
                  Time Spent - 5 minutes