Skip to content

core: Serve interface shell for any if/admin and if/user subpath. - #23987

Merged
GirlBossRush merged 4 commits into
mainfrom
core/if-path-catchall
Aug 7, 2026
Merged

GirlBossRush merged 4 commits into
mainfrom
core/if-path-catchall

Conversation

@GirlBossRush

Copy link
Copy Markdown
Contributor

Details

What does this PR change?

Adds anchored catch-all routes in authentik/core/urls.py so any subpath under /if/admin/ and /if/user/ renders the same interface template as the exact prefix. Deep links like /if/admin/identity/users/42 currently 404; with this change they load the SPA shell with identical access control and injected context (BrandDefaultRedirectView is 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 TestInterfaceCatchAll suite (13 tests): exact prefixes, deep subpaths, reversibility, route ordering, non-shadowing of flow/ws/API routes, and web.path propagation into the shell context. uv run pytest authentik/core/tests/test_interface_views.py passes; ruff check and ruff format --check are clean.

Linked issues


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)

@GirlBossRush
GirlBossRush requested a review from a team as a code owner July 13, 2026 22:17
@netlify

netlify Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit c08d70b
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a752f228a29730008c6ed7f
😎 Deploy Preview https://deploy-preview-23987--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit c08d70b
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a752f22b324d500081b66d6
😎 Deploy Preview https://deploy-preview-23987--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit c08d70b
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a752f226763800008ee252f
😎 Deploy Preview https://deploy-preview-23987--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@GirlBossRush
GirlBossRush force-pushed the core/if-path-catchall branch from 9fd6ba2 to bea310d Compare July 13, 2026 22:24
@github-actions

github-actions Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

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)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

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-c08d70b502ca5ba8a38bf06055758153d1d564db

Afterwards, run the upgrade commands from the latest release notes.

@BeryJu BeryJu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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..?

Comment thread authentik/core/urls.py Resolved
Copilot AI lite review requested due to automatic review settings August 6, 2026 13:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Signed-off-by: Jens Langhammer <[email protected]>
Copilot AI review requested due to automatic review settings August 6, 2026 13:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Comment thread authentik/core/urls.py Fixed
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@codecov

codecov Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.37%. Comparing base (9787895) to head (c08d70b).
⚠️ Report is 9 commits behind head on main.
✅ All tests successful. No failed tests found.

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           
Flag Coverage Δ
conformance 34.78% <0.00%> (-0.08%) ⬇️
e2e 39.54% <0.00%> (-0.03%) ⬇️
integration 31.40% <0.00%> (-0.03%) ⬇️
rust 38.89% <ø> (ø)
unit 93.03% <100.00%> (+<0.01%) ⬆️
unit-migrate 93.06% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Teffen Ellis <[email protected]>
Copilot AI review requested due to automatic review settings August 7, 2026 01:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@GirlBossRush
GirlBossRush merged commit c3d3835 into main Aug 7, 2026
142 of 144 checks passed
@GirlBossRush
GirlBossRush deleted the core/if-path-catchall branch August 7, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants