core: fix non-expiring service accounts and app passwords#19913
core: fix non-expiring service accounts and app passwords#19913
Conversation
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19913 +/- ##
==========================================
+ Coverage 93.24% 93.26% +0.02%
==========================================
Files 968 968
Lines 53331 53332 +1
==========================================
+ Hits 49726 49738 +12
+ Misses 3605 3594 -11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-bdccc075452b025bc4744dc12312fde95a3b2170
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-bdccc075452b025bc4744dc12312fde95a3b2170Afterwards, run the upgrade commands from the latest release notes. |
We aim to fix #19911 in the next patch release, so this commit shouldn't include an API change, which is why we do it a bit awkwardly. Additionally, `serializeForm` has no typechecking for its return value (`return json as unknown as T`), and should be refactored for type safety if at all possible. There are at least two bugs we're solving in this commit: 1. Type checking fails on `serializeForm`, which results in `expires: null` POSTed in a `UserServiceAccountRequest`, where it is not allowed. The backend "correctly" returns a 400. For now we address this by returning `undefined` from `serializeForm` on a `datetime-local` input element when it is unset. 2. The schema allows for `expires: null` in `TokenModel`, but fails with a 500 when that is actually sent. For now we address this with a `None` check. (Note: this bug will not be encountered by the frontend after the change from `null` to `undefined`, but it's still nice to fix.) Both of these issues should eventually be solved by the backend handling `ExpiringModel` in an `ExpiringModelSerializer` instead of the current ad hoc way. Introduced by #19561
4543532 to
bdccc07
Compare
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
core: fix datetime (de)?serialization We aim to fix #19911 in the next patch release, so this commit shouldn't include an API change, which is why we do it a bit awkwardly. Additionally, `serializeForm` has no typechecking for its return value (`return json as unknown as T`), and should be refactored for type safety if at all possible. There are at least two bugs we're solving in this commit: 1. Type checking fails on `serializeForm`, which results in `expires: null` POSTed in a `UserServiceAccountRequest`, where it is not allowed. The backend "correctly" returns a 400. For now we address this by returning `undefined` from `serializeForm` on a `datetime-local` input element when it is unset. 2. The schema allows for `expires: null` in `TokenModel`, but fails with a 500 when that is actually sent. For now we address this with a `None` check. (Note: this bug will not be encountered by the frontend after the change from `null` to `undefined`, but it's still nice to fix.) Both of these issues should eventually be solved by the backend handling `ExpiringModel` in an `ExpiringModelSerializer` instead of the current ad hoc way. Introduced by #19561 Co-authored-by: Simonyi Gergő <gergo@goauthentik.io>
|
🍒 Cherry-pick to |
…#19913 to version-2025.12) (#19941) core: fix non-expiring service accounts and app passwords (#19913) core: fix datetime (de)?serialization We aim to fix #19911 in the next patch release, so this commit shouldn't include an API change, which is why we do it a bit awkwardly. Additionally, `serializeForm` has no typechecking for its return value (`return json as unknown as T`), and should be refactored for type safety if at all possible. There are at least two bugs we're solving in this commit: 1. Type checking fails on `serializeForm`, which results in `expires: null` POSTed in a `UserServiceAccountRequest`, where it is not allowed. The backend "correctly" returns a 400. For now we address this by returning `undefined` from `serializeForm` on a `datetime-local` input element when it is unset. 2. The schema allows for `expires: null` in `TokenModel`, but fails with a 500 when that is actually sent. For now we address this with a `None` check. (Note: this bug will not be encountered by the frontend after the change from `null` to `undefined`, but it's still nice to fix.) Both of these issues should eventually be solved by the backend handling `ExpiringModel` in an `ExpiringModelSerializer` instead of the current ad hoc way. Introduced by #19561 Co-authored-by: Dominic R <dominic@sdko.org> Co-authored-by: Simonyi Gergő <gergo@goauthentik.io>
* main: (30 commits) web/admin: fix default binding order (#19943) ci: fix test_docker.sh (#19944) lib: Add ssh/sftp schemas in to DomainlessFormattedURLValidator (#19881) core: fix non-expiring service accounts and app passwords (#19913) lifecycle/ak: make sure /data has the correct permissions (#19935) lifecycle/aws: add /data volume (#19936) website/docs: Update location of media storage and outdated references (#19885) web: bump @types/node from 25.1.0 to 25.2.0 in /web (#19923) web: bump @playwright/test from 1.58.0 to 1.58.1 in /web (#19926) web: bump the rollup group across 1 directory with 4 updates (#19922) ci: always generate API clients (#19906) providers/scim: add configuration warning for migration (#19859) core, web: update translations (#19868) core: bump gunicorn from 24.1.1 to 25.0.0 (#19916) core: bump pyjwt from 2.10.1 to 2.11.0 (#19920) core: bump cachetools from 6.2.6 to 7.0.0 (#19919) web: bump @formatjs/intl-listformat from 8.2.0 to 8.2.1 in /web (#19924) web: bump the storybook group across 1 directory with 5 updates (#19921) core: bump axllent/mailpit from v1.28.4 to v1.29.0 in /tests/e2e (#19918) core: bump goauthentik/selenium from 144.0-ak-0.35.9 to 144.0-ak-0.40.0 in /tests/e2e (#19917) ...
* main: (30 commits) web/admin: fix default binding order (#19943) ci: fix test_docker.sh (#19944) lib: Add ssh/sftp schemas in to DomainlessFormattedURLValidator (#19881) core: fix non-expiring service accounts and app passwords (#19913) lifecycle/ak: make sure /data has the correct permissions (#19935) lifecycle/aws: add /data volume (#19936) website/docs: Update location of media storage and outdated references (#19885) web: bump @types/node from 25.1.0 to 25.2.0 in /web (#19923) web: bump @playwright/test from 1.58.0 to 1.58.1 in /web (#19926) web: bump the rollup group across 1 directory with 4 updates (#19922) ci: always generate API clients (#19906) providers/scim: add configuration warning for migration (#19859) core, web: update translations (#19868) core: bump gunicorn from 24.1.1 to 25.0.0 (#19916) core: bump pyjwt from 2.10.1 to 2.11.0 (#19920) core: bump cachetools from 6.2.6 to 7.0.0 (#19919) web: bump @formatjs/intl-listformat from 8.2.0 to 8.2.1 in /web (#19924) web: bump the storybook group across 1 directory with 5 updates (#19921) core: bump axllent/mailpit from v1.28.4 to v1.29.0 in /tests/e2e (#19918) core: bump goauthentik/selenium from 144.0-ak-0.35.9 to 144.0-ak-0.40.0 in /tests/e2e (#19917) ...
Closes: #19911