GithubHelp home page GithubHelp logo

Comments (8)

nitmir avatar nitmir commented on June 6, 2024

Single Sign On perfectly work out of the box with django-cas-ng and jasig CAS (unless the user checked "Warn me before logging me into other sites.").

I never used mama-cas so I don't know if there is a special manipulation to do to get SSO to work.

Did you add the urls of you apps A, B, C to the list of allowed services on the CAS ?

Beware, SSO is sometimes used to refer to SIngleSignOn and sometimes to SigleSignOut cf https://wiki.jasig.org/display/CASUM/Single+Sign+Out so it can be confusing

from django-cas-ng.

rajeshyogeshwar avatar rajeshyogeshwar commented on June 6, 2024

@nitmir Can you explain the flow from client side in case of single sign on in django-cas-ng? Because at the moment I am using a cookie based solution to make it work, but I would rather prefer not to do it this way. I know I must be surely missing something in configuration.
In my case A, B, C all are on same domain, as is my CAS. If I add urls of A, B, C to CAS's list of allowed services does it mean I can drop cookie based flow? It's a bit unclear to me atm

from django-cas-ng.

nitmir avatar nitmir commented on June 6, 2024

@Rajesh-Yogeshwar If the client is already authenticated to the cas and want to access service A, the following happen :
https://A -> 302 redirect -> https://cas/login?service=A -> 302 redirect -> https://A?ticket=ST-SQjd…
In background the service A fetch https://cas/serviceValidate?service=A&ticket=ST-SQjd…
the cas responds OK if the ticket is valid and user is logged to service A, else the cas responds with an error and the user is not logged.

If the client is not authenticated to the CAS https://cas/login?service=A should display a login form, when on successful login to the cas the user is redirected to https://A?ticket=ST-SQjd…

Usually all services and the CAS are on different domains but that's not mandatory and I have a couples of services on the same domains working fine. Just be careful that a service A do not erase some cookies of service B (for example service A and B on the same domain should not use the same cookie name to handle sessions or else the user wont be able to login service A and B in the same time)

Indeed if you use the CAS to authenticate user, you should not need some shared cookies across services.

from django-cas-ng.

rajeshyogeshwar avatar rajeshyogeshwar commented on June 6, 2024

This is the kind of explanation that needs to be in readme. I am working on my dev machine and every thing is hosted on localhost. So probably because of this I am not able to get it working. Thank you for a good explanation

from django-cas-ng.

morocarlo avatar morocarlo commented on June 6, 2024

@Rajesh-Yogeshwar it is working in production? If i use different cookie session name is working?

from django-cas-ng.

rajeshyogeshwar avatar rajeshyogeshwar commented on June 6, 2024

@morocarlo Yes. I got it working. But what I did was take idea from explanation provided by @nitmir and rolled my own little solution. Its been working on my company's private applications for more than a year.

from django-cas-ng.

diegoduncan21 avatar diegoduncan21 commented on June 6, 2024

Hi, @Rajesh-Yogeshwar, i can't log in automatically with differents domains, how you do that?

from django-cas-ng.

rajeshyogeshwar avatar rajeshyogeshwar commented on June 6, 2024

@diegoduncan21 I am on same domain, only different subdomains. @nitmir has explained it how it should be done.

from django-cas-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.