Commit Graph

5048 Commits

Author SHA1 Message Date
Frédéric Péters bbffe1bb8c saml: convert querysets to proper lists (#42656) 2020-05-08 10:55:27 +02:00
Frédéric Péters 1c7ce14529 saml: deal with set attributes (#42646) 2020-05-07 23:33:12 +02:00
Frédéric Péters e882fb1722 translation update 2020-05-07 21:18:23 +02:00
Benjamin Dauvergne 9fadcd5f9d tests: GET the login page before POST, to prevent cookies message (#42280) 2020-05-07 18:37:30 +02:00
Benjamin Dauvergne 1a0e3d0c17 remove extra set_test_cookie (#42280) 2020-05-07 18:37:16 +02:00
Benjamin Dauvergne a5e372707e misc: test cookies are working in login view (#42280)
It's also tested in auth-fc login view.
2020-05-07 18:36:53 +02:00
Benjamin Dauvergne 3ab7b24503 data_transfer: use unicode_literals pragma (#42584) 2020-05-07 18:26:22 +02:00
Benjamin Dauvergne 63a9e9f8cc misc: remove computed_targeted_id attribute source (#42020) 2020-05-07 16:53:06 +02:00
Benjamin Dauvergne 8b44f67d44 idp_saml2: produce edupersontargetedid attribute (#42020)
It's produced if directly used as edupersontargetedid attribute name or
if the special nid_format "edupersontargetedid" (it's not necessary
anymore but it's kept for retrocompatibility, it's the same as transient
now but with an attribute definition automatically created in
add_attributes()).
2020-05-07 16:53:06 +02:00
Benjamin Dauvergne 012cb64ba1 idp_saml2: factorize handling of XML attribute values (#42020) 2020-05-07 16:53:06 +02:00
Benjamin Dauvergne 5e87295adc idp_saml2: do not force text on attribute tuples values (#42020) 2020-05-07 16:53:06 +02:00
Benjamin Dauvergne c0e6d5b414 idp_saml2: add helpers to make eduPersonTargetedId (#42020) 2020-05-07 16:53:06 +02:00
Benjamin Dauvergne 4b6804bcc2 idp_saml2: do not thread metadata path around (#42020) 2020-05-07 16:53:06 +02:00
Benjamin Dauvergne 37294a4a67 saml: make migration 0018 elidable and reversible (#42486) 2020-05-07 16:52:12 +02:00
Benjamin Dauvergne 0dd9c2d76f tox.ini: ignore warning between Django 1.11 and Python 3.8 (#42504) 2020-05-05 17:08:43 +02:00
Benjamin Dauvergne e0526c9895 idp_oidc: fix order of ALGO_CHOICES in migrations (#42504)
Choices should not depend on environment.
2020-05-05 17:08:43 +02:00
Benjamin Dauvergne 6099169b69 django_rbac: fix path of get_hex_uuid function (#42504) 2020-05-05 17:08:43 +02:00
Benjamin Dauvergne 1bbe96b846 saml: fix order of NAME_ID_FORMATS (#42504) 2020-05-05 17:08:43 +02:00
Benjamin Dauvergne 89f7c068da misc: use NullBooleanField for BooleanField(null=True) with Django<2 (#42504) 2020-05-05 17:08:43 +02:00
Benjamin Dauvergne 226f1f98f5 misc: add missing base_manager declarations to migrations (#42504) 2020-05-05 17:08:43 +02:00
Benjamin Dauvergne 6e18d5e62e misc: add missing blank=True to BooleanField in migrations (#42504) 2020-05-05 17:08:43 +02:00
Benjamin Dauvergne 89ca44863c misc: remove byte strings in migrations (#42504) 2020-05-05 17:08:43 +02:00
Benjamin Dauvergne ddc710af0c custom_user: remove permission view_user (#42504)
This permission was never used and it is now used by Django 2.1.
2020-05-05 17:08:43 +02:00
Benjamin Dauvergne 986a0b3ba8 tox.ini: add a check-migrations.sh script to check migrations on each run (#42504) 2020-05-05 17:08:43 +02:00
Frédéric Péters f04e7bd494 oidc idp: fix link between "do not ask again" checkbox and label (#42489) 2020-05-05 14:07:45 +02:00
Benjamin Dauvergne a5d3198f26 tox.ini: use python from environment in manage env 2020-05-05 11:53:58 +02:00
Valentin Deniaud 053200515b manager: add missing field validation (#37159) 2020-05-04 16:48:10 +02:00
Valentin Deniaud 272e3f62eb manager: add FormNeedsRequest mixin (#37159) 2020-05-04 16:48:10 +02:00
Valentin Deniaud bc84376e19 manager: remove unused RoleForm (#37159) 2020-05-04 16:48:10 +02:00
Benjamin Dauvergne 57d88538f8 debian: converge packaging between authentic2 and -multitenant packages (#42305)
* remove db-config usage
* renanme authentic2-ctl to authentic2-manage
* add systemd service file for authentic2 standalone package
* add a force-reload synonym for restart (to comply with lintian)
* remove creation of /var/run/$NAME in .postinst and .dirs
* usr %p template variable to name RuntimeDirectory in systemd service
file
* add a /var/lib/authentic2/locale directory to authentic2.dirs
* use a WORKERS variable set to 4 in authentic2.init
* remove -R flag to chown when setting user rights on
/var/lib/authentic2 (to comply with lintian)
* add handling of configuration files in /etc/authentic2/settings.d/
* use pybuild instead of python_distutils in rules
* fix check on DEFAULT_FROM_EMAIL
* rename user from authentic to authentic2
2020-05-04 12:54:46 +02:00
Benjamin Dauvergne 4382dcd634 settings: set database to pgsql named authentic2 (#42305) 2020-05-04 12:54:01 +02:00
Frédéric Péters 7e13e3120f translation update 2020-04-28 10:08:08 +02:00
Frédéric Péters ea5d25f5f0 manager: fix declaration of jsi18n URL (#42174) 2020-04-28 09:22:22 +02:00
Benjamin Dauvergne 6125597ab3 misc: do not try to support old KeyValue values (#42173)
We just truncate the table.
2020-04-28 09:21:27 +02:00
Benjamin Dauvergne 5de83bff7d misc: make OIDCUser.is_authenticated callable (#42172)
It's still necessary for DRF 3.4.0.
2020-04-28 02:03:35 +02:00
Benjamin Dauvergne 5c2c4fc7de dj22: use_for_related_fields is deprecated[2] (#41238)
We must declarer all_objects as base manager for the Attribute model,
without it we cannot load then save disabled attributes.
2020-04-28 00:17:46 +02:00
Benjamin Dauvergne b439593203 auth_fc: make user and sub relatively unique (#19959)
As we are not sure they are unique in all deployments, we make them
unique relative to a new order integer field. New federations with
FranceConnect with be forced to have the column order to be 0, making
them unique.
2020-04-27 18:09:03 +02:00
Benjamin Dauvergne 466604122e tests: use migration fixture in idp_oidc migration's tests (#19959) 2020-04-27 18:00:32 +02:00
Benjamin Dauvergne a1b527f701 tests: add a migration fixture (#19959)
To help in testing migrations.
2020-04-27 17:58:35 +02:00
Paul Marillonnet df3e0e79de tox: add django 2.2 / DRF 3.4 / DRF 3.9 test venv (#41238) 2020-04-27 16:12:58 +02:00
Benjamin Dauvergne dd80c4722d tests: fix warning about regexp syntax (#41238)
Regexps must use r'' strings.
2020-04-27 16:12:58 +02:00
Benjamin Dauvergne 1c14ad5bf7 misc: fix deprecation warning from django-filter (#41238)
MigrationNotice: `UsersAPI.filter_class` attribute should be renamed
  `filterset_class`. See:
  https://django-filter.readthedocs.io/en/master/guide/migration.html
  filterset_class = self.get_filterset_class(view, queryset)
2020-04-27 16:12:58 +02:00
Benjamin Dauvergne c41e57954f misc: fix deprecation warning (#41238)
django.utils.deprecation.RemovedInDjango30Warning: Remove the context
   parameter from MultiSelectField.from_db_value(). Support for it will be
   removed in Django 3.0.
2020-04-27 16:12:58 +02:00
Benjamin Dauvergne 1be25fc287 csv_import: fix python-attr deprecation warning (#41238)
DeprecationWarning: The usage of `cmp` is deprecated and will be
  removed on or after 2021-06-01.  Please use `eq` and `order` instead.
2020-04-27 16:12:58 +02:00
Benjamin Dauvergne 4d57434993 setup.py: allow DRF 3.9 (#41238) 2020-04-27 16:12:55 +02:00
Benjamin Dauvergne b5e2134c14 misc: prevent leak of file descriptor in CsvImporter.run() (#41238) 2020-04-27 16:12:55 +02:00
Benjamin Dauvergne 7f4094161e misc: prevent leak of file descriptors in commands (#41238)
In load-ldif, oidc-register-issuer and sync-metadata.
2020-04-27 16:12:55 +02:00
Benjamin Dauvergne 0fd28cf967 tests: fix warnings in tests (#41238)
- replace uses of assert*Equals by assert*Equal
- prevent leak of file descriptors
2020-04-27 16:12:55 +02:00
Benjamin Dauvergne 7ed991a4ba tests: rename skipUnless to skipif (#41238)
skipUnless() is the name of the equivalent functionality in unittest, in
pytest it's named skipif().
2020-04-27 16:12:55 +02:00
Benjamin Dauvergne d2b6f6669b py3: fix warning about inspect.getargspec (#41238) 2020-04-27 16:12:55 +02:00