PKG-INFO 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810
  1. Metadata-Version: 1.1
  2. Name: djangosaml2
  3. Version: 0.16.11
  4. Summary: pysaml2 integration for Django
  5. Home-page: https://github.com/knaperek/djangosaml2
  6. Author: Jozef Knaperek
  7. Author-email: lgs@yaco.es
  8. License: Apache 2.0
  9. Download-URL: https://pypi.python.org/pypi/djangosaml2
  10. Description-Content-Type: UNKNOWN
  11. Description: ===========
  12. djangosaml2
  13. ===========
  14. .. image:: https://travis-ci.org/knaperek/djangosaml2.svg?branch=master
  15. :target: https://travis-ci.org/knaperek/djangosaml2
  16. :align: left
  17. djangosaml2 is a Django application that integrates the PySAML2 library
  18. into your project. This mean that you can protect your Django based project
  19. with a service provider based on PySAML. This way it will talk SAML2 with
  20. your Identity Provider allowing you to use this authentication mechanism.
  21. This document will guide you through a few simple steps to accomplish
  22. such goal.
  23. .. contents::
  24. Installation
  25. ============
  26. PySAML2 uses xmlsec1_ binary to sign SAML assertions so you need to install
  27. it either through your operating system package or by compiling the source
  28. code. It doesn't matter where the final executable is installed because
  29. you will need to set the full path to it in the configuration stage.
  30. .. _xmlsec1: http://www.aleksey.com/xmlsec/
  31. Now you can install the djangosaml2 package using easy_install or pip. This
  32. will also install PySAML2 and its dependencies automatically.
  33. Configuration
  34. =============
  35. There are three things you need to setup to make djangosaml2 work in your
  36. Django project:
  37. 1. **settings.py** as you may already know, it is the main Django
  38. configuration file.
  39. 2. **urls.py** is the file where you will include djangosaml2 urls.
  40. 3. **pysaml2** specific files such as an attribute map directory and a
  41. certificate.
  42. Changes in the settings.py file
  43. -------------------------------
  44. The first thing you need to do is add ``djangosaml2`` to the list of
  45. installed apps::
  46. INSTALLED_APPS = (
  47. 'django.contrib.auth',
  48. 'django.contrib.contenttypes',
  49. 'django.contrib.sessions',
  50. 'django.contrib.sites',
  51. 'django.contrib.messages',
  52. 'django.contrib.admin',
  53. 'djangosaml2', # new application
  54. )
  55. Actually this is not really required since djangosaml2 does not include
  56. any data model. The only reason we include it is to be able to run
  57. djangosaml2 test suite from our project, something you should always
  58. do to make sure it is compatible with your Django version and environment.
  59. .. note::
  60. When you finish the configuration you can run the djangosaml2 test suite as
  61. you run any other Django application test suite. Just type ``python manage.py
  62. test djangosaml2``.
  63. Python 2 users need to ``pip install djangosaml2[test]`` in order to run the
  64. tests.
  65. Then you have to add the ``djangosaml2.backends.Saml2Backend``
  66. authentication backend to the list of authentications backends.
  67. By default only the ModelBackend included in Django is configured.
  68. A typical configuration would look like this::
  69. AUTHENTICATION_BACKENDS = (
  70. 'django.contrib.auth.backends.ModelBackend',
  71. 'djangosaml2.backends.Saml2Backend',
  72. )
  73. .. note::
  74. Before djangosaml2 0.5.0 this authentication backend was
  75. automatically added by djangosaml2. This turned out to be
  76. a bad idea since some applications want to use their own
  77. custom policies for authorization and the authentication
  78. backend is a good place to define that. Starting from
  79. djangosaml2 0.5.0 it is now possible to define such
  80. backends.
  81. Finally we have to tell Django what the new login url we want to use is::
  82. LOGIN_URL = '/saml2/login/'
  83. SESSION_EXPIRE_AT_BROWSER_CLOSE = True
  84. Here we are telling Django that any view that requires an authenticated
  85. user should redirect the user browser to that url if the user has not
  86. been authenticated before. We are also telling that when the user closes
  87. his browser, the session should be terminated. This is useful in SAML2
  88. federations where the logout protocol is not always available.
  89. .. note::
  90. The login url starts with ``/saml2/`` as an example but you can change that
  91. if you want. Check the section about changes in the ``urls.py``
  92. file for more information.
  93. If you want to allow several authentication mechanisms in your project
  94. you should set the LOGIN_URL option to another view and put a link in such
  95. view to the ``/saml2/login/`` view.
  96. Preferred Logout binding
  97. ------------------------
  98. Use the following setting to choose your preferred binding for SP initiated logout requests::
  99. SAML_LOGOUT_REQUEST_PREFERRED_BINDING
  100. For example::
  101. import saml2
  102. SAML_LOGOUT_REQUEST_PREFERRED_BINDING = saml2.BINDING_HTTP_POST
  103. Changes in the urls.py file
  104. ---------------------------
  105. The next thing you need to do is to include ``djangosaml2.urls`` module in your
  106. main ``urls.py`` module::
  107. urlpatterns = patterns(
  108. '',
  109. # lots of url definitions here
  110. (r'^saml2/', include('djangosaml2.urls')),
  111. # more url definitions
  112. )
  113. As you can see we are including ``djangosaml2.urls`` under the *saml2*
  114. prefix. Feel free to use your own prefix but be consistent with what
  115. you have put in the ``settings.py`` file in the LOGIN_URL parameter.
  116. PySAML2 specific files and configuration
  117. ----------------------------------------
  118. Once you have finished configuring your Django project you have to
  119. start configuring PySAML. If you use just that library you have to
  120. put your configuration options in a file and initialize PySAML2 with
  121. the path to that file.
  122. In djangosaml2 you just put the same information in the Django
  123. settings.py file under the SAML_CONFIG option.
  124. We will see a typical configuration for protecting a Django project::
  125. from os import path
  126. import saml2
  127. import saml2.saml
  128. BASEDIR = path.dirname(path.abspath(__file__))
  129. SAML_CONFIG = {
  130. # full path to the xmlsec1 binary programm
  131. 'xmlsec_binary': '/usr/bin/xmlsec1',
  132. # your entity id, usually your subdomain plus the url to the metadata view
  133. 'entityid': 'http://localhost:8000/saml2/metadata/',
  134. # directory with attribute mapping
  135. 'attribute_map_dir': path.join(BASEDIR, 'attribute-maps'),
  136. # this block states what services we provide
  137. 'service': {
  138. # we are just a lonely SP
  139. 'sp' : {
  140. 'name': 'Federated Django sample SP',
  141. 'name_id_format': saml2.saml.NAMEID_FORMAT_PERSISTENT,
  142. 'endpoints': {
  143. # url and binding to the assetion consumer service view
  144. # do not change the binding or service name
  145. 'assertion_consumer_service': [
  146. ('http://localhost:8000/saml2/acs/',
  147. saml2.BINDING_HTTP_POST),
  148. ],
  149. # url and binding to the single logout service view
  150. # do not change the binding or service name
  151. 'single_logout_service': [
  152. ('http://localhost:8000/saml2/ls/',
  153. saml2.BINDING_HTTP_REDIRECT),
  154. ('http://localhost:8000/saml2/ls/post',
  155. saml2.BINDING_HTTP_POST),
  156. ],
  157. },
  158. # attributes that this project need to identify a user
  159. 'required_attributes': ['uid'],
  160. # attributes that may be useful to have but not required
  161. 'optional_attributes': ['eduPersonAffiliation'],
  162. # in this section the list of IdPs we talk to are defined
  163. 'idp': {
  164. # we do not need a WAYF service since there is
  165. # only an IdP defined here. This IdP should be
  166. # present in our metadata
  167. # the keys of this dictionary are entity ids
  168. 'https://localhost/simplesaml/saml2/idp/metadata.php': {
  169. 'single_sign_on_service': {
  170. saml2.BINDING_HTTP_REDIRECT: 'https://localhost/simplesaml/saml2/idp/SSOService.php',
  171. },
  172. 'single_logout_service': {
  173. saml2.BINDING_HTTP_REDIRECT: 'https://localhost/simplesaml/saml2/idp/SingleLogoutService.php',
  174. },
  175. },
  176. },
  177. },
  178. },
  179. # where the remote metadata is stored
  180. 'metadata': {
  181. 'local': [path.join(BASEDIR, 'remote_metadata.xml')],
  182. },
  183. # set to 1 to output debugging information
  184. 'debug': 1,
  185. # Signing
  186. 'key_file': path.join(BASEDIR, 'mycert.key'), # private part
  187. 'cert_file': path.join(BASEDIR, 'mycert.pem'), # public part
  188. # Encryption
  189. 'encryption_keypairs': [{
  190. 'key_file': path.join(BASEDIR, 'my_encryption_key.key'), # private part
  191. 'cert_file': path.join(BASEDIR, 'my_encryption_cert.pem'), # public part
  192. }],
  193. # own metadata settings
  194. 'contact_person': [
  195. {'given_name': 'Lorenzo',
  196. 'sur_name': 'Gil',
  197. 'company': 'Yaco Sistemas',
  198. 'email_address': 'lgs@yaco.es',
  199. 'contact_type': 'technical'},
  200. {'given_name': 'Angel',
  201. 'sur_name': 'Fernandez',
  202. 'company': 'Yaco Sistemas',
  203. 'email_address': 'angel@yaco.es',
  204. 'contact_type': 'administrative'},
  205. ],
  206. # you can set multilanguage information here
  207. 'organization': {
  208. 'name': [('Yaco Sistemas', 'es'), ('Yaco Systems', 'en')],
  209. 'display_name': [('Yaco', 'es'), ('Yaco', 'en')],
  210. 'url': [('http://www.yaco.es', 'es'), ('http://www.yaco.com', 'en')],
  211. },
  212. 'valid_for': 24, # how long is our metadata valid
  213. }
  214. .. note::
  215. Please check the `PySAML2 documentation`_ for more information about
  216. these and other configuration options.
  217. .. _`PySAML2 documentation`: http://pysaml2.readthedocs.io/en/latest/
  218. There are several external files and directories you have to create according
  219. to this configuration.
  220. The xmlsec1 binary was mentioned in the installation section. Here, in the
  221. configuration part you just need to put the full path to xmlsec1 so PySAML2
  222. can call it as it needs.
  223. The ``attribute_map_dir`` points to a directory with attribute mappings that
  224. are used to translate user attribute names from several standards. It's usually
  225. safe to just copy the default PySAML2 attribute maps that you can find in the
  226. ``tests/attributemaps`` directory of the source distribution.
  227. The ``metadata`` option is a dictionary where you can define several types of
  228. metadata for remote entities. Usually the easiest type is the ``local`` where
  229. you just put the name of a local XML file with the contents of the remote
  230. entities metadata. This XML file should be in the SAML2 metadata format.
  231. The ``key_file`` and ``cert_file`` options reference the two parts of a
  232. standard x509 certificate. You need it to sign your metadata. For assertion
  233. encryption/decryption support please configure another set of ``key_file`` and
  234. ``cert_file``, but as inner attributes of ``encryption_keypairs`` option.
  235. .. note::
  236. Check your openssl documentation to generate a test certificate but don't
  237. forget to order a real one when you go into production.
  238. Custom and dynamic configuration loading
  239. ........................................
  240. By default, djangosaml2 reads the pysaml2 configuration options from the
  241. SAML_CONFIG setting but sometimes you want to read this information from
  242. another place, like a file or a database. Sometimes you even want this
  243. configuration to be different depending on the request.
  244. Starting from djangosaml2 0.5.0 you can define your own configuration
  245. loader which is a callable that accepts a request parameter and returns
  246. a saml2.config.SPConfig object. In order to do so you set the following
  247. setting::
  248. SAML_CONFIG_LOADER = 'python.path.to.your.callable'
  249. User attributes
  250. ---------------
  251. In the SAML 2.0 authentication process the Identity Provider (IdP) will
  252. send a security assertion to the Service Provider (SP) upon a successful
  253. authentication. This assertion contains attributes about the user that
  254. was authenticated. It depends on the IdP configuration what exact
  255. attributes are sent to each SP it can talk to.
  256. When such assertion is received on the Django side it is used to find a Django
  257. user and create a session for it. By default djangosaml2 will do a query on the
  258. User model with the USERNAME_FIELD_ attribute but you can change it to any
  259. other attribute of the User model. For example, you can do this lookup using
  260. the 'email' attribute. In order to do so you should set the following setting::
  261. SAML_DJANGO_USER_MAIN_ATTRIBUTE = 'email'
  262. .. _USERNAME_FIELD: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD
  263. Please, use an unique attribute when setting this option. Otherwise
  264. the authentication process may fail because djangosaml2 will not know
  265. which Django user it should pick.
  266. If your main attribute is something inherently case-insensitive (such as
  267. an email address), you may set::
  268. SAML_DJANGO_USER_MAIN_ATTRIBUTE_LOOKUP = '__iexact'
  269. (This is simply appended to the main attribute name to form a Django
  270. query. Your main attribute must be unique even given this lookup.)
  271. Another option is to use the SAML2 name id as the username by setting::
  272. SAML_USE_NAME_ID_AS_USERNAME = True
  273. You can configure djangosaml2 to create such user if it is not already in
  274. the Django database or maybe you don't want to allow users that are not
  275. in your database already. For this purpose there is another option you
  276. can set in the settings.py file::
  277. SAML_CREATE_UNKNOWN_USER = True
  278. This setting is True by default.
  279. ACS_DEFAULT_REDIRECT_URL = reverse_lazy('some_url_name')
  280. This setting lets you specify a URL for redirection after a successful
  281. authentication. Particularly useful when you only plan to use
  282. IdP initiated login and the IdP does not have a configured RelayState
  283. parameter. The default is ``/``.
  284. The other thing you will probably want to configure is the mapping of
  285. SAML2 user attributes to Django user attributes. By default only the
  286. User.username attribute is mapped but you can add more attributes or
  287. change that one. In order to do so you need to change the
  288. SAML_ATTRIBUTE_MAPPING option in your settings.py::
  289. SAML_ATTRIBUTE_MAPPING = {
  290. 'uid': ('username', ),
  291. 'mail': ('email', ),
  292. 'cn': ('first_name', ),
  293. 'sn': ('last_name', ),
  294. }
  295. where the keys of this dictionary are SAML user attributes and the values
  296. are Django User attributes.
  297. If you are using Django user profile objects to store extra attributes
  298. about your user you can add those attributes to the SAML_ATTRIBUTE_MAPPING
  299. dictionary. For each (key, value) pair, djangosaml2 will try to store the
  300. attribute in the User model if there is a matching field in that model.
  301. Otherwise it will try to do the same with your profile custom model. For
  302. multi-valued attributes only the first value is assigned to the destination field.
  303. Alternatively, custom processing of attributes can be achieved by setting the
  304. value(s) in the SAML_ATTRIBUTE_MAPPING, to name(s) of method(s) defined on a
  305. custom django User object. In this case, each method is called by djangosaml2,
  306. passing the full list of attribute values extracted from the <saml:AttributeValue>
  307. elements of the <saml:Attribute>. Among other uses, this is a useful way to process
  308. multi-valued attributes such as lists of user group names.
  309. For example:
  310. Saml assertion snippet::
  311. <saml:Attribute Name="groups" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
  312. <saml:AttributeValue>group1</saml:AttributeValue>
  313. <saml:AttributeValue>group2</saml:AttributeValue>
  314. <saml:AttributeValue>group3</saml:AttributeValue>
  315. </saml:Attribute>
  316. Custom User object::
  317. from django.contrib.auth.models import AbstractUser
  318. class User(AbstractUser):
  319. def process_groups(self, groups):
  320. // process list of group names in argument 'groups'
  321. pass;
  322. settings.py::
  323. SAML_ATTRIBUTE_MAPPING = {
  324. 'groups': ('process_groups', ),
  325. }
  326. Learn more about Django profile models at:
  327. https://docs.djangoproject.com/en/dev/topics/auth/customizing/#substituting-a-custom-user-model
  328. Sometimes you need to use special logic to update the user object
  329. depending on the SAML2 attributes and the mapping described above
  330. is simply not enough. For these cases djangosaml2 provides a Django
  331. signal that you can listen to. In order to do so you can add the
  332. following code to your app::
  333. from djangosaml2.signals import pre_user_save
  334. def custom_update_user(sender=User, instance, attributes, user_modified, **kargs)
  335. ...
  336. return True # I modified the user object
  337. Your handler will receive the user object, the list of SAML attributes
  338. and a flag telling you if the user is already modified and need
  339. to be saved after your handler is executed. If your handler
  340. modifies the user object it should return True. Otherwise it should
  341. return False. This way djangosaml2 will know if it should save
  342. the user object so you don't need to do it and no more calls to
  343. the save method are issued.
  344. IdP setup
  345. =========
  346. Congratulations, you have finished configuring the SP side of the federation.
  347. Now you need to send the entity id and the metadata of this new SP to the
  348. IdP administrators so they can add it to their list of trusted services.
  349. You can get this information starting your Django development server and
  350. going to the http://localhost:8000/saml2/metadata url. If you have included
  351. the djangosaml2 urls under a different url prefix you need to correct this
  352. url.
  353. SimpleSAMLphp issues
  354. --------------------
  355. As of SimpleSAMLphp 1.8.2 there is a problem if you specify attributes in
  356. the SP configuration. When the SimpleSAMLphp metadata parser converts the
  357. XML into its custom php format it puts the following option::
  358. 'attributes.NameFormat' => 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri'
  359. But it need to be replaced by this one::
  360. 'AttributeNameFormat' => 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri'
  361. Otherwise the Assertions sent from the IdP to the SP will have a wrong
  362. Attribute Name Format and pysaml2 will be confused.
  363. Furthermore if you have a AttributeLimit filter in your SimpleSAMLphp
  364. configuration you will need to enable another attribute filter just
  365. before to make sure that the AttributeLimit does not remove the attributes
  366. from the authentication source. The filter you need to add is an AttributeMap
  367. filter like this::
  368. 10 => array(
  369. 'class' => 'core:AttributeMap', 'name2oid'
  370. ),
  371. Testing
  372. =======
  373. One way to check if everything is working as expected is to enable the
  374. following url::
  375. urlpatterns = patterns(
  376. '',
  377. # lots of url definitions here
  378. (r'^saml2/', include('djangosaml2.urls')),
  379. (r'^test/', 'djangosaml2.views.echo_attributes'),
  380. # more url definitions
  381. )
  382. Now if you go to the /test/ url you will see your SAML attributes and also
  383. a link to do a global logout.
  384. You can also run the unit tests with the following command::
  385. python tests/run_tests.py
  386. If you have `tox`_ installed you can simply call tox inside the root directory
  387. and it will run the tests in multiple versions of Python.
  388. .. _`tox`: http://pypi.python.org/pypi/tox
  389. FAQ
  390. ===
  391. **Why can't SAML be implemented as an Django Authentication Backend?**
  392. well SAML authentication is not that simple as a set of credentials you can
  393. put on a login form and get a response back. Actually the user password is
  394. not given to the service provider at all. This is by design. You have to
  395. delegate the task of authentication to the IdP and then get an asynchronous
  396. response from it.
  397. Given said that, djangosaml2 does use a Django Authentication Backend to
  398. transform the SAML assertion about the user into a Django user object.
  399. **Why not put everything in a Django middleware class and make our lifes
  400. easier?**
  401. Yes, that was an option I did evaluate but at the end the current design
  402. won. In my opinion putting this logic into a middleware has the advantage
  403. of making it easier to configure but has a couple of disadvantages: first,
  404. the middleware would need to check if the request path is one of the
  405. SAML endpoints for every request. Second, it would be too magical and in
  406. case of a problem, much harder to debug.
  407. **Why not call this package django-saml as many other Django applications?**
  408. Following that pattern then I should import the application with
  409. import saml but unfortunately that module name is already used in pysaml2.
  410. Changes
  411. =======
  412. 0.16.11 (2017-12-25)
  413. ----------
  414. - Dropped compatibility for Python < 2.7 and Django < 1.8.
  415. - Added a clean_attributes hook allowing backends to restructure attributes extracted from SAML response.
  416. - Log when fields are missing in a SAML response.
  417. - Log when attribute_mapping maps to nonexistent User fields.
  418. - Multiple compatibility fixes and other minor improvements and code cleanups
  419. Thanks to francoisfreitag, mhindery, charn, jdufresne
  420. 0.16.10 (2017-10-02)
  421. -------------------
  422. - Bugfixes and internal refactorings.
  423. - Added support for custom USERNAME_FIELD on custom User models. Many thanks to francoisfreitag.
  424. 0.16.9 (2017-09-19)
  425. -------------------
  426. - Bugfixes and minor improvements. Thanks to goetzk and AmbientLighter.
  427. - Added option SAML_LOGOUT_REQUEST_PREFERRED_BINDING
  428. - Added Django 1.11 to tox.
  429. 0.16.4 (2017-09-11)
  430. -------------------
  431. - Added support for SHA-256 signing. Thanks to WebSpider.
  432. - Bugfixes. Thanks to justinsg and charn.
  433. - Error handling made more extensible. This will be further improved in next versions.
  434. 0.16.1 (2017-07-15)
  435. -------------------
  436. - Bugfixes. Thanks to canni, AmbientLighter, cranti and logston.
  437. - request is now passed to authentication backend (introduced in Django 1.11). Thanks to terite.
  438. 0.16.0 (2017-04-14)
  439. -------------------
  440. - Upgrade pysaml2 dependency to version 4.4.0 which fixes some serialization issues. Thanks to nakato for the report.
  441. - Added support for HTTP Redirect binding with signed authentication requests. Many thanks to liquidpele for this feature and other related refactorings.
  442. - The custom permission_denied.html template was removed in favor of standard PermissionDenied exception. Thanks to mhindery.
  443. 0.15.0 (2016-12-18)
  444. -------------------
  445. - Python 3.5 support. Thanks to timheap.
  446. - Added support for callable user attributes. Thanks to andy-miracl and joetsoi.
  447. - Security improvement: "next" URL is now checked. thanks to flupzor.
  448. - Improved testability. Thanks to flupzor.
  449. - Other bugfixes and minor improvements. Thanks to jamaalscarlett, ws0w, jaywink and liquidpele.
  450. 0.14.5 (2016-09-19)
  451. -------------------
  452. - Django 1.10 support. Thanks to inducer.
  453. - Various fixes and minor improvements. Thanks to ajsmilutin, ganiserb, inducer, grunichev, liquidpele and darbula
  454. 0.14.4 (2016-03-29)
  455. -------------------
  456. - Fix compatibility issue with pysaml2-4.0.3+. Thanks to jimr and astoltz.
  457. - Fix Django 1.9 compatibility issue in templates. Thanks to nikoskal.
  458. 0.14.3 (2016-03-18)
  459. -------------------
  460. - Upgraded to pysaml2-4.0.5.
  461. - Added 'ACS_DEFAULT_REDIRECT_URL' setting for default redirection after successful authentication. Thanks to ganiserb.
  462. 0.14.2 (2016-03-11)
  463. -------------------
  464. - Released under the original 'djangosaml2' package name; abandoning the djangosaml2-knaperek fork.
  465. 0.14.1 (2016-03-09)
  466. -------------------
  467. - Upgraded to pysaml2-4.0.4.
  468. 0.14.0 (2016-01-28)
  469. -------------------
  470. - Upgrade to pysaml2-4.0.2. Thanks to kviktor
  471. - Django 1.9 support. Thanks to Jordi Gutiérrez Hermoso
  472. 0.13.2 (2015-06-24)
  473. -------------------
  474. - Improved usage of standard Python logging.
  475. 0.13.1 (2015-06-05)
  476. -------------------
  477. - Added support for djangosaml2 specific user model defined by SAML_USER_MODEL setting
  478. 0.13.0 (2015-02-12)
  479. -------------------
  480. - Django 1.7 support. Thanks to Kamei Toshimitsu
  481. 0.12.0 (2014-11-18)
  482. -------------------
  483. - Pysaml2 2.2.0 support. Thanks to Erick Tryzelaar
  484. 0.11.0 (2014-06-15)
  485. -------------------
  486. - Django 1.5 custom user model support. Thanks to Jos van Velzen
  487. - Django 1.5 compatibility url template tag. Thanks to bula
  488. - Support Django 1.5 and 1.6. Thanks to David Evans and Justin Quick
  489. 0.10.0 (2013-05-05)
  490. -------------------
  491. - Check that RelayState is not empty before redirecting into a loop. Thanks
  492. to Sam Bull for reporting this issue.
  493. - In the global logout process, when the session is lost, report an error
  494. message to the user and perform a local logout.
  495. 0.9.2 (2013-04-19)
  496. ------------------
  497. - Upgrade to pysaml2-0.4.3.
  498. 0.9.1 (2013-01-29)
  499. ------------------
  500. - Add a method to the authentication backend so it is possible
  501. to customize the authorization based on SAML attributes.
  502. 0.9.0 (2012-10-30)
  503. ------------------
  504. - Add a signal for modifying the user just before saving it on
  505. the update_user method of the authentication backend.
  506. 0.8.1 (2012-10-29)
  507. ------------------
  508. - Trim the SAML attributes before setting them to the Django objects
  509. if they are too long. This fixes a crash with MySQL.
  510. 0.8.0 (2012-10-25)
  511. ------------------
  512. - Allow to use different attributes besides 'username' to look for
  513. existing users.
  514. 0.7.0 (2012-10-19)
  515. ------------------
  516. - Add a setting to decide if the user should be redirected to the
  517. next view or shown an authorization error when the user tries to
  518. login twice.
  519. 0.6.1 (2012-09-03)
  520. ------------------
  521. - Remove Django from our dependencies
  522. - Restore support for Django 1.3
  523. 0.6.0 (2012-08-29)
  524. ------------------
  525. - Add tox support configured to run the tests with Python 2.6 and 2.7
  526. - Fix some dependencies and sdist generation. Lorenzo Gil
  527. - Allow defining a logout redirect url in the settings. Lorenzo Gil
  528. - Add some logging calls to improve debugging. Lorenzo Gil
  529. - Add support for custom conf loading function. Sam Bull.
  530. - Make the tests more robust and easier to run when djangosaml2 is
  531. included in a Django project. Sam Bull.
  532. - Make sure the profile is not None before saving it. Bug reported by
  533. Leif Johansson
  534. 0.5.0 (2012-05-22)
  535. ------------------
  536. - Allow defining custom config loaders. They can be dynamic depending on
  537. the request.
  538. - Do not automatically add the authentication backend. This way
  539. we allow other people to add their own backends.
  540. - Support for additional attributes other than the ones that get mapped
  541. into the User model. Those attributes get stored in the UserProfile model.
  542. 0.4.2 (2012-03-23)
  543. ------------------
  544. - Fix a crash in the idplist templatetag about using an old pysaml2 function
  545. - Added a test for the previous crash
  546. 0.4.1 (2012-03-19)
  547. ------------------
  548. - Upgrade pysaml2 dependency to version 0.4.1
  549. 0.4.0 (2012-03-18)
  550. ------------------
  551. - Upgrade pysaml2 dependency to version 0.4.0 (update our tests as a result
  552. of this)
  553. - Add logging calls to make debugging easier
  554. - Use the Django configured logger in pysaml2
  555. 0.3.3 (2012-02-14)
  556. ------------------
  557. - Freeze the version of pysaml2 since we are not (yet!) compatible with
  558. version 0.4.0
  559. 0.3.2 (2011-12-13)
  560. ------------------
  561. - Avoid a crash when reading the SAML attribute that maps to the Django
  562. username
  563. 0.3.1 (2011-12-01)
  564. ------------------
  565. - Load the config in the render method of the idplist templatetag to
  566. make it more flexible and reentrant.
  567. 0.3.0 (2011-11-30)
  568. ------------------
  569. - Templatetag to get the list of available idps.
  570. - Allow to map the same SAML attribute into several Django field.
  571. 0.2.4 (2011-11-29)
  572. ------------------
  573. - Fix restructured text bugs that made pypi page looks bad.
  574. 0.2.3 (2011-06-14)
  575. ------------------
  576. - Set a unusable password when the user is created for the first time
  577. 0.2.2 (2011-06-07)
  578. ------------------
  579. - Prevent infinite loop when going to the /saml2/login/ endpoint and the user
  580. is already logged in and the settings.LOGIN_REDIRECT_URL is (badly) pointing
  581. to /saml2/login.
  582. 0.2.1 (2011-05-09)
  583. ------------------
  584. - If no next parameter is supplied to the login view, use the
  585. settings.LOGIN_REDIRECT_URL as default
  586. 0.2.0 (2011-04-26)
  587. ------------------
  588. - Python 2.4 compatible if the elementtree library is installed
  589. - Allow post processing after the authentication phase by using
  590. Django signals.
  591. 0.1.1 (2011-04-18)
  592. ------------------
  593. - Simple view to echo SAML attributes
  594. - Improve documentation
  595. - Change default behaviour when a new user is created. Now their attributes
  596. are filled this first time
  597. - Allow to set a next page after the logout
  598. 0.1.0 (2011-03-16)
  599. ------------------
  600. - Emancipation from the pysaml package
  601. Keywords: django,pysaml2,sso,saml2,federated authentication,authentication
  602. Platform: UNKNOWN
  603. Classifier: Development Status :: 4 - Beta
  604. Classifier: Environment :: Web Environment
  605. Classifier: Framework :: Django
  606. Classifier: Framework :: Django :: 1.8
  607. Classifier: Framework :: Django :: 1.9
  608. Classifier: Framework :: Django :: 1.10
  609. Classifier: Framework :: Django :: 1.11
  610. Classifier: Intended Audience :: Developers
  611. Classifier: License :: OSI Approved :: Apache Software License
  612. Classifier: Operating System :: OS Independent
  613. Classifier: Programming Language :: Python
  614. Classifier: Programming Language :: Python :: 2
  615. Classifier: Programming Language :: Python :: 2.7
  616. Classifier: Programming Language :: Python :: 3
  617. Classifier: Programming Language :: Python :: 3.3
  618. Classifier: Programming Language :: Python :: 3.4
  619. Classifier: Programming Language :: Python :: 3.5
  620. Classifier: Programming Language :: Python :: 3.6
  621. Classifier: Topic :: Internet :: WWW/HTTP
  622. Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
  623. Classifier: Topic :: Security
  624. Classifier: Topic :: Software Development :: Libraries :: Application Frameworks