core: ask for token duration on recovery link/email by admin#19875
core: ask for token duration on recovery link/email by admin#19875gergosimonyi merged 11 commits intomainfrom
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19875 +/- ##
==========================================
+ Coverage 93.01% 93.26% +0.24%
==========================================
Files 968 968
Lines 53346 53389 +43
==========================================
+ Hits 49621 49791 +170
+ Misses 3725 3598 -127
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
9954b94 to
7378f04
Compare
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-4621a9565b6844dc731069641ca93c037f186af5
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-4621a9565b6844dc731069641ca93c037f186af5Afterwards, run the upgrade commands from the latest release notes. |
7378f04 to
420cd9d
Compare
authentik/core/api/users.py
Outdated
| if token_duration: | ||
| timedelta_string_validator(token_duration) | ||
| expires = now() + timedelta_from_string(token_duration) | ||
| else: | ||
| expires = default_token_duration() |
There was a problem hiding this comment.
| if token_duration: | |
| timedelta_string_validator(token_duration) | |
| expires = now() + timedelta_from_string(token_duration) | |
| else: | |
| expires = default_token_duration() | |
| expires = default_token_duration() | |
| if token_duration: | |
| timedelta_string_validator(token_duration) | |
| expires = now() + timedelta_from_string(token_duration) |
authentik/core/api/users.py
Outdated
There was a problem hiding this comment.
use @validate instead of raw parameters and then we can get rid of manual validation
authentik/core/api/users.py
Outdated
| if not is_uuid_valid(email_stage_uuid) or not ( | ||
| email_stage := EmailStage.objects.filter(pk=email_stage_uuid).first() | ||
| ): | ||
| LOGGER.debug("Email stage does not exist") | ||
| raise ValidationError({"non_field_errors": _("Email stage does not exist.")}) | ||
| if not request.user.has_perm("authentik_stages_email.view_emailstage", email_stage): | ||
| LOGGER.debug("User has no view access to email stage") | ||
| raise ValidationError( | ||
| {"non_field_errors": _("User has no view access to email stage.")} | ||
| ) | ||
| token_duration = request.query_params.get("token_duration", "") |
There was a problem hiding this comment.
with serializer this isn't required
authentik/lib/utils/uuid.py
Outdated
|
|
||
| def is_uuid_valid(str: str): | ||
| try: | ||
| uuid.UUID(str) | ||
| return True | ||
| except ValueError: |
There was a problem hiding this comment.
should also not be needed with validator
* main: (26 commits) providers/saml: auto pull signature algorithm options (#17614) core, web: bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 in /packages/prettier-config (#19990) web: bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 in /web (#19989) stages/authenticator_webauthn: fix double JSON encoding of webauthn options (#19952) core: bump django from 5.2.10 to 5.2.11 (#19988) ci: allow setting assignee to fail (#19985) root: revert enterprise loading behaviour (#19485) web/flows: update flow background (#19974) providers/oauth2: use compare_digest for client_secret comparison (#19979) recovery: consume token in transaction (#19967) core: ask for token duration on recovery link/email by admin (#19875) core: bump aws-cdk-lib from 2.236.0 to 2.237.0 (#19958) web: bump the storybook group across 1 directory with 5 updates (#19960) core: bump library/nginx from `c881927` to `7fe5dda` in /website (#19961) core: bump gunicorn from 25.0.0 to 25.0.1 (#19959) core: bump goauthentik.io/api/v3 to 3.2026.2.0-rc1-1770129730 (#19973) lifecycle: bump shm size (#19369) crypto: Add ED25519 and ED448 support to the certificate builder (#19465) web/admin: Register stage elements. Fix linter warnings (#19948) web: bump knip from 5.82.1 to 5.83.0 in /web (#19962) ...
An updated version of #13124