Repository navigation
core: Serve interface shell for any if/admin and if/user subpath. - #23987
Conversation
✅ 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. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
9fd6ba2 to
bea310d
Compare
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-c08d70b502ca5ba8a38bf06055758153d1d564db
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-c08d70b502ca5ba8a38bf06055758153d1d564dbAfterwards, run the upgrade commands from the latest release notes. |
BeryJu
left a comment
There was a problem hiding this comment.
looks good but for the time being, as long as we aren't switching our frontend router to use this, i think i'd like this to redirect from /if/admin/foo/bar to /if/admin/#/foo/bar..?
Signed-off-by: Jens Langhammer <[email protected]>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #23987 +/- ##
=======================================
Coverage 91.36% 91.37%
=======================================
Files 1137 1137
Lines 71540 71591 +51
Branches 3875 3875
=======================================
+ Hits 65366 65417 +51
Misses 6139 6139
Partials 35 35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Teffen Ellis <[email protected]>
Details
What does this PR change?
Adds anchored catch-all routes in
authentik/core/urls.pyso any subpath under/if/admin/and/if/user/renders the same interface template as the exact prefix. Deep links like/if/admin/identity/users/42currently 404; with this change they load the SPA shell with identical access control and injected context (BrandDefaultRedirectViewis reused).Each catch-all registers after its exact sibling, so
reverse("authentik_core:if-admin"), flow, websocket, and API routes resolve exactly as before. Guard tests cover the ordering and non-shadowing cases.Why is this change needed?
Server-side prerequisite for moving the web UI from hash-based routing (
/if/admin/#/core/applications) to path-based routing (/if/admin/core/applications). The router itself lands in separate web PRs; until the interfaces start emitting path URLs, this PR has no user-visible effect.How was this tested?
New
TestInterfaceCatchAllsuite (13 tests): exact prefixes, deep subpaths, reversibility, route ordering, non-shadowing of flow/ws/API routes, andweb.pathpropagation into the shell context.uv run pytest authentik/core/tests/test_interface_views.pypasses;ruff checkandruff format --checkare clean.Linked issues
Checklist
make all)make docs)