Commit Graph

16 Commits

Author SHA1 Message Date
Benjamin Dauvergne 143decb1ef auth_saml: user default user's queryset (#51454) 2021-03-01 09:30:01 +01:00
Benjamin Dauvergne 71b3ca06c2 auth_saml: report user creation errors (#50834) 2021-02-04 11:52:00 +01:00
Benjamin Dauvergne 1c8c8117ff auth_saml: log mapping errors during user creation (#48784) 2021-02-03 20:39:39 +01:00
Benjamin Dauvergne 7e013975f7 misc: set unusable password on federated users (#48136) 2020-11-03 17:31:33 +01:00
Benjamin Dauvergne 6cd84ac407 auth_saml: always add mapping as MappingError details (#47760) 2020-10-29 00:18:25 +01:00
Frédéric Péters 9f08f5c475 auth saml: put newly created user in default OU (#46484) 2020-10-27 20:06:49 +01:00
Valentin Deniaud d2d0372b44 auth_saml: rename toggle-role action to add-role (#46857) 2020-10-26 10:25:50 +01:00
Serghei Mihai 4fed275ba3 auth_saml: raise error when no saml attribute value received (#47706) 2020-10-15 17:35:15 +02:00
Paul Marillonnet 5db2ca57e0 misc: remove deprecated py2-compatibility decorator (#45228) 2020-07-28 21:43:01 +02:00
Benjamin Dauvergne 40307f519c auth_saml: add more mapping actions in A2_ATTRIBUTE_MAPPING (#35302) 2019-08-19 16:49:12 +02:00
Benjamin Dauvergne 21257d1a55 auth_saml: implement attribute provisionning after first login (#35283)
Also fix bug in finish_create_user() where modified user was not saved.
2019-08-07 14:42:46 +02:00
Benjamin Dauvergne 9fbbf0519a spring cleaning (#32934)
* reorganize views and forms
* add copyright headers to all .py files
* fix all style errors reported by flake8
2019-05-14 16:19:25 +02:00
Paul Marillonnet f6fa7f7c56 python3: adapt exception raising and handling (#31137) 2019-03-07 13:58:28 +01:00
Benjamin Dauvergne c39ec76877 auth_saml: use utils.login() for loging in users (fixes #15300) 2017-03-07 11:01:53 +01:00
Benjamin Dauvergne e178961566 auth_saml: allow provisionning all attributes from SAML attributs (fixes #10599)
A new mellon setting named A2_ATTRIBUTE_MAPPING must be used, whose syntax is:

    MELLON_A2_ATTRIBUTE_MAPPING = [
        {
            'attribute': 'email',
            'saml_attribute': 'mail',  # value from the Name attribute of the saml:Attribute node
            'mandatory': True,  # optional boolean, if True and attribute is missing, SSO will be refused
        },
    ]
2016-05-20 12:03:03 +02:00
Benjamin Dauvergne a9eec8336f Implement beta version of SAML authentication using django-mellon (fixes #10107)
To test it, you could add to your settings:

  A2_AUTH_SAML_ENABLE = True
  MELLON_IDENTITY_PROVIDERS = [
      {
          'METADATA_URL': 'https://cresson.entrouvert.org/idp/saml2/metadata',
      }
  ]
  MELLON_ATTRIBUTE_MAPPING = {
      'email': '{attributes[email][0]',
      'first_name': '{attributes[first_name][0]}',
      'last_name': '{attributes[last_name][0]}',
  }

Requirement is that your IdP is sending 3 attributes named, email, first_name
and last_name.
2016-03-02 19:01:44 +01:00