24

Which CAS implementation should i use to enable CAS single sign on to my django app (trusing a specified CAS server, I'm not interested in creating a CAS provider) ? What I can find are the following:

I've used django-cas before, and it seems to work but seems kind of abandoned? django-cas-consumer at least seems to have more recent activity.

What are the actual pros and cons of each implementation? Are there other implementations I should use?

1
  • 2
    I haven't worked with CAS directly, or any of the Django CAS implementations, but my university (Columbia) uses their own derivative of CAS called WIND. My understanding is that WIND was developed as a fork of CAS back before CAS supported group affiliations, which Columbia needed. The basic authentication step is pretty much the same though. So, if you're looking at options, I might suggest adding my djangowind implementation to the list: github.com/thraxil/djangowind Adapting it back to CAS compliance might be a possibility (I can vouch for djangowind being very flexible and tested).
    – thraxil
    Nov 12, 2009 at 20:08

5 Answers 5

9

I've been using an older version of django-cas for a long time now, and it works as expected. I've never used django-cas-consumer, but I've looked into it.

Comparing the code between the two projects, it looks like django-cas-consumer is a stripped-down version of django-cas.

The two most glaring differences are:

  • django-cas-consumer only supports CAS version 1
  • django-cas has middleware that captures any requests to the django.contrib.auth.views.login and logout and redirects them to the CAS login and logout views

Also, if you are using Apache, you can consider using mod_auth_cas, which is an official CAS client. Then you can simply use django's remote user authentication.

9

Django-cas was missing features we needed, so we rolled our own: http://github.com/KTHse/django-cas2

1
  • 1
    there is no support for Python 3, nor CAS 3+ May 19, 2015 at 12:47
8

If someone still interesting CAS on django. Please try the most latest and active maintained version of django cas: django-cas-ng:

pip install django-cas-ng

django-cas-ng is CAS (Central Authentication Service) client implementation. This project inherit from django-cas. django-cas is not updated since 2013-4-1. This project will include new bugfix and new feature development. It have more features:

  • Supports CAS_ versions 1.0, 2.0 and 3.0.
  • Support Single Sign Out
  • Supports Token auth schemes
  • Can fetch Proxy Granting Ticket
  • Supports Django 2.0, 2.1, 2.2 and 3.0
  • Supports using a User custom model
  • Supports Python 3.5+

see document at https://djangocas.dev/docs/

4

Low activity does not necessarily mean that product is not good enough. It might be the case that the product has reached a stable state. Probably, you should confirm it with the developer. Personally, I would go for a stable system over one which shows lot of activity (especially if the activity is bug-fixing )

1
  • 5
    That might be true to standalone components but since it is to be used with Django, it is important for it to keep up with the latest Django releases. There are some backwards-incompatible changes from time to time...
    – glarrain
    Aug 6, 2012 at 15:33
3

The kstateome/django-cas repo is more active recently (2015) with following details.

Requirements

  • Current version: 1.1.1
  • Django 1.5 or above,
  • Python 2.6, 2.7, 3.4

Features

This is K-State's fork of the original and includes several additional features as well as features merged from

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.