Skip to content

Commit 3775ebf

Browse files
committed
feat: add password login allowlist
Bump django-helusers to allow defined usernames to log in using the password login. Refs: KK-1493
1 parent 70fd315 commit 3775ebf

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

kukkuu/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
GDPR_API_AUTHORIZATION_FIELD=(str, "authorization.permissions.scopes"),
9999
HELUSERS_BACK_CHANNEL_LOGOUT_ENABLED=(bool, False),
100100
HELUSERS_PASSWORD_LOGIN_DISABLED=(bool, False),
101+
HELUSERS_PASSWORD_LOGIN_ALLOWLIST=(list, []),
101102
TOKEN_AUTH_BROWSER_TEST_JWT_256BIT_SIGN_SECRET=(str, None),
102103
TOKEN_AUTH_BROWSER_TEST_JWT_ISSUER=(list, None),
103104
TOKEN_AUTH_BROWSER_TEST_ENABLED=(bool, False),
@@ -597,6 +598,7 @@ def sentry_before_send(event: Event, hint: Hint):
597598

598599
HELUSERS_BACK_CHANNEL_LOGOUT_ENABLED = env("HELUSERS_BACK_CHANNEL_LOGOUT_ENABLED")
599600
HELUSERS_PASSWORD_LOGIN_DISABLED = env("HELUSERS_PASSWORD_LOGIN_DISABLED")
601+
HELUSERS_PASSWORD_LOGIN_ALLOWLIST = env("HELUSERS_PASSWORD_LOGIN_ALLOWLIST")
600602

601603
# django-helusers stores access token expiration time as datetime
602604
# and needs a custom serializer to make it serializable to/from JSON:

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,9 @@ django-helsinki-health-endpoints==1.0.0 \
388388
--hash=sha256:75670113e99bfd1fc23e317a3a22cff563140f495655c2a5f6ab219389dafd52 \
389389
--hash=sha256:eebf1baa6917d7b0e11123aec191df773883102ec1653025a86d7037dba389e2
390390
# via -r requirements.in
391-
django-helusers==1.0.0 \
392-
--hash=sha256:0e33e238347a4088927675574a7dad179ee1f9d9e958daecfa4862ad6f63f79c \
393-
--hash=sha256:c18ff8ff0ff8fb72c2b802e005c680d4d477273b705a5c524aaff31c665d8e25
391+
django-helusers==1.1.0 \
392+
--hash=sha256:5d6c4d0db11db633a031cfdcef6e754fb26c167d3e179d77882c2edecca60830 \
393+
--hash=sha256:73ef1c9f3050cbb3a4f3a35264f26807f60a00b66eef31d8b07cd1ffd61de965
394394
# via
395395
# -r requirements.in
396396
# helsinki-profile-gdpr-api

0 commit comments

Comments
 (0)