Repository navigation
core: allow launch URLs relative to the current host - #27632
Merged
Merged
Conversation
✅ Deploy Preview for authentik-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
BeryJu
approved these changes
Nov 5, 2026
dewi-tik
approved these changes
Nov 5, 2026
Contributor
Author
|
Do we need more work on this one? 🙂 |
# Conflicts: # authentik/core/tests/test_applications_api.py
…e/relative-launch-url
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #27632 +/- ##
==========================================
- Coverage 93.12% 93.09% -0.03%
==========================================
Files 1238 1238
Lines 86901 86942 +41
Branches 4894 4894
==========================================
+ Hits 80923 80938 +15
- Misses 5891 5917 +26
Partials 87 87
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
dominic-r
approved these changes
Nov 19, 2026
GirlBossRush
approved these changes
Nov 19, 2026
kensternberg-authentik
added a commit
that referenced
this pull request
Nov 19, 2026
* main: core: allow launch URLs relative to the current host (#27632) website/releases: 2026.11: benchmaxxing (#27796) core: bump goauthentik/fips-python from `72f6e14` to `8fd04de` in /lifecycle/container (#27920) root: require Node.js 24.22.3 (#27906) admin/files, core: read the cached icon URLs of a list in one query (#27695) core: bump pnpm to 12.22.0 everywhere (#27905) web/elements: fix the wizard next button staying disabled (#27660) events, tasks: speed up the event and task queries (#27692) core: bump the pnpm group across 2 directories with 1 update (#26843) core: bump astral-sh/uv from 0.13.8 to 0.13.9 in /lifecycle/container (#27893) core: bump aws-cdk-lib from 2.275.0 to 2.276.0 (#27899) core: bump jsonpatch from 1.44 to 1.46 (#27898) core: bump cachetools from 7.3.1 to 7.3.2 (#27897) core: bump google-api-python-client from 2.201.0 to 2.202.0 (#27896) core: bump goauthentik/fips-python from `96730cd` to `72f6e14` in /lifecycle/container (#27894) ci: bump taiki-e/install-action from 2.90.3 to 2.90.4 in /.github/actions/setup (#27895) core: bump goauthentik/fips-debian from `56dbb46` to `712d5d1` in /lifecycle/container (#27892) core: bump github.com/grafana/pyroscope-go from 1.4.3 to 1.5.0 (#27891) providers/saml: add option to ignore ForceAuthn from the SP (#27057) website/integrations: add Radarr (#27882)
kensternberg-authentik
added a commit
that referenced
this pull request
Nov 19, 2026
…enance-2 * web/spike/icon-identification: (21 commits) core: allow launch URLs relative to the current host (#27632) website/releases: 2026.11: benchmaxxing (#27796) core: bump goauthentik/fips-python from `72f6e14` to `8fd04de` in /lifecycle/container (#27920) root: require Node.js 24.22.3 (#27906) admin/files, core: read the cached icon URLs of a list in one query (#27695) core: bump pnpm to 12.22.0 everywhere (#27905) web/elements: fix the wizard next button staying disabled (#27660) events, tasks: speed up the event and task queries (#27692) core: bump the pnpm group across 2 directories with 1 update (#26843) core: bump astral-sh/uv from 0.13.8 to 0.13.9 in /lifecycle/container (#27893) core: bump aws-cdk-lib from 2.275.0 to 2.276.0 (#27899) core: bump jsonpatch from 1.44 to 1.46 (#27898) core: bump cachetools from 7.3.1 to 7.3.2 (#27897) core: bump google-api-python-client from 2.201.0 to 2.202.0 (#27896) core: bump goauthentik/fips-python from `96730cd` to `72f6e14` in /lifecycle/container (#27894) ci: bump taiki-e/install-action from 2.90.3 to 2.90.4 in /.github/actions/setup (#27895) core: bump goauthentik/fips-debian from `56dbb46` to `712d5d1` in /lifecycle/container (#27892) core: bump github.com/grafana/pyroscope-go from 1.4.3 to 1.5.0 (#27891) providers/saml: add option to ignore ForceAuthn from the SP (#27057) Reviewer's request: deleting yourself only deserves a warning. ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
What does this PR change?
Allows
Application.meta_launch_urlto be a path relative to the current host, such as/myapp/.DomainlessFormattedURLValidatornow also accepts paths starting with a single/. Values starting with//or/\are rejected, as browsers treat those as another host. The validator is extended in place, so no migration is needed.Why is this change needed?
In internal networks (edge deployments, changing VPN hostnames), the hostname used to reach authentik can change more often than we want to redeploy. When an application is served on the same origin as authentik, for example behind the same reverse proxy, a launch URL relative to the current host keeps working regardless of which hostname the user came in on.
The frontend and docs already expect relative launch URLs, but the backend rejects them:
appHasLaunchUrl(web/src/user/LibraryPage/LibraryPageImpl.utils.ts) shows apps whose launch URL has no://on the dashboard.All consumers of
get_launch_url()already pass a relative path through to the browser: the/application/launch/<slug>/redirect,RedirectChallenge.to, andapplication_launch_urlin the flow info.How was this tested?
test_relative_launch_url: the API accepts/app/and/app/%(username)s?a=b#c, and rejects//example.com/app/,/\example.com/app/,/app /,app/andjavascript:alert(1).test_check_redirect_auth_relative: the launch view redirects to the formatted relative path.authentik/core/tests,authentik/blueprints/tests,authentik/lib/testsandauthentik/flows/testspass. The only failures also occur on unmodifiedmainin my environment, or are order-dependent.make ci-lint-pending-migrationsreports no changes; black and ruff are clean.Linked issues
Closes #27631
AI Usage
Claude Code has assisted me identifying the issue and proposing a fix as well as reviewing the code in terms our you contribution guidelines.
Checklist
make all)make docs)