* .
* .
* web/element: Move the SidebarVersion out of Elements.
# What
This commit moves the SidebarVersion element, which yes shows the version information in the sidebar. The component is moved into Admin, and the Sidebar now provides an active slot for it. Since it is now indpendent of and never even mentions “Sidebar” on its own, it’s now renamed `VersionDetails`.
# Why
SidebarVersion uses WithLicenseSummary, which has knowledge of the API. The long-term goal of the Elements is to extract from it every element that does *not* need to know about the API, and this was one of the first things I encountered while working on the SidebarIcons project.
# Details
SidebarVersion had a lot of aria that wasn’t necessary. The `aria-labels` overrode much of the text, so the user would hear that there was version information available, but would never actually hear the version information. Headers inside a button would get discarded by some screen-readers because that doesn’t make sense inside a button. Buttons can only contain “inline” content, so using `<span>` and then styling them to be block is the correct way to make sure the information remains accessible while meeting the expected layout.
`aria-controls` in the Interface pointed at nothing, because it was referencing an `id` that doesn’t cross a shadow-root. I’ve changed the target, so at least now that’s going to the right place.
The PFNav and PFAvatar imports were never used inside SidebarVersion. They’ve been removed.
The hover styling has been moved into SidebarVersion explicitly.
VersionDetails is now slotted into the Sidebar so it is visible in the Admin lightDOM, and in consequence it no longer needs its `exportparts`.
`@patterfly-element/pfe-core` has been a part of our product since we included some of the elements into our base, notably the original Tooltips. This only makes it explicit that we use it.
The check-for-undefined in the VersionDetails renderer did nothing; we already check if `this.version` is defined, and if it is, `versionCurrent` is not allowed to be null or undefined. If the type and the behavior don’t coincide, that’s a problem for the back-end team. 😈
Since we’re exposing `[part]` names for styleability, I’ve changed the class names inside VersionDetails into `[part~=]` selectors. We’re not performance-bound, and it reduced the clutter.
* Replace aria wayfinders used for testing with Open UI Automation identifiers.
* web/element: remove license & capabilities requirements from SidebarItem
# What
This commit moves the “isLicensed” and “canEnterprise” checks in SidebarItem and instead decorates the SidebarEntries collection with additional flags and values to support holding the information entirely within the Admin UI.
# How
SidebarItem takes two additional attributes: `notice`, which is where the “Enterprise Only” message goes, and `pathoverride`, which will override the default path if provided. This is hardly an elegant way to go around it, but it preserves the original `entries` tree, producing a new tree and not mutating the original. With this, SidebarItem (and Sidebar itself!) is completely generic and no longer needs to know anything at all about licensing or enterprise capability.
The CSS for SidebarItem has been modified: it’s just `notice` not `enterprise-ntice` now. Fit for any purpose under the sun.
A new function, `resolveSidebarEntries`, completely centralizes the logic for “do we even show Enterprise features” and “if the user isn’t licensed, decorate them with ‘enterprise only’ markers”; it contains the logic dictating, for each element in the SidebarEntries tree, if the instance isLicensed and canEnterprise; it filters out entries that are enterprise-only when the instance does not support enterprise features, then generates the new tree, decorating the `attributes` field with the “Enterprise only” message and path override as required. These generic features are passed to SidebarItem.
`ak-interface-admin` then needed only to <s>rip out</s> modify the navigationEntries method to use the `resolveSidebarEntries` function, and remove the redundant check for enterprise-only features in the palette-generator, since those features will not be present after the resolver does its magic.
Also: A couple of tests.
* Unneeded debugging information.
* Progress has been made.
* web/admin: Simplify sidebar entries handling
This commit streamlines how sidebar entries are generated and validated. The `entries` field was only being used as a signal to `requestUpdate()`; the actual entries were being generated on the fly in `get navigateEntries()`.
We already had functions to generate the base entries and the enterprise entries, and putting the “just base or base + enterprise” function into the `sidebar.ts` file reduced the `navigateEntries` to two lines, and separates the “canEnterprise” from “what does that mean for sidebar” nicely.
@GirlBossRush, there’s a `validateRoutes` function in `./src/admin/navigation/sidebar.ts` that I tried to make into a unit test, but I could not get to run under Vitest, mostly because `Routes.ts` has exactly one side-effect import and Vitest cannot handle that. I didn’t want to make it a browser test, however. Any suggestions?
* That side effect infected downstream tests. Darnit.
* Formatter opinions.
* Moving the load of the AdminOverviewPage to the entrypoint. The idea is to have the dashboard as live as possible as early as possible. Putting into Routes made Routes into a browser-only feature, and it could not be unit tested without this move.
* The test exists and passes.
* Fix some merge issues.
\# What
\# Why
\# How
\# Designs
\# Test Steps
\# Other Notes
* It almost works. It renders, it doesn't fail, but the CSS is still borked.
* .
* web/admin: Simplify sidebar entries handling
This commit streamlines how sidebar entries are generated and validated. The `entries` field was only being used as a signal to `requestUpdate()`; the actual entries were being generated on the fly in `get navigateEntries()`.
We already had functions to generate the base entries and the enterprise entries, and putting the “just base or base + enterprise” function into the `sidebar.ts` file reduced the `navigateEntries` to two lines, and separates the “canEnterprise” from “what does that mean for sidebar” nicely.
@GirlBossRush, there’s a `validateRoutes` function in `./src/admin/navigation/sidebar.ts` that I tried to make into a unit test, but I could not get to run under Vitest, mostly because `Routes.ts` has exactly one side-effect import and Vitest cannot handle that. I didn’t want to make it a browser test, however. Any suggestions?
* That side effect infected downstream tests. Darnit.
* Formatter opinions.
* Moving the load of the AdminOverviewPage to the entrypoint. The idea is to have the dashboard as live as possible as early as possible. Putting into Routes made Routes into a browser-only feature, and it could not be unit tested without this move.
* The test exists and passes.
* .
* .
* web/element: Move the SidebarVersion out of Elements.
# What
This commit moves the SidebarVersion element, which yes shows the version information in the sidebar. The component is moved into Admin, and the Sidebar now provides an active slot for it. Since it is now indpendent of and never even mentions “Sidebar” on its own, it’s now renamed `VersionDetails`.
# Why
SidebarVersion uses WithLicenseSummary, which has knowledge of the API. The long-term goal of the Elements is to extract from it every element that does *not* need to know about the API, and this was one of the first things I encountered while working on the SidebarIcons project.
# Details
SidebarVersion had a lot of aria that wasn’t necessary. The `aria-labels` overrode much of the text, so the user would hear that there was version information available, but would never actually hear the version information. Headers inside a button would get discarded by some screen-readers because that doesn’t make sense inside a button. Buttons can only contain “inline” content, so using `<span>` and then styling them to be block is the correct way to make sure the information remains accessible while meeting the expected layout.
`aria-controls` in the Interface pointed at nothing, because it was referencing an `id` that doesn’t cross a shadow-root. I’ve changed the target, so at least now that’s going to the right place.
The PFNav and PFAvatar imports were never used inside SidebarVersion. They’ve been removed.
The hover styling has been moved into SidebarVersion explicitly.
VersionDetails is now slotted into the Sidebar so it is visible in the Admin lightDOM, and in consequence it no longer needs its `exportparts`.
`@patterfly-element/pfe-core` has been a part of our product since we included some of the elements into our base, notably the original Tooltips. This only makes it explicit that we use it.
The check-for-undefined in the VersionDetails renderer did nothing; we already check if `this.version` is defined, and if it is, `versionCurrent` is not allowed to be null or undefined. If the type and the behavior don’t coincide, that’s a problem for the back-end team. 😈
Since we’re exposing `[part]` names for styleability, I’ve changed the class names inside VersionDetails into `[part~=]` selectors. We’re not performance-bound, and it reduced the clutter.
* Replace aria wayfinders used for testing with Open UI Automation identifiers.
* Expansion tests updated.
* .
* web/admin: Make Sidebar a wholly coherent and independent entity
This commit revises how Sidebar works.
I introduce a new type that the Sidebar understands: `SidebarItem`:
``` javascript
export interface SidebarItem {
label: string;
key: string;
expanded?: boolean;
path?: string | null;
notice?: string | TemplateResult | null;
children?: SidebarItem[];
}
```
## Sidebar changes
This type is meant to drive the Sidebar alone, independent of the needs of any client code (although it is, obviously, good enough to support ak-interface-admin).
I revise `Sidebar` to be the whole component; no SidebarItem renderer, no slots. The container into which it is rendered is the client code’s responsibility. There are two levels of rendering: the Groups and the Items, and right now they’re only distinguished by “Does it have children?” There were four renderers in SidebarItem, and two of them are gone since they were unused.
I have deliberately left room to revise this again so that a second-level can support a path *and* children. I have an idea for what to do with it.
The CSS has entirely been brought in to handle a single sidebar.
## Sidebar Session Persistence
This is entirely in a controller now; it only needs to be included to do its magic, and it works quite well. I have also revised the very long function names in `expansion.ts` and treat the entire file as a single namespace. The names are shorter and more readable, and can be imported with the `* as SidebarExpansion` syntax to support the full namespace.
This makes Sidebar Session Persistence swappable with a Sidebar Device Persistence (using `localStorage`), should we so desire.
Functions in `expansion` that no one was using have been deleted. YAGNI forever.
## Navigation
*`sidebarEntries.ts`*
The navigation folder is split: the `Entries` file was always meant to be an easy-to-find collection of all the *Entries*, and nothing more, the Entries themselves were meant to be easily editable and fit within a visually informative table. All the tooling cluttered that. With one exception, all tooling has been mooved to the `Tools` file. That exception is a tool, *here*, that will either hand you a “plain” SidebarEntries, or a “can enterprise” SidebarEntries, based on a flag. That logic does not belong in the Interface file.
*`sidebarTools.ts`*
Contains two separate units: one converts the `SidebarEntries` collection into a `SidebarItems` collection fit for sending to the Sidebar. The others (a) assists the Interface in finding the right key to send to the Sidebar for the current path, and (b) assists the header in filling out the page title.
Due to some of the needs in the Interface, `resolveSidebarItems` is an `ExtendedSidebarItem`; it has extra fields to help the CommandPalette. The shape passed to Sidebar is an unchanged `SidebarItem`.
## Interface
The palette code is revised to understand the new `ExtendedSidebarItem` format.
The `ak-page-navbar` and `ak-sidebar` calls have been revised to take the new format. The values are derived at the beginning of the `render()` function to avoid multiple calls to the resolvers.
* I didn't think I'd fat finger while writing the commit message, but what do I know?
* Added the requirement that every item passed to the sidebar must have a path or children (or both; both is good too)
* Almost there.
* Almost there.
* web/admin: Put icons in the sidebar.
## Description
This commit updates the Sidebar to have icons next to top-level headers.
## What
1. Add icons to `AdminSidebarEntries`. The type of `SidebarItem` and `SidebarEntry` have been updated to support this change.
2. Add a unit test to Admin to validate that every SidebarItem we generate has a path or children. This is not an exclusive-or; it allows for both. I’m leaving room for another feature. 😈
3. Bring the entirety of the sidebar into a new namespace, `ak-c-sidebar`. It is now vendored. Anything we weren’t using, I’ve thrown overboard.
4. Each row is now a grid with very solid definitions for the width of the icon and the toggle; the label is given the rest of the horizontal space. This lets us define both the icon and the “rail” (movement/reassurance indicator) and position them perfectly without having to invoke pixels at our end.
5. Update the renderers to produce three different kinds of navigation rows: links, toggles, and toggle-plus-link.
* Recommendation from automated review.
* Revised naming code to track certain features.
* Adding the Breadcrumbs visual component.
* web/admin: Add a Breadcrumb context manager to the navigation suite
## Description
This commit introduces a Breadcrumb component (patterned on the [Patternfly 5 Breadcrumb Component](https://v5-archive.patternfly.org/components/breadcrumb/html)) and introduces a BreadcrumbController that tracks changes in our navigation to provide information in the format the Breadcrumb component expects.
## What
### First, a little maintenance:
`findCurrentSidebarKey` and `findSidebarSectionByRoute` are the *same function*, it’s just that one returns the key used by the code, the other returns the label used by humans. (Also, they took their arguments in different order). I’ve renamed the latter to `findCurrentSidebarSectionLabel`, made the argument sequences the same, and extracted the common functionality.
The function `findSidebarEntries` now returns a list of sidebar entries. Most functions are only interested in the last one (the tip of the route is the page or page/tab combo you’ve navigated to) but having that information is useful.
### Breadcrumb Context Controller
The Breadcrumb controller is a standard parasitic context manager: it attaches to an object and monitors that object’s behavior, translating changes in that object into messages for other services to use. To enable it, you need only add exactly one line to an Interface, creating an instance of the controller. It does everything else. The controller has no additional external dependencies, and it creates no new external obligations.
Because of our split navigation (Routes for collections, Tabs for objects), the controller listens for both events, identifies the current full path according to the SidebarEntries, and records each step along the way. It publishes this information as an active context object. And that’s pretty much all it does.
### Breadcrumb Component (`ak-breadcrumb`)
The Breadcrumb Component takes a property argument, `.entries`, that is a list of `{ label, path? }` pairs; if the path is present and is *not* the page you’re currently looking at, the label will be wrapped in an anchor for easy navigation up the hierarchy.
The Breadcrumb Component is API-free.
### Breadcrumb UI Component (`ak-ui-breadcrumb`)
The Breadcrumb UI Component inherits and extends the Breadcrumb component by plugging into the Breadcrumb Context and pushing the context changes into the the `.entries` field before rendering. This avoids both API entanglement with the Breadcrumb renderer, having to remember how to use it as a slotted controller, or some other shenaningans to get `ak-breadcrumb` into the right position.
### Miscellaneous
Jens thought shortening “Enterprise Only” to “Enterprise” and floating it to the right looked nice.
* The updated format for crumbs required an update to the unit tests.
* Sidebar in progress.
* web/admin: Add a Bookmark context manager to the navigation suite
## Description
This commit introduces a Bookmark component.
### The Controller
The BookmarkController is a context provider that does two things:
1. It reads and writes the user’s collection of bookmarks to storage. Right now, the only storage being used is localStorage. This storage is on a per-device (note: *not* per user) basis, and does not travel if the user logs into authentik from different devices. It provides this collection as a context for interested client code to use.
2. It provides a method that can be used by the host component to intercept the SidebarItem\[\] collection and add its own third-tier `children` collection, providing paths and names for bookmarked items.
### The Component
The Bookmark (`ak-bookmark`) monitors the BreadcrumbContext and decides whether or not it should show a Bookmark tab or not. The Bookmark component should be placed someplace where bookmarking would make sense, such as next to the page header `#page-navbar-heading`. The Bookmark component also consumes the BookmarkContext to decide *which* bookmark icon to show: the hollow version or the filled version.
## Status
The Bookmark component’s API-aware extension is now slotted when appropriate; the navbar has been extended to include it. The navbar has also been extended to include a breadcrumb slot if there is no description, creating a consistent view of all verticals across all pages.
* Added comments and details.
* I should keep my promises: bookmarks go into localStorage.
* Revised naming code to track certain features.
* Adding the Breadcrumbs visual component.
* web/admin: Add a Breadcrumb context manager to the navigation suite
## Description
This commit introduces a Breadcrumb component (patterned on the [Patternfly 5 Breadcrumb Component](https://v5-archive.patternfly.org/components/breadcrumb/html)) and introduces a BreadcrumbController that tracks changes in our navigation to provide information in the format the Breadcrumb component expects.
## What
### First, a little maintenance:
`findCurrentSidebarKey` and `findSidebarSectionByRoute` are the *same function*, it’s just that one returns the key used by the code, the other returns the label used by humans. (Also, they took their arguments in different order). I’ve renamed the latter to `findCurrentSidebarSectionLabel`, made the argument sequences the same, and extracted the common functionality.
The function `findSidebarEntries` now returns a list of sidebar entries. Most functions are only interested in the last one (the tip of the route is the page or page/tab combo you’ve navigated to) but having that information is useful.
### Breadcrumb Context Controller
The Breadcrumb controller is a standard parasitic context manager: it attaches to an object and monitors that object’s behavior, translating changes in that object into messages for other services to use. To enable it, you need only add exactly one line to an Interface, creating an instance of the controller. It does everything else. The controller has no additional external dependencies, and it creates no new external obligations.
Because of our split navigation (Routes for collections, Tabs for objects), the controller listens for both events, identifies the current full path according to the SidebarEntries, and records each step along the way. It publishes this information as an active context object. And that’s pretty much all it does.
### Breadcrumb Component (`ak-breadcrumb`)
The Breadcrumb Component takes a property argument, `.entries`, that is a list of `{ label, path? }` pairs; if the path is present and is *not* the page you’re currently looking at, the label will be wrapped in an anchor for easy navigation up the hierarchy.
The Breadcrumb Component is API-free.
### Breadcrumb UI Component (`ak-ui-breadcrumb`)
The Breadcrumb UI Component inherits and extends the Breadcrumb component by plugging into the Breadcrumb Context and pushing the context changes into the the `.entries` field before rendering. This avoids both API entanglement with the Breadcrumb renderer, having to remember how to use it as a slotted controller, or some other shenaningans to get `ak-breadcrumb` into the right position.
### Miscellaneous
Jens thought shortening “Enterprise Only” to “Enterprise” and floating it to the right looked nice.
* The updated format for crumbs required an update to the unit tests.
* Sidebar in progress.
* web/admin: Add a Bookmark context manager to the navigation suite
This commit introduces a Bookmark component.
The BookmarkController is a context provider that does two things:
1. It reads and writes the user’s collection of bookmarks to storage. Right now, the only storage being used is localStorage. This storage is on a per-device (note: *not* per user) basis, and does not travel if the user logs into authentik from different devices. It provides this collection as a context for interested client code to use.
2. It provides a method that can be used by the host component to intercept the SidebarItem\[\] collection and add its own third-tier `children` collection, providing paths and names for bookmarked items.
The Bookmark (`ak-bookmark`) monitors the BreadcrumbContext and decides whether or not it should show a Bookmark tab or not. The Bookmark component should be placed someplace where bookmarking would make sense, such as next to the page header `#page-navbar-heading`. The Bookmark component also consumes the BookmarkContext to decide *which* bookmark icon to show: the hollow version or the filled version.
The Bookmark component’s API-aware extension is now slotted when appropriate; the navbar has been extended to include it. The navbar has also been extended to include a breadcrumb slot if there is no description, creating a consistent view of all verticals across all pages.
* Added comments and details.
* I should keep my promises: bookmarks go into localStorage.
* web/admin: make the bookmark a toggle button and drop the breadcrumb heading wrapper
* Changes requested by reviewer (@GirlBossRush).
* Formatters. Feh!
---------
Co-authored-by: Teffen Ellis <[email protected]>
* initial attempt at web changes
* policies: surface dry-run results in events
* web: support static binding dry runs and fix result links
* web: leave translation extraction to automation
* web/policies: align dry-run action with binding controls
* web/policies: address dry-run UI review feedback
* web/policies: address dry-run UI review feedback
- Move renderDryRunHelp from #common/policies/utils to
#admin/policies/renderDryRunHelp, since only the admin app uses it.
- Render the policy raw result in <pre> so indented JSON keeps its
whitespace, and hide the row when there is no raw result
(non-expression policies).
- Build the dry-run events AKQL query as a single string.
* fix max_age=0 not forcing re-authentication
* Apply suggestion from @BeryJu
Signed-off-by: Jens L. <[email protected]>
* Update authentik/providers/oauth2/views/authorize.py
Co-authored-by: Jens L. <[email protected]>
Signed-off-by: Dewi Roberts <[email protected]>
* Update test
---------
Signed-off-by: Jens L. <[email protected]>
Signed-off-by: Dewi Roberts <[email protected]>
Co-authored-by: Jens L. <[email protected]>
* stages/authenticator_validate: keep the pending WebAuthn challenge until it's answered
Rendering the stage again, from another tab or a selection request, replaced the
challenge an in-progress assertion was signed for. Reuse it instead, and remove
it once validated, skipped, enrolled, or passed by identification.
Co-authored-by: Jens Langhammer <[email protected]>
* web/flow: only notify the server of SMS and email challenge selections
Selecting any other device has no effect on the server, but the request still
re-renders the stage and races the actual response.
* verify tab B reuses challenge and tab A’s original assertion succeeds.
---------
Co-authored-by: Jens Langhammer <[email protected]>
Co-authored-by: Teffen Ellis <[email protected]>
* web: move entrypoint bodies into importable modules
Entrypoints import the moved module, with no change in behavior. This
lets a later change run code before the interface modules evaluate.
* web/i18n: load the locale catalog before the interface boots
The locale is fixed per page since #25156, but the catalog still loaded
from a component lifecycle hook, after every statically imported module
had evaluated. Module-level msg() calls returned English.
- each entrypoint awaits initializeLocale() before importing the interface
- the lit-localize runtime moves to #common/ui/locale/runtime
* web/i18n: remove live locale switching
Switching locale reloads the page since #25156, and the catalog now loads
before boot, so nothing observes a locale change after startup.
- LocaleContextController only provides the runtime; drop the lang observer
- drop the activeLanguageTag setter from WithLocale
- drop LOCALE_STATUS_EVENT listeners in the admin interface, API locale
middleware, captcha stage, and locale select
* Fix type.
* Unify types.
* web/i18n: unwrap msg() thunks in label records
The catalog now loads before any interface module evaluates, so label
records can hold translated strings directly.
- label records hold strings instead of MessageFormatter thunks
- call sites read the value instead of calling it
* .
* .
* web/element: Move the SidebarVersion out of Elements.
# What
This commit moves the SidebarVersion element, which yes shows the version information in the sidebar. The component is moved into Admin, and the Sidebar now provides an active slot for it. Since it is now indpendent of and never even mentions “Sidebar” on its own, it’s now renamed `VersionDetails`.
# Why
SidebarVersion uses WithLicenseSummary, which has knowledge of the API. The long-term goal of the Elements is to extract from it every element that does *not* need to know about the API, and this was one of the first things I encountered while working on the SidebarIcons project.
# Details
SidebarVersion had a lot of aria that wasn’t necessary. The `aria-labels` overrode much of the text, so the user would hear that there was version information available, but would never actually hear the version information. Headers inside a button would get discarded by some screen-readers because that doesn’t make sense inside a button. Buttons can only contain “inline” content, so using `<span>` and then styling them to be block is the correct way to make sure the information remains accessible while meeting the expected layout.
`aria-controls` in the Interface pointed at nothing, because it was referencing an `id` that doesn’t cross a shadow-root. I’ve changed the target, so at least now that’s going to the right place.
The PFNav and PFAvatar imports were never used inside SidebarVersion. They’ve been removed.
The hover styling has been moved into SidebarVersion explicitly.
VersionDetails is now slotted into the Sidebar so it is visible in the Admin lightDOM, and in consequence it no longer needs its `exportparts`.
`@patterfly-element/pfe-core` has been a part of our product since we included some of the elements into our base, notably the original Tooltips. This only makes it explicit that we use it.
The check-for-undefined in the VersionDetails renderer did nothing; we already check if `this.version` is defined, and if it is, `versionCurrent` is not allowed to be null or undefined. If the type and the behavior don’t coincide, that’s a problem for the back-end team. 😈
Since we’re exposing `[part]` names for styleability, I’ve changed the class names inside VersionDetails into `[part~=]` selectors. We’re not performance-bound, and it reduced the clutter.
* Replace aria wayfinders used for testing with Open UI Automation identifiers.
* web/element: remove license & capabilities requirements from SidebarItem
# What
This commit moves the “isLicensed” and “canEnterprise” checks in SidebarItem and instead decorates the SidebarEntries collection with additional flags and values to support holding the information entirely within the Admin UI.
# How
SidebarItem takes two additional attributes: `notice`, which is where the “Enterprise Only” message goes, and `pathoverride`, which will override the default path if provided. This is hardly an elegant way to go around it, but it preserves the original `entries` tree, producing a new tree and not mutating the original. With this, SidebarItem (and Sidebar itself!) is completely generic and no longer needs to know anything at all about licensing or enterprise capability.
The CSS for SidebarItem has been modified: it’s just `notice` not `enterprise-ntice` now. Fit for any purpose under the sun.
A new function, `resolveSidebarEntries`, completely centralizes the logic for “do we even show Enterprise features” and “if the user isn’t licensed, decorate them with ‘enterprise only’ markers”; it contains the logic dictating, for each element in the SidebarEntries tree, if the instance isLicensed and canEnterprise; it filters out entries that are enterprise-only when the instance does not support enterprise features, then generates the new tree, decorating the `attributes` field with the “Enterprise only” message and path override as required. These generic features are passed to SidebarItem.
`ak-interface-admin` then needed only to <s>rip out</s> modify the navigationEntries method to use the `resolveSidebarEntries` function, and remove the redundant check for enterprise-only features in the palette-generator, since those features will not be present after the resolver does its magic.
Also: A couple of tests.
* Unneeded debugging information.
* Progress has been made.
* web/admin: Simplify sidebar entries handling
This commit streamlines how sidebar entries are generated and validated. The `entries` field was only being used as a signal to `requestUpdate()`; the actual entries were being generated on the fly in `get navigateEntries()`.
We already had functions to generate the base entries and the enterprise entries, and putting the “just base or base + enterprise” function into the `sidebar.ts` file reduced the `navigateEntries` to two lines, and separates the “canEnterprise” from “what does that mean for sidebar” nicely.
@GirlBossRush, there’s a `validateRoutes` function in `./src/admin/navigation/sidebar.ts` that I tried to make into a unit test, but I could not get to run under Vitest, mostly because `Routes.ts` has exactly one side-effect import and Vitest cannot handle that. I didn’t want to make it a browser test, however. Any suggestions?
* That side effect infected downstream tests. Darnit.
* Formatter opinions.
* Moving the load of the AdminOverviewPage to the entrypoint. The idea is to have the dashboard as live as possible as early as possible. Putting into Routes made Routes into a browser-only feature, and it could not be unit tested without this move.
* The test exists and passes.
* Fix some merge issues.
\# What
\# Why
\# How
\# Designs
\# Test Steps
\# Other Notes
* It almost works. It renders, it doesn't fail, but the CSS is still borked.
* .
* web/admin: Simplify sidebar entries handling
This commit streamlines how sidebar entries are generated and validated. The `entries` field was only being used as a signal to `requestUpdate()`; the actual entries were being generated on the fly in `get navigateEntries()`.
We already had functions to generate the base entries and the enterprise entries, and putting the “just base or base + enterprise” function into the `sidebar.ts` file reduced the `navigateEntries` to two lines, and separates the “canEnterprise” from “what does that mean for sidebar” nicely.
@GirlBossRush, there’s a `validateRoutes` function in `./src/admin/navigation/sidebar.ts` that I tried to make into a unit test, but I could not get to run under Vitest, mostly because `Routes.ts` has exactly one side-effect import and Vitest cannot handle that. I didn’t want to make it a browser test, however. Any suggestions?
* That side effect infected downstream tests. Darnit.
* Formatter opinions.
* Moving the load of the AdminOverviewPage to the entrypoint. The idea is to have the dashboard as live as possible as early as possible. Putting into Routes made Routes into a browser-only feature, and it could not be unit tested without this move.
* The test exists and passes.
* .
* .
* web/element: Move the SidebarVersion out of Elements.
# What
This commit moves the SidebarVersion element, which yes shows the version information in the sidebar. The component is moved into Admin, and the Sidebar now provides an active slot for it. Since it is now indpendent of and never even mentions “Sidebar” on its own, it’s now renamed `VersionDetails`.
# Why
SidebarVersion uses WithLicenseSummary, which has knowledge of the API. The long-term goal of the Elements is to extract from it every element that does *not* need to know about the API, and this was one of the first things I encountered while working on the SidebarIcons project.
# Details
SidebarVersion had a lot of aria that wasn’t necessary. The `aria-labels` overrode much of the text, so the user would hear that there was version information available, but would never actually hear the version information. Headers inside a button would get discarded by some screen-readers because that doesn’t make sense inside a button. Buttons can only contain “inline” content, so using `<span>` and then styling them to be block is the correct way to make sure the information remains accessible while meeting the expected layout.
`aria-controls` in the Interface pointed at nothing, because it was referencing an `id` that doesn’t cross a shadow-root. I’ve changed the target, so at least now that’s going to the right place.
The PFNav and PFAvatar imports were never used inside SidebarVersion. They’ve been removed.
The hover styling has been moved into SidebarVersion explicitly.
VersionDetails is now slotted into the Sidebar so it is visible in the Admin lightDOM, and in consequence it no longer needs its `exportparts`.
`@patterfly-element/pfe-core` has been a part of our product since we included some of the elements into our base, notably the original Tooltips. This only makes it explicit that we use it.
The check-for-undefined in the VersionDetails renderer did nothing; we already check if `this.version` is defined, and if it is, `versionCurrent` is not allowed to be null or undefined. If the type and the behavior don’t coincide, that’s a problem for the back-end team. 😈
Since we’re exposing `[part]` names for styleability, I’ve changed the class names inside VersionDetails into `[part~=]` selectors. We’re not performance-bound, and it reduced the clutter.
* Replace aria wayfinders used for testing with Open UI Automation identifiers.
* Expansion tests updated.
* .
* web/admin: Make Sidebar a wholly coherent and independent entity
This commit revises how Sidebar works.
I introduce a new type that the Sidebar understands: `SidebarItem`:
``` javascript
export interface SidebarItem {
label: string;
key: string;
expanded?: boolean;
path?: string | null;
notice?: string | TemplateResult | null;
children?: SidebarItem[];
}
```
## Sidebar changes
This type is meant to drive the Sidebar alone, independent of the needs of any client code (although it is, obviously, good enough to support ak-interface-admin).
I revise `Sidebar` to be the whole component; no SidebarItem renderer, no slots. The container into which it is rendered is the client code’s responsibility. There are two levels of rendering: the Groups and the Items, and right now they’re only distinguished by “Does it have children?” There were four renderers in SidebarItem, and two of them are gone since they were unused.
I have deliberately left room to revise this again so that a second-level can support a path *and* children. I have an idea for what to do with it.
The CSS has entirely been brought in to handle a single sidebar.
## Sidebar Session Persistence
This is entirely in a controller now; it only needs to be included to do its magic, and it works quite well. I have also revised the very long function names in `expansion.ts` and treat the entire file as a single namespace. The names are shorter and more readable, and can be imported with the `* as SidebarExpansion` syntax to support the full namespace.
This makes Sidebar Session Persistence swappable with a Sidebar Device Persistence (using `localStorage`), should we so desire.
Functions in `expansion` that no one was using have been deleted. YAGNI forever.
## Navigation
*`sidebarEntries.ts`*
The navigation folder is split: the `Entries` file was always meant to be an easy-to-find collection of all the *Entries*, and nothing more, the Entries themselves were meant to be easily editable and fit within a visually informative table. All the tooling cluttered that. With one exception, all tooling has been mooved to the `Tools` file. That exception is a tool, *here*, that will either hand you a “plain” SidebarEntries, or a “can enterprise” SidebarEntries, based on a flag. That logic does not belong in the Interface file.
*`sidebarTools.ts`*
Contains two separate units: one converts the `SidebarEntries` collection into a `SidebarItems` collection fit for sending to the Sidebar. The others (a) assists the Interface in finding the right key to send to the Sidebar for the current path, and (b) assists the header in filling out the page title.
Due to some of the needs in the Interface, `resolveSidebarItems` is an `ExtendedSidebarItem`; it has extra fields to help the CommandPalette. The shape passed to Sidebar is an unchanged `SidebarItem`.
## Interface
The palette code is revised to understand the new `ExtendedSidebarItem` format.
The `ak-page-navbar` and `ak-sidebar` calls have been revised to take the new format. The values are derived at the beginning of the `render()` function to avoid multiple calls to the resolvers.
* I didn't think I'd fat finger while writing the commit message, but what do I know?
* Added the requirement that every item passed to the sidebar must have a path or children (or both; both is good too)
* Almost there.
* Almost there.
* web/admin: Put icons in the sidebar.
## Description
This commit updates the Sidebar to have icons next to top-level headers.
## What
1. Add icons to `AdminSidebarEntries`. The type of `SidebarItem` and `SidebarEntry` have been updated to support this change.
2. Add a unit test to Admin to validate that every SidebarItem we generate has a path or children. This is not an exclusive-or; it allows for both. I’m leaving room for another feature. 😈
3. Bring the entirety of the sidebar into a new namespace, `ak-c-sidebar`. It is now vendored. Anything we weren’t using, I’ve thrown overboard.
4. Each row is now a grid with very solid definitions for the width of the icon and the toggle; the label is given the rest of the horizontal space. This lets us define both the icon and the “rail” (movement/reassurance indicator) and position them perfectly without having to invoke pixels at our end.
5. Update the renderers to produce three different kinds of navigation rows: links, toggles, and toggle-plus-link.
* Recommendation from automated review.
* Revised naming code to track certain features.
* Adding the Breadcrumbs visual component.
* web/admin: Add a Breadcrumb context manager to the navigation suite
## Description
This commit introduces a Breadcrumb component (patterned on the [Patternfly 5 Breadcrumb Component](https://v5-archive.patternfly.org/components/breadcrumb/html)) and introduces a BreadcrumbController that tracks changes in our navigation to provide information in the format the Breadcrumb component expects.
## What
### First, a little maintenance:
`findCurrentSidebarKey` and `findSidebarSectionByRoute` are the *same function*, it’s just that one returns the key used by the code, the other returns the label used by humans. (Also, they took their arguments in different order). I’ve renamed the latter to `findCurrentSidebarSectionLabel`, made the argument sequences the same, and extracted the common functionality.
The function `findSidebarEntries` now returns a list of sidebar entries. Most functions are only interested in the last one (the tip of the route is the page or page/tab combo you’ve navigated to) but having that information is useful.
### Breadcrumb Context Controller
The Breadcrumb controller is a standard parasitic context manager: it attaches to an object and monitors that object’s behavior, translating changes in that object into messages for other services to use. To enable it, you need only add exactly one line to an Interface, creating an instance of the controller. It does everything else. The controller has no additional external dependencies, and it creates no new external obligations.
Because of our split navigation (Routes for collections, Tabs for objects), the controller listens for both events, identifies the current full path according to the SidebarEntries, and records each step along the way. It publishes this information as an active context object. And that’s pretty much all it does.
### Breadcrumb Component (`ak-breadcrumb`)
The Breadcrumb Component takes a property argument, `.entries`, that is a list of `{ label, path? }` pairs; if the path is present and is *not* the page you’re currently looking at, the label will be wrapped in an anchor for easy navigation up the hierarchy.
The Breadcrumb Component is API-free.
### Breadcrumb UI Component (`ak-ui-breadcrumb`)
The Breadcrumb UI Component inherits and extends the Breadcrumb component by plugging into the Breadcrumb Context and pushing the context changes into the the `.entries` field before rendering. This avoids both API entanglement with the Breadcrumb renderer, having to remember how to use it as a slotted controller, or some other shenaningans to get `ak-breadcrumb` into the right position.
### Miscellaneous
Jens thought shortening “Enterprise Only” to “Enterprise” and floating it to the right looked nice.
* The updated format for crumbs required an update to the unit tests.
* Revised naming code to track certain features.
* Adding the Breadcrumbs visual component.
* web/admin: Add a Breadcrumb context manager to the navigation suite
## Description
This commit introduces a Breadcrumb component (patterned on the [Patternfly 5 Breadcrumb Component](https://v5-archive.patternfly.org/components/breadcrumb/html)) and introduces a BreadcrumbController that tracks changes in our navigation to provide information in the format the Breadcrumb component expects.
## What
### First, a little maintenance:
`findCurrentSidebarKey` and `findSidebarSectionByRoute` are the *same function*, it’s just that one returns the key used by the code, the other returns the label used by humans. (Also, they took their arguments in different order). I’ve renamed the latter to `findCurrentSidebarSectionLabel`, made the argument sequences the same, and extracted the common functionality.
The function `findSidebarEntries` now returns a list of sidebar entries. Most functions are only interested in the last one (the tip of the route is the page or page/tab combo you’ve navigated to) but having that information is useful.
### Breadcrumb Context Controller
The Breadcrumb controller is a standard parasitic context manager: it attaches to an object and monitors that object’s behavior, translating changes in that object into messages for other services to use. To enable it, you need only add exactly one line to an Interface, creating an instance of the controller. It does everything else. The controller has no additional external dependencies, and it creates no new external obligations.
Because of our split navigation (Routes for collections, Tabs for objects), the controller listens for both events, identifies the current full path according to the SidebarEntries, and records each step along the way. It publishes this information as an active context object. And that’s pretty much all it does.
### Breadcrumb Component (`ak-breadcrumb`)
The Breadcrumb Component takes a property argument, `.entries`, that is a list of `{ label, path? }` pairs; if the path is present and is *not* the page you’re currently looking at, the label will be wrapped in an anchor for easy navigation up the hierarchy.
The Breadcrumb Component is API-free.
### Breadcrumb UI Component (`ak-ui-breadcrumb`)
The Breadcrumb UI Component inherits and extends the Breadcrumb component by plugging into the Breadcrumb Context and pushing the context changes into the the `.entries` field before rendering. This avoids both API entanglement with the Breadcrumb renderer, having to remember how to use it as a slotted controller, or some other shenaningans to get `ak-breadcrumb` into the right position.
### Miscellaneous
Jens thought shortening “Enterprise Only” to “Enterprise” and floating it to the right looked nice.
* The updated format for crumbs required an update to the unit tests.
* Changes requested by reviewer (@GirlBossRush).
* web/elements: vendor sidebar and add icons
* web/elements: put sidebar expanded state on the toggle and nest sublists
---------
Co-authored-by: Teffen Ellis <[email protected]>
* core/oauth2: don't set state in responses if not supplied
* providers/oauth2: omit state from all authorization responses when not supplied
Extend the fix to the form_post and implicit/hybrid responses, use the
same truthiness rule as AuthorizeError, and add tests for the code
(query, fragment, form_post) and implicit flows without state.
Co-Authored-By: Alex Anderson <[email protected]>
* providers/oauth2: echo an empty state back verbatim
RFC 6749 §4.1.2/§4.2.2/§4.1.2.1 require returning the exact state value
whenever the parameter was present in the request, including when it is
empty. Check for presence (is not None) instead of truthiness in both
success and error responses, and keep blank values when re-parsing the
response URL for form_post and the ui_locales redirect rewrite.
Co-Authored-By: Alex Anderson <[email protected]>
---------
Co-authored-by: alxndrsn <alxndrsn>
Co-authored-by: Jacob S <[email protected]>
Co-authored-by: Jacob Sachs <[email protected]>
Co-authored-by: Jens L. <[email protected]>
* Get rid of that empty column; we'll use styling instead.
* web/admin: Provide a stronger visual hierarchy for expansion rows.
## Description
The lack of visual separation between BoundPoliciesList, TaskList, and ScheduleList in expansion rows has always irritated me. It’s hard to make out what I’m looking at, at any given time. This commit creates a new visual primitive to make that easier, and wraps expansion row targets in it.
### SectionCard
This commit provides a new visual primitive element, `ak-section-card`, that exists strictly to provide that visual separation: a strong label, a consistent location for the description, a visual separation using both whitespace and a border to create visual distinctiveness between components in an expansion row.
### Table
The table CSS is updated to say that if the table has an `ak-section-card` in it, it’s a flex display with objects in top-to-bottom order, and it has off-the-inline-start spacing so that each “depth” of the hierarchy is clear and apparent.
The table itself is updated to get rid of the leftmost column. It wasn’t used by default, and its spacing was quite wide compared to the design provided by this change.
### Tasks and Schedules
The tasks and schedules lists have been wrapped in SectionCard and properly annotated with labels (“Tasks” or “Schedules”) as appropriate.
Cleanup: Rather than create a new SectionCard for the task list associated with a schedule, I just read in the taskList functional renderer from `TaskList`.
### BoundPoliciesList
While I was replacing the BoundPoliciesList with SectionCard-wrapped equivalents, I noticed that they all had a set pattern, so I extracted the pattern and created a `renderBoundPoliciesExpansion()` function that handles all the details. That both cleaned up a number of call locations and affirmed their types, and it let me only have to write one new SectionCard wrapper.
Cleanup: In order to avoid duplicating the default `allowedTypes` from BoundPoliciesList in `renderBoundPoliciesExpansion()`, I extracted the default list into a top-level `const` and exported it; now both can use it safely.
Cleanup: The description of the bound policies for ApplicationEntitlements is now in the correct place.
## Status
I haven’t figured out what to do with the `F#$!%!^!#` `Path:` field in the BlueprintsList page.
* Well, that was potentially embarrassing.
* Although we don't use it, The BoundPoliciesList description slot can take anything, so I provided a capacity to pass it a 'TemplateResult'. I don't know, maybe someone will want to pass text wrapped in a tooltip or something someday.
* Still trying to get the whitespace exactly right.
* Move the path into the 'name & description' block, creating a more unified view.
* Better structure.
* Don't have description lists on that page anymore, so we don't need the extra CSS or its override.
* That's so much nicer.
* Let tables bleed to the edge, but provide spacing for the DescriptionLists in DataExport.
* Too much whitespace between the header and the body. Fixed.
* Update web/src/admin/policies/renderPolicyBindings.ts
Co-authored-by: Teffen Ellis <[email protected]>
Signed-off-by: Ken Sternberg <[email protected]>
* Update web/src/admin/policies/renderPolicyBindings.ts
Co-authored-by: Teffen Ellis <[email protected]>
Signed-off-by: Ken Sternberg <[email protected]>
* Update web/src/admin/requests/BoundRequestRulesTable.ts
Co-authored-by: Teffen Ellis <[email protected]>
Signed-off-by: Ken Sternberg <[email protected]>
* Some manual edits as suggested by a reviewer (@GirlBossRush)
* Some manual edits as suggested by a reviewer (@GirlBossRush)
* Return types interefered with build and type resolution. Let the inferer do its job.
---------
Signed-off-by: Ken Sternberg <[email protected]>
Co-authored-by: Teffen Ellis <[email protected]>
* website/docs: draft 2026.11 release notes
Add highlights, the breaking changes found by reviewing every PR merged
since 2026.8, new features, and new integration and source guides.
* website/docs: fix release note links
Drop the extra /integrations/ segment from 2026.2 integration links, add
a missing trailing slash in 2026.5, and fix the template's upgrade link
depth for files in a year directory.
* release: flesh out notes
* releases: fixup!
* website/docs: tidy 2026.11 release notes
Move sections stranded under the source guides into place, fill the
password lockout, password device, and required actions stubs, and remove
duplicate entries.
---------
Co-authored-by: Dominic R <[email protected]>
sources/ldap: record the directory's change date when resetting a password
When pwdLastSet or krbLastPwdChange is newer than the user's password,
the sync makes the password unusable but kept the old change date. So
every later sync saw the directory password as newer again and stored
a new unusable hash, which ends the user's sessions on each sync.
Store the directory's date as the password change date, and compare
with > so the stored date does not count as newer.
* events: bundle DB-IP Lite GeoIP databases instead of MaxMind GeoLite2
MaxMind's GeoLite2 databases need an account and license key at build
time. DB-IP publishes free monthly City and ASN Lite databases in the
same format, so the image downloads those instead.
The default paths change to /geoip/dbip-{city,asn}-lite.mmdb. When the
default file is missing, the old GeoLite2 filename is loaded with a
warning, so volumes mounted over /geoip keep working.
* separate geoip container
Signed-off-by: Jens Langhammer <[email protected]>
* move geoip to base-images repo
https://github.com/goauthentik/base-images/pull/202
Signed-off-by: Jens Langhammer <[email protected]>
---------
Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens Langhammer <[email protected]>
* web/sources/ldap: fix parent group submission and type-check field names
* web/tests: fix LDAP source form regression coverage
* web/elements: add typed field() helper to Form
Replace the repeated `"x" satisfies keyof LDAPSourceRequest` clauses in
LDAPSourceForm with `this.field("x")`, which checks field names against
the form's submitted data type `D`.
Forms should pass their `*Request` type as `D` before adopting it: the
default (the model type) includes read-only fields like `pk` and omits
write-only fields like passwords and secrets.
* providers/oauth2: sign tokens with ML-DSA keys
* Apply suggestion from @kensternberg-authentik
Co-authored-by: Ken Sternberg <[email protected]>
Signed-off-by: Jens L. <[email protected]>
* providers/oauth2: use MLDSAAlgorithm.algorithm_for_key and MLDSAKey
* providers/oauth2: skip ML-DSA JWKS tests when FIPS is enabled
* providers/oauth2: expect ML-DSA in the supported signing key types message
---------
Signed-off-by: Jens L. <[email protected]>
Co-authored-by: Jens L. <[email protected]>
Co-authored-by: Ken Sternberg <[email protected]>
Name the element after what it is, not the library behind it, ahead of
replacing CodeMirror.
- Rename `<ak-codemirror>` to `<ak-code-editor>`
- Move `#elements/CodeMirror` to `#elements/CodeEditor`
- Rename `CodeMirrorMode` and the source helpers to match
Co-authored-by: Dominic R <[email protected]>
* adding google cloud integration documentation
* integrations: touch up
---------
Co-authored-by: Dominic R <[email protected]>
Co-authored-by: Dewi Roberts <[email protected]>
## Description
This commit adds a little CSS to ensure the toggle group is centered on the PolicyBindingForms.
The rule that “child components should not enforce their position or dimension; leave that to the client code to make those decisions” can sometimes make for awkward fits; in this case, a flex-wrapper to ensure centering.
The toggle group is also used in:
- ProxyProviderForm
- Ak-Application-Wizard-Edit-Binding-Steps
- BlueprintForm
- BlueprintImportForm
I have checked all five locations (the above, and PolicyBindingForms), and the toggle group is now centered in the Form in all cases.
Closes \#27357
* move Initial Permissions to Customization
* fix get_perms() for superusers with an object
Due to shortcuts this doesn't actually ever run, but fixing it anyway
* validate blueprint permissions against the database
* add custom permissions
* log permission assignments
* route API authorization through one decision point per phase
* add permission checks
* add field rules to permission checks
* let permission checks alter responses
* web: manage custom permissions
* web: manage permission checks
* website: document custom permissions and permission checks
* `make gen`
* Docs changes
* website/docs: cleanup
* fix typo in the custom permissions flag help
* format custom permission help text
* reword docs
* select list items by `[pk=...]` in field rule paths
* prefix permission check function names with `RBAC_FUNC_`
* trace `visible_objects`
* inline test helpers
* check the custom permissions flag first
* fixup! Merge branch 'main' into rbac/custom-permissions
* fixup! fixup! Merge branch 'main' into rbac/custom-permissions
---------
Co-authored-by: Dewi Roberts <[email protected]>
Co-authored-by: Dominic R <[email protected]>
* root: fix translations that never took effect
* remove `format_map`s in favor of just `format`
* fixup! Merge branch 'main' into core/fix-translations
Confirming the "Select users" dialog replaced the pending list in the
"Assign Additional Users" form, so a second visit to the dialog dropped
the users picked in the first. Each confirm now merges its selection into
the pending list by primary key. The role assignment path shares the form.
The "Simple group" browser test now picks two users in separate visits to
the selection dialog and asserts both are members after assignment.
Fixes#27277
Every AKElement built its own CSSStyleSheet from the brand's custom CSS,
so a page with N elements parsed the brand CSS N times and held N
copies. Lit's sheet cache never hit because createCSSResult wraps the
string in a new strings array each call. This hurts most when the brand
CSS inlines a font or image.
Build the sheet once and have every element and nested shadow root
adopt it. The cache is keyed on the CSS text so a re-read server
context, as injectBrand does in tests, still gets a matching sheet.
* core: store passwords as authenticator devices
* core: address review feedback on password devices
* core: merge password device migration branches
* core: linearize password migrations and repair downgrade order
* core: simplify staged password accessors and saves
* core: update only the hash during password rehashing
* core: cover staged password writes and rollback
* stages/password: clarify device exclusions and verify single SSF events
* stages/user_write: persist password-only changes
* stages/user_write: format the password change snapshot
* core: load password dates with the user list
* core: return explicitly after saving a password device
* core: isolate password storage and preserve Django save semantics
* core: load password devices with nested user lists
* stages/password: regenerate the complete device schema in the base layer
* core: write passwords through the password device
Drop the PasswordUser adapter that staged password writes on the user
until save(). Callers now use PasswordDevice.set_password(),
set_password_from_hash() and set_unusable_password(), which write the
device immediately and then save the user, so outgoing sync and the
policy cache still see password changes.
User keeps read-only password and password_change_date properties
because property mappings (including the Google Workspace and Entra
system blueprints) and Django's session hash read them. Django's
password writes on User now raise instead of assigning the property, so
create_user(), `ak changepassword` and guardian's anonymous user go
through the device or skip the password.
The data migration copies passwords in Python with chunked_queryset and
skips unusable passwords, since a user without a device has no usable
password. It no longer copies passwords back on downgrade; the legacy
columns stay in place until a later release.
* sources/ldap: set password through PasswordDevice in AD error test
* web/elements: keep dialog messages after the dialog closes
A dialog's messages render in its own container, above the modal backdrop.
Closing the dialog removed them, along with confirmations shown on submit.
- Move a closing dialog's messages to the next container: the dialog below, or the page
- Add `findMessageContainer()`, shared with `showMessage()`
* web/elements: remove the unused ak-message event listener
Every message container listened on `window` for `ak-message`, and never
stopped. Nothing dispatches the event. The listener kept each closed dialog's
container in memory.
- Remove the listener from `MessageContainer`
- Remove `AKMessageEvent`
* stages/authenticator_webauthn: don't offer signature algorithms OpenSSL can't verify, fixes WebAuthn under FIPS
* note fips mode enabled in error logs
* just make fips compatibility a static list
---------
Co-authored-by: Dewi Roberts <[email protected]>
Configure cspell to not print its progress messages (thousands and thousands of lines of files checked), as that obscured any actual error messages, but also ensure that it does display a summary message at the end of its run for auditing purposes.
* root: clear in-memory caches after test fixture setup
The first test's setup creates the test database, and its migrations
fill the system settings cache. When that takes longer than the cache
timeout, the test starts on a stale entry whose refresh runs on a
background thread. That thread's connection cannot see the test's
uncommitted writes, so the refresh undoes flags the test patched.
* Apply suggestion from @BeryJu
Signed-off-by: Jens L. <[email protected]>
* sigh
Signed-off-by: Jens Langhammer <[email protected]>
---------
Signed-off-by: Jens L. <[email protected]>
Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens L. <[email protected]>
In cached bind mode the refresh rebuilt the provider instance but kept
the previous session binder's direct binder, and that binder reads the
bind flow, the unbind flow, MFA support and the base DN from the
instance it was built with. A change to any of them on the provider
never reached a running outpost: it carried on executing the old bind
flow until the process was restarted, while the refresh log said the
new flow had been loaded. The cached results survived the refresh too,
so a bind refused under the old settings stayed refused, and one
accepted stayed accepted, for the life of its entry.
The direct binder is now always built from the new instance. The
session cache is carried over only when the settings that decide a
bind's outcome are unchanged; when one of them changes, the old cache
is stopped and a fresh one started, so every pair of credentials runs
the new flow once more and is cached again under it. The five-minute
refresh keeps the cache in the ordinary case; the cost lands only when
an administrator changed something, which is what the change was for.
Also fixes the comment on the caching line, which said the opposite of
what the code does: a result is cached whenever the bind itself
completed, refusals included; only a transport error is left uncached.
Tests: a refresh with unchanged settings keeps the cached sessions; a
changed bind flow, unbind flow, MFA setting or base DN discards them,
refusals included; and the direct binder answers for the new instance's
base DN after a refresh. The last two fail on the previous code.
Co-authored-by: Jens L. <[email protected]>
* website/docs: document next actions on login
* website/docs: clarify required-action scope and recovery
* website/docs: explain required-action redirect limits
* website/docs: explain assigning next actions in user attributes
* website/docs: locate the advanced attributes editor
* website/docs: rename next actions to required actions
Actions now apply on the user's next request rather than at their next
login, and the user resumes the page or flow they were in afterwards.
Flows that redirect or send the user to a source can't be used, since
the action flow has to finish on its own.
* website/docs: document what required actions don't cover
* stages/user_login: restrict sessions with next actions
* core: return a fixed next-action validation error
* stages/user_login: keep malformed next actions restricted
* stages/user_login: preserve required flow plans on direct entry
* stages/user_login: preserve attribute updates during action completion
* stages/user_login: enforce next actions when adding an account
* stages/user_login: reuse Django routing for restricted sessions
* core: verify delegated next-action permissions
* stages/user_login: resolve required flows with Django in_bulk
* core: simplify next-action audit handling
* stages/redirect: retain required-action completion across flow handoffs
* stages/user_login: remove redundant next-action tests
* enterprise: own required-action enforcement and validation
* enterprise: simplify next-action audit changes
* stages/redirect: make cooperative initialization explicit
* core, enterprise, web: enforce required actions on every request
Review asked for three changes: pause and resume flows the way the
Source stage does instead of splicing a completion stage into other
flows, apply actions to sessions that already exist, and a clearer name.
The middleware now reads goauthentik.io/user/required-actions on every
authenticated request, so an action added to a logged-in user applies on
their next request and the User Login stage needs no hook. Starting an
action suspends what the user was doing: a flow in progress is kept on
the action's completion stage and restored afterwards, and any other
page is opened again. The Redirect stage hook is gone, so an action flow
can no longer hand off to another flow.
The set and removed events are dropped because the user's model_updated
event already records the attribute change. Validation only runs when
the value changes, so a deleted flow doesn't block unrelated edits.
* enterprise/required_actions: tighten validation and resumed requests
Reject flows that a logged-in user can never plan, such as the
unauthenticated recovery and enrollment flows, which would otherwise
lock the user out. Keep the body of a suspended POST in the session,
as the login redirect does, so a SAML POST binding still works once the
actions are done. Complete the action for the plan's pending user, so a
plan restored in another browser from an email link doesn't fail.
* set the pending user on action plans
Otherwise an Email stage can fail with "No pending user." and leave
the user stuck.
---------
Co-authored-by: Simonyi Gergő <[email protected]>
* web/elements: formalize the timestamp display
## What
Update the timestamp display so that each component is labled, each feature has an external control made available through CSS custom properties.
The non-standard “true” default of “show-elapsed” has been reversed; it is now “hide-elapsed” and is treated correctly as a standard boolean attribute. The one place where this mattered has been updated correctly.
* Move constant to be, y'know, a constant.
* Potential fix for pull request finding 'Implicit operand conversion'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Ken Sternberg <[email protected]>
* web/elements: introduce the crontab component
## What
Provide a component that provides a textual representation for crontab entries.
## Why
Because I hate trying to interpret those things, and I can’t imagine I’m the only one.
* web/elements: formalize the timestamp display
## What
Update the timestamp display so that each component is labled, each feature has an external control made available through CSS custom properties.
The non-standard “true” default of “show-elapsed” has been reversed; it is now “hide-elapsed” and is treated correctly as a standard boolean attribute. The one place where this mattered has been updated correctly.
* Move constant to be, y'know, a constant.
* Potential fix for pull request finding 'Implicit operand conversion'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Ken Sternberg <[email protected]>
* web/elements: introduce the crontab component
## What
Provide a component that provides a textual representation for crontab entries.
## Why
Because I hate trying to interpret those things, and I can’t imagine I’m the only one.
* Spellcheckers.
* web/elements: introduce the crontab component
## What
Provide a component that provides a textual representation for crontab entries.
## Why
Because I hate trying to interpret those things, and I can’t imagine I’m the only one.
---------
Signed-off-by: Ken Sternberg <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* web/elements: formalize the timestamp display
## What
Update the timestamp display so that each component is labled, each feature has an external control made available through CSS custom properties.
The non-standard “true” default of “show-elapsed” has been reversed; it is now “hide-elapsed” and is treated correctly as a standard boolean attribute. The one place where this mattered has been updated correctly.
* Move constant to be, y'know, a constant.
* Potential fix for pull request finding 'Implicit operand conversion'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Ken Sternberg <[email protected]>
* web/elements: formalize the timestamp display
## What
Update the timestamp display so that each component is labled, each feature has an external control made available through CSS custom properties.
The non-standard “true” default of “show-elapsed” has been reversed; it is now “hide-elapsed” and is treated correctly as a standard boolean attribute. The one place where this mattered has been updated correctly.
* Move constant to be, y'know, a constant.
* Potential fix for pull request finding 'Implicit operand conversion'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Ken Sternberg <[email protected]>
* Spellcheckers.
---------
Signed-off-by: Ken Sternberg <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* server, lifecycle: drop idle upstream connections before uvicorn does
The server kept idle connections to uvicorn pooled for a minute, but
uvicorn closes them after gunicorn's keepalive of 2 seconds. A request
that reused a connection uvicorn was closing got reset after it was
sent, and the client received a 503 "authentik starting".
Drop idle connections a second before uvicorn's keep-alive runs out.
Raising gunicorn's keepalive above the pool timeout would also work,
but uvicorn before 0.53 keeps a connection open after a request with
`Connection: Close` and silently drops the next request on it, so on
2026.8 a longer keepalive would leave that connection in the pool for
a minute instead of 2 seconds.
* server, lifecycle: raise uvicorn keep-alive to 5 seconds
* outposts: only write changed service account permissions
Closes: #26924
* outposts: add API endpoint to rebuild service account permissions
Saving an outpost no longer deletes and recreates every permission of
its service account, which was useful when troubleshooting a desync.
POST /outposts/instances/{uuid}/rebuild_permissions/ does that full
rebuild explicitly and requires permission to change the outpost.
* outposts: test that a missing permission keeps existing ones
* outposts: type and rename existing permission sets in build_user_permissions
* outposts/proxy: honor X-Forwarded-Host in envoy forward auth
The envoy handler built the post-login redirect from the raw Host
header, while the outpost picks the application with the ak-axum Host
extractor, which uses X-Forwarded-Host from trusted proxies. When a
front proxy rewrote :authority to an internal name, users landed on
that internal host after login. The Go outpost replaced the host with
X-Forwarded-Host for trusted proxies, so this broke in the Rust
rewrite.
Use the same extractor for the redirect target. Untrusted peers still
cannot pick the redirect host.
Closes: #26867
* outposts/proxy: drop envoy handler tests that repeat ak-axum coverage
* outposts/proxy: test that envoy forward auth uses the forwarded host
The envoy_forward_target unit tests pass a host string directly, so
they still pass if handle_envoy goes back to reading the raw Host
header. Drive the handler through host_middleware with a trusted
proxy instead. The untrusted-peer case stays out because ak-axum's
Host extractor tests already cover it.
The server passed hop-by-hop headers such as `Connection` through to
uvicorn. They describe the client's connection to the server, and
RFC 9110 requires proxies to remove them, as the Go server's reverse
proxy did. Passing `Connection: Close` on made uvicorn before 0.53
keep the upstream connection open and silently drop the next request
sent on it, which uvicorn 0.53 and hyper 1.12 now avoid.
Remove them, and the headers `Connection` names, before adding our own
forwarding headers. WebSocket upgrades keep them for the handshake.
review_attested was defined with object lifecycle management but never
emitted, so a reviewer's note on an access review reached no review
event. Submitting a review now records review_attested for the
reviewer, with the note and the reviewed object.
When a remote system answered 409 and the provider couldn't link the
existing object, ObjectExistsSyncException escaped the sync task. The
task failed with an error that named no object and said nothing about
how to resolve it, the rest of the page was never synced, and the full
sync failed before it synced groups and cleaned up. SCIM made it worse:
a search response that wasn't a ListResponse raised AttributeError and
hid the conflict.
Full, direct, delete, and membership sync now log a warning with the
object and the remote system's response, and continue. A conflict also
says what to change. Errors that don't belong to one object, from
discovery or cleanup, end the full sync with a task error, as StopSync
already did.
Several errors could not reach that log. StopSync never set the
response that str() reads, so printing it raised AttributeError, and
Google Workspace passed two arguments to exceptions that take one, so
every 400 raised TypeError. Entra ID turned every Graph error into
StopSync before checking its status, so its conflict and re-create
handling never ran. It now maps 400, 404, and 409 like the other
providers, keeps Graph's error message, and no longer compares
odata_count, which Graph only returns when a count is requested.
Linking after a conflict now only links the matching object. SCIM
checks the returned userName or displayName, since some servers ignore
the filter, and Google Workspace checks the primary address, so an
address held by another kind of object or an alias is reported instead
of linked. Removing a member who is already gone counts as done.
Closes: #26904
With authentik under AUTHENTIK_WEB__PATH, outposts could not reach it:
- The RAC outpost built its session websocket URL from the API client's
scheme and host only, so it dialed /ws/outpost_rac/... and got a 404,
while the control websocket already kept the path. Both now go
through one dialer, which also gives the session websocket the unix
socket support and query parameters of the control websocket.
- The API base was the path of AUTHENTIK_HOST with "api/v3" appended, so
a path without a trailing slash, such as /authentik, became
/authentikapi/v3. The websockets already joined the path correctly.
- The default outpost config, which the admin interface pre-fills for
new outposts, set authentik_host to the server root.
Closes: #26803
Some URLs were built from the page's origin instead of the web base
path, so with authentik under AUTHENTIK_WEB__PATH they pointed outside
of authentik: the RAC tunnel websocket, the flow "Execute" buttons,
invitation links, the AUTHENTIK_HOST shown in the outpost deployment
info, and the event map, about dialog and email preview assets. The RAC
websocket also missed the session cookie, which is scoped to the web
path, so authentik refused it even where a proxy rewrote the path.
Closes: #26803
* website/docs: document exchanging a token for a SAML response
* Update website/docs/add-secure-apps/providers/oauth2/token_exchange.mdx
Co-authored-by: Jens L. <[email protected]>
Signed-off-by: Dominic Roy <[email protected]>
---------
Signed-off-by: Dominic Roy <[email protected]>
Co-authored-by: Jens L. <[email protected]>
* fix(server): quiet health_live warn when upstream socket not ready
Before the Unix socket exists, health_live (and the analogous path in
the worker) called the upstream via hyper_util's legacy Client. A
connect failure with ENOENT (No such file or directory) was logged at
warn level, producing false-positive production warnings from the
in-process healthcheck during every normal startup.
Add a small helper that walks the error's
source chain looking for an with .
In (server and worker), use it to downgrade that
specific case to ; all other connect/request failures continue
to log at so real outages remain visible.
The fix still returns Err so the health endpoint correctly reports
not-live until the socket is up — it only adjusts the log level for
the expected startup race.
Signed-off-by: hippi345 <[email protected]>
* fix(server): suppress AppError warn for health_live on startup ENOENT
When the upstream Unix socket does not yet exist, the health_live
handler in src/server/core.rs used to call server.health_live().await?
which converted the eyre::Report into AppError. AppError::into_response
unconditionally logs warn!(err = ?self.0, "error occurred"), producing a
second spurious warning on top of the one already silenced in the client
layer.
Replace the await? with an explicit match. A Connect/NotFound error
(socket not ready) is now logged at debug and the handler returns
SERVICE_UNAVAILABLE directly, bypassing AppError entirely. All other
errors continue to log at warn and return SERVICE_UNAVAILABLE; no error
is silently swallowed.
Apply the same debug/warn split to the worker healthcheck handler
(src/worker/healthcheck.rs), which also logged warn unconditionally in
its Err arm. Expose is_connect_not_found as pub(crate) in both
server/mod.rs and worker/mod.rs so the respective handler files can
import it.
Signed-off-by: hippi345 <[email protected]>
* dedupe
Signed-off-by: Jens Langhammer <[email protected]>
* format
Signed-off-by: Jens Langhammer <[email protected]>
---------
Signed-off-by: hippi345 <[email protected]>
Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens L. <[email protected]>
* blueprints: reapply when `!Env` or `!File` values change
The values are keyed with the secret key before they go into the hash, since
the hash is visible in the API and a plain hash of a short secret could be
guessed. Blueprints without these tags keep their current hash.
Closes: #26925
* website/docs: note that blueprints reapply when `!Env` or `!File` values change
The access request events only referenced the request, so the notes a
requester entered in the request flow and the notes reviewers left on
an approval or denial never reached the event log. The request is
created with auditing suppressed, so the requester's notes were not in
any event at all.
access_request_created now carries requester_data. The approved and
denied events carry every reviewer's decision with its notes, so
earlier approvers of a multi-reviewer rule are kept too. The approved,
denied and revoked events also resolve their targets to the
application or entitlement instead of the bare policy binding model.
Closes: #27185
Describe when the SCIM, Google Workspace, and Entra ID providers link
an object that already exists in the remote system, what the sync task
logs when they can't, and how to resolve the conflict.
* inital attempt to support ldap account expiration
* prefer MicrosoftActiveDirectory helpers
* sources/ldap: extract account status aggregation from user sync
* never let continuous login block the final redirect
The final redirect awaits continuous-login orchestration and the exit
bookkeeping before navigating, so any error or hang there leaves the
page on the spinner after the server has already finished the flow.
In Google's Android account setup WebView, localStorage is null and
the orchestrator throws (#23660, #26267).
- Catch and log orchestration errors in RedirectStage, then always
navigate.
- Return a copy from discoverTabs(). waitForTabExit() rediscovers
while the leader iterates the live Set, and entries re-added during
for...of are visited again, so a follower that never exits was
resumed forever.
- Resolve the wait when rediscovery rejects in the timer callback, and
release the tab lock in a finally block.
* web/flow: elect continuous-login resume leader with a Web Lock
Replace the hand-rolled localStorage lock — a non-atomic check-then-set
guarded by a tab-liveness heuristic — with navigator.locks. `ifAvailable`
gives immediate leader election with no double-leader race, and the
browser releases the lock on navigation or close, so there is no stale
lock to reap and no manual cleanup.
* web/test: cover continuous-login multi-tab resume
Drive two real tabs in one browser context: authenticate in the leader
and assert the follower leaves the identification stage on its own. The
global flag is enabled in beforeAll and restored in afterAll; the file
carries the highest numeric prefix and runs serially so it does not race
the parallel login suite.
* Refine comments.
* web/test: align continuous-login e2e with suite conventions
Move the global-flag toggle into an e2e/ helper (setInstanceFlag) so the
test stops hand-constructing fixtures inline, and confirm the settings
save through its success toast instead of matching the settings network
response — keeping the flow on the UI like the rest of the suite.
* web/test: pad the continuous-login visibility assertions
* web/flow: rework continuous-login unit tests around the Web Lock
* web/test: wait for each tab to see the continuous-login flag
* web: share server-context document readers via @goauthentik/core/document
* web/flow: share a brand injection helper across continuous-login tests
* Clean up comment.
---------
Co-authored-by: Teffen Ellis <[email protected]>
Co-authored-by: Teffen Ellis <[email protected]>
When gunicorn recycles a worker after max_requests, the worker closes its
idle keep-alive connections. A request the server had already sent on one
of those pooled connections failed with a connection reset or broken pipe,
and was answered with a 503 "authentik starting" even though gunicorn was
healthy.
Retry such requests once on a new connection when they are safe (GET,
HEAD, OPTIONS, TRACE) and have no body, as Go's net/http transport did
for the previous server, and log upstream errors that still end in a 503.
Fixes#26274
Claude-Session: https://claude.ai/code/session_01WX2DCUMd7PSr17cXK69vQF
* flows: count cache keys in the database
* fix lint
* flows: count cache entries without extending the cache backend
* packages/django-postgres-cache, flows: add keys_count to the cache backend
keys() is already a method of our backend rather than Django's cache
API, so counting belongs next to it instead of in a direct CacheEntry
query in the flow API. Both methods share one filter, so a count always
matches the length of the key list for the same pattern and version.
* packages/django-postgres-cache: type keys_count test against DatabaseCache
* web/elements: prevent wizard double submission
Ignore Next while a step is saving and disable the button meanwhile, so
a second activation can't post the form again. Clear the busy state when
the save fails.
The provider tests' verification searched the table while the wizard was
still open. The modal kept the search field inert, so its Enter went to
the focused Create button and submitted the form a second time. Wait for
the wizard to close first.
Pad each byte in IDGenerator.randomID so IDs have the requested length.
* web/element: remove license & capabilities requirements from SidebarItem
This commit moves the “isLicensed” and “canEnterprise” checks in SidebarItem and instead decorates the SidebarEntries collection with additional flags and values to support holding the information entirely within the Admin UI.
SidebarItem takes two additional attributes: `notice`, which is where the “Enterprise Only” message goes, and `pathoverride`, which will override the default path if provided. This is hardly an elegant way to go around it, but it preserves the original `entries` tree, producing a new tree and not mutating the original. With this, SidebarItem (and Sidebar itself!) is completely generic and no longer needs to know anything at all about licensing or enterprise capability.
The CSS for SidebarItem has been modified: it’s just `notice` not `enterprise-ntice` now. Fit for any purpose under the sun.
A new function, `resolveSidebarEntries`, completely centralizes the logic for “do we even show Enterprise features” and “if the user isn’t licensed, decorate them with ‘enterprise only’ markers”; it contains the logic dictating, for each element in the SidebarEntries tree, if the instance isLicensed and canEnterprise; it filters out entries that are enterprise-only when the instance does not support enterprise features, then generates the new tree, decorating the `attributes` field with the “Enterprise only” message and path override as required. These generic features are passed to SidebarItem.
`ak-interface-admin` then needed only to <s>rip out</s> modify the navigationEntries method to use the `resolveSidebarEntries` function, and remove the redundant check for enterprise-only features in the palette-generator, since those features will not be present after the resolver does its magic.
Also: A couple of tests.
* web/admin: hide enterprise notices until the license summary loads
* web/admin: Make Sidebar a wholly coherent and independent entity
This commit revises how Sidebar works.
I introduce a new type that the Sidebar understands: `SidebarItem`:
``` javascript
export interface SidebarItem {
label: string;
key: string;
expanded?: boolean;
path?: string | null;
notice?: string | TemplateResult | null;
children?: SidebarItem[];
}
```
This type is meant to drive the Sidebar alone, independent of the needs of any client code (although it is, obviously, good enough to support ak-interface-admin).
I revise `Sidebar` to be the whole component; no SidebarItem renderer, no slots. The container into which it is rendered is the client code’s responsibility. There are two levels of rendering: the Groups and the Items, and right now they’re only distinguished by “Does it have children?” There were four renderers in SidebarItem, and two of them are gone since they were unused.
I have deliberately left room to revise this again so that a second-level can support a path *and* children. I have an idea for what to do with it.
The CSS has entirely been brought in to handle a single sidebar.
This is entirely in a controller now; it only needs to be included to do its magic, and it works quite well. I have also revised the very long function names in `expansion.ts` and treat the entire file as a single namespace. The names are shorter and more readable, and can be imported with the `* as SidebarExpansion` syntax to support the full namespace.
This makes Sidebar Session Persistence swappable with a Sidebar Device Persistence (using `localStorage`), should we so desire.
Functions in `expansion` that no one was using have been deleted. YAGNI forever.
*`sidebarEntries.ts`*
The navigation folder is split: the `Entries` file was always meant to be an easy-to-find collection of all the *Entries*, and nothing more, the Entries themselves were meant to be easily editable and fit within a visually informative table. All the tooling cluttered that. With one exception, all tooling has been mooved to the `Tools` file. That exception is a tool, *here*, that will either hand you a “plain” SidebarEntries, or a “can enterprise” SidebarEntries, based on a flag. That logic does not belong in the Interface file.
*`sidebarTools.ts`*
Contains two separate units: one converts the `SidebarEntries` collection into a `SidebarItems` collection fit for sending to the Sidebar. The others (a) assists the Interface in finding the right key to send to the Sidebar for the current path, and (b) assists the header in filling out the page title.
Due to some of the needs in the Interface, `resolveSidebarItems` is an `ExtendedSidebarItem`; it has extra fields to help the CommandPalette. The shape passed to Sidebar is an unchanged `SidebarItem`.
The palette code is revised to understand the new `ExtendedSidebarItem` format.
The `ak-page-navbar` and `ak-sidebar` calls have been revised to take the new format. The values are derived at the beginning of the `render()` function to avoid multiple calls to the resolvers.
* web/admin: drop redundant children fallback in sidebar resolver
* web/elements: separate the enterprise notice from the sidebar link label
---------
Co-authored-by: Teffen Ellis <[email protected]>
* web/elements: rebuild ak-checkbox-group as a form-associated element
ak-checkbox-group now extends FormAssociatedElement instead of the
deprecated AKControlElement, and is form-associated whether or not it has a
name.
`value` is the host's selection and `values` holds the user's choices. A
custom hasChanged compares the two selections as sets of names. Most call
sites compute `value` with map/filter on every render, so a new array with
the same names keeps the user's choices and different names replace them.
This replaces the "apply value on first update only" flag and drops the
write-back into `value`.
The change and input events now reach the host's ancestors. The old
connectedCallback stopped every change and input event on the element,
including its own, and re-added those listeners on each reconnect. Native
input events stop at the checkbox instead.
Form association brings form.elements membership, one FormData entry per
chosen option, formResetCallback restoring the host's value, and a missing
value reported on the first checkbox when `required`. Checkboxes bind
`.checked`, so a reset updates boxes the user already toggled.
* web/elements: return early from ak-checkbox-group validity sync
* web/element: Move the SidebarVersion out of Elements.
# What
This commit moves the SidebarVersion element, which yes shows the version information in the sidebar. The component is moved into Admin, and the Sidebar now provides an active slot for it. Since it is now indpendent of and never even mentions “Sidebar” on its own, it’s now renamed `VersionDetails`.
# Why
SidebarVersion uses WithLicenseSummary, which has knowledge of the API. The long-term goal of the Elements is to extract from it every element that does *not* need to know about the API, and this was one of the first things I encountered while working on the SidebarIcons project.
# Details
SidebarVersion had a lot of aria that wasn’t necessary. The `aria-labels` overrode much of the text, so the user would hear that there was version information available, but would never actually hear the version information. Headers inside a button would get discarded by some screen-readers because that doesn’t make sense inside a button. Buttons can only contain “inline” content, so using `<span>` and then styling them to be block is the correct way to make sure the information remains accessible while meeting the expected layout.
`aria-controls` in the Interface pointed at nothing, because it was referencing an `id` that doesn’t cross a shadow-root. I’ve changed the target, so at least now that’s going to the right place.
The PFNav and PFAvatar imports were never used inside SidebarVersion. They’ve been removed.
The hover styling has been moved into SidebarVersion explicitly.
VersionDetails is now slotted into the Sidebar so it is visible in the Admin lightDOM, and in consequence it no longer needs its `exportparts`.
`@patterfly-element/pfe-core` has been a part of our product since we included some of the elements into our base, notably the original Tooltips. This only makes it explicit that we use it.
The check-for-undefined in the VersionDetails renderer did nothing; we already check if `this.version` is defined, and if it is, `versionCurrent` is not allowed to be null or undefined. If the type and the behavior don’t coincide, that’s a problem for the back-end team. 😈
Since we’re exposing `[part]` names for styleability, I’ve changed the class names inside VersionDetails into `[part~=]` selectors. We’re not performance-bound, and it reduced the clutter.
* Replace aria wayfinders used for testing with Open UI Automation identifiers.
* web/test: locate the about button by role and name
---------
Co-authored-by: Teffen Ellis <[email protected]>
* web/elements: rebuild ak-array-input as a form-associated element
ak-array-input now extends FormAssociatedElement instead of the deprecated
AKControlElement.
`items` becomes a plain reactive property. Lit's identity check decides
when the host's list replaces the rows, so re-rendering with the same array
keeps the user's edits and a fresh fetch replaces them. A custom hasChanged
treats two empty lists as equal for hosts that pass `items ?? []`. This
replaces the JSON comparison from the previous commit.
The user's edits live in a `rows` state with keys assigned once per row.
Rows report their value through their change event instead of the element
scraping every row from the DOM. Row change events stop at the array
input, which dispatches one change per edit.
Form association brings form.elements membership, a JSON form value,
formResetCallback restoring the host's items, and native validity: with
`validate`, an invalid row sets a custom error anchored on that row, and
`required` reports a missing value when the list is empty. The element
implements SettlingFormField, so Form.submit() waits for the rows to render.
Footer link and OAuth2 redirect URI rows delegate focus, so a new row's
first control is focused after "Add entry".
* web/elements: match ak-array-input validity sync to the other form-associated elements
Radio, ak-codemirror and ak-search-select each keep a #syncValidity() that
sets the form value, builds the flags and message, and calls
internals.setValidity() once.
* web/elements: return early from ak-array-input validity sync
* web/admin: Simplify sidebar entries handling
This commit streamlines how sidebar entries are generated and validated. The `entries` field was only being used as a signal to `requestUpdate()`; the actual entries were being generated on the fly in `get navigateEntries()`.
We already had functions to generate the base entries and the enterprise entries, and putting the “just base or base + enterprise” function into the `sidebar.ts` file reduced the `navigateEntries` to two lines, and separates the “canEnterprise” from “what does that mean for sidebar” nicely.
@GirlBossRush, there’s a `validateRoutes` function in `./src/admin/navigation/sidebar.ts` that I tried to make into a unit test, but I could not get to run under Vitest, mostly because `Routes.ts` has exactly one side-effect import and Vitest cannot handle that. I didn’t want to make it a browser test, however. Any suggestions?
* That side effect infected downstream tests. Darnit.
* Formatter opinions.
* Moving the load of the AdminOverviewPage to the entrypoint. The idea is to have the dashboard as live as possible as early as possible. Putting into Routes made Routes into a browser-only feature, and it could not be unit tested without this move.
* The test exists and passes.
* web/sidebar: move route validation into the unit test
---------
Co-authored-by: Teffen Ellis <[email protected]>
* web: move stylesheets into per-interface folders
Groups the entrypoints and flow stylesheets under styles/if/{authenticated,flow,shared}. Renames and path updates only.
* web/flow: widen login card and align breakpoints
Bumps the card width from 35rem to 36.25rem (matching the small dialog), raises the background-image height cutoff to 27.5rem, and makes the small/large media queries use <= and > consistently so no viewport size matches both.
* web/flow: add FlowMeta type and default flow metadata
* core: extract loading spinner template
Also makes the spinner's aria-valuetext translatable.
* web/flow: render loading overlays from server-provided slots
The flow template now ships card and viewport overlays as slotted light DOM, replacing ak-loading-overlay. The executor only exposes their slots while a challenge is reloading, and overlay.css picks which one is visible per layout and viewport size.
* Add docs
* Update website/integrations/development/claude-code/index.mdx
Co-authored-by: Jens L. <[email protected]>
Signed-off-by: Dewi Roberts <[email protected]>
* Update website/docs/endpoint-devices/authentik-agent/device-authentication/cli-app-authentication/index.mdx
Co-authored-by: Jens L. <[email protected]>
Signed-off-by: Dewi Roberts <[email protected]>
* Changes based on Jens' feedback
* website/docs: cleanup
---------
Signed-off-by: Dewi Roberts <[email protected]>
Co-authored-by: Jens L. <[email protected]>
Co-authored-by: Dominic R <[email protected]>
* website/integrations: add filex
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* filex: clean up
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Dominic R <[email protected]>
Render <ak-mdx> with content that calls a probe from an expression and
from an ESM export, and assert the probe never runs, while Markdown
still renders.
Co-authored-by: Teffen Ellis <[email protected]>
* root: require Node.js 24.22.1
Raise the minimum Node.js version to the 24.22.1 security release
across `.nvmrc`, `engines.node`, and `devEngines.runtime`.
https://nodejs.org/en/blog/release/v24.22.1
* lifecycle/container, website: bump node images to 26.12.1
Pin both build images to the 26.12.1 security release. The server
image previously floated on the `26-trixie-slim` tag.
https://nodejs.org/en/blog/release/v26.12.1
* ci: fix stale setup-node version comments
The pinned commit is already v7.1.0 (#26852, #26854).
* scripts/node: support || and ^ ranges in lint-runtime
Check versions against every `||`-separated comparator instead of a single `>=` or exact pin.
* root: exclude unpatched Node.js 25 and 26 releases
Narrow the engines range to `^24.22.1 || >=26.12.1`. The previous
`>=24.22.1` also accepted 26.12.0 and every 25.x release.
* update 1
Signed-off-by: Henry <[email protected]>
* info
* rename + title on info section
* website/docs: !
---------
Signed-off-by: Henry <[email protected]>
Co-authored-by: Dominic R <[email protected]>
* lifecycle/container: build the server image distroless
* redo
* wip
* shorter comment
* update base images from fips#178
Co-authored-by: Emil Burzo <[email protected]>
Signed-off-by: Emil Burzo <[email protected]>
* non-PR fips image
---------
Signed-off-by: Emil Burzo <[email protected]>
Set `importFileExtension` so the generator emits Node-resolvable
relative imports, and switch the client to `nodenext` module
resolution in place of the bundler-only workaround.
* web/elements: show the table loading state until the first response
Since #26423 dropped the visibility check from renderRows, a table whose
first fetch is deferred until it scrolls into view rendered its empty
state, including the empty state's own create button, until that fetch
started. Render the loading state whenever there's no data yet, which is
what #26423 describes, while still not reverting to it once data exists.
* web/elements: rerun a table fetch requested while one is in flight
Table.fetch() returned early while a request was in flight, so a search
typed during the first load was silently dropped: the box showed the
query while the table kept the unfiltered results. Queue the request
instead and run it once the in-flight one settles, with whatever
parameters are current by then. Repeated requests collapse into one
follow-up.
* web/e2e: filter search selects for plain-text patterns
selectSearchValue only typed a filter for string patterns, so a RegExp
like /default-authentication-flow/ searched the picker's first page of
options. Once a dev instance accumulates enough test flows, the stock
defaults drop off that page and unrelated provider and brand tests fail.
Type the pattern's text as a filter when it's plain, and fall back to
the unfiltered list for options the server doesn't search, such as the
blank choice.
* Format.
* providers/saml: add configurable assertion encryption algorithm
* update to main and add docs
* show only when encryption certificate is set, update help text
* default to aes256-gcm
* update wording
* update
* Docs tidy
* feedback
---------
Co-authored-by: Dewi Roberts <[email protected]>
Form.submit() became async in #26566 and now awaits settleFormFields()
before serializing. That gives the host form a chance to re-render first,
and Lit re-assigns array property bindings on every render, so
`.items=${settings.footerLinks}` reset the list to the server's copy and
the PUT went out with stale values.
The items setter now ignores a list whose contents match the one the
parent last assigned.
This also fixes a long-standing keying bug. The setter's map callback had
its arguments swapped, so every row got a fresh key on each change and
`repeat` rebuilt it. Clicking from one field into another in the same row
sent the next keystrokes into a detached input. Edits, adds and deletes now
operate on the keyed list directly, and delete removes the clicked row by
key instead of by index.
* web: namespace storage keys and migrate legacy values
Split #common/storage into an accessor and shared types, and require
storage keys to use the ak: prefix via a PersistenceKey type. Values
under the old remember-me and library view mode keys are moved to the
new keys on load, so returning users keep their remembered username and
layout. The migrations are marked for removal in 2027.2 (#27036).
Remove ShowHintController, which has had no users since #21781.
* web/flow: fix remember-me being cleared by CSRF token rotation
The remembered username was keyed to a session ID derived from the CSRF
token, and cleared whenever the two didn't match. Django rotates the
CSRF token on every successful login, so the check failed on every
later visit and the username was always forgotten. Drop the check, so
the username is only cleared by switching the toggle off or following
"Not you?", and discard the session ID left by earlier versions.
Co-authored-by: Shawn O'Dell <[email protected]>
* web/flow: bind remember-me keystroke listener for returning users
The remember-me input listener was only attached from the toggle's change
handler, so a returning user, who arrives with the switch already checked,
never had it bound. A different user on the same device could type and
submit their own username without it ever reaching localStorage, leaving
the previous username prefilled forever, and auto-submitted in
identification-only flows.
Track whether the feature is on, seeded from the persisted value, and
reconcile the listener when the controller connects and after each update.
The stage adds the controller after it has rendered, so a further update
isn't guaranteed. Cancel a pending keystroke write when the listener is
detached, so switching the toggle off can't be undone by a write queued in
the same frame. Disconnect the controller before the stage removes it,
since removeController doesn't notify it and the listener would otherwise
keep recording after the server turns remember-me off.
Co-authored-by: Shawn O'Dell <[email protected]>
* web/flow: respect the remember-me toggle when auto-submitting
canAutoSubmit only checked whether a username was remembered when the
page loaded, so a returning user who switched the toggle off was kept
from being auto-submitted only by the one-shot attempt counter. Also
require the feature to still be on. Checking only the live toggle state
would instead auto-submit first-time visitors as soon as they opted in.
* web/e2e: wait for the login flow before running browser tests
The API answers before the worker has applied the default blueprints.
Until then `/` redirects to an authentication flow that doesn't exist
yet and 404s, so the availability check could fail on a slow start and
skip the whole suite. Poll until the redirect chain resolves, and run
the setup steps serially so the login step waits on it too.
---------
Co-authored-by: Teffen Ellis <[email protected]>
## What
This commit removes the generation of the seven categories from the Theme build:
- `./color.css`
- `./typography.css`
- `./spacing.css`
- `./shape.css`
- `./shadow.css`
- `./motion.css`
- `./z-index.css`
And correspondingly:
- The exports are removed from `package.json`
- The documentation has been updated to remove the reference to the category files
- Bumps the major version number to reflect that this is a major change, even if we have no one who uses the removed feature.
## Why
Mostly because we’re not using it, and we don’t know anyone else who is. Lines of code we run with every build, that builds tools we never use, is a liability in terms of maintenance, performance, test time, and code quality. These files are generated through regular expressions over the generated CSS, which is notoriously fragile; a change in the Styleframe output would require corresponding changes to the parser. There are no tests to validate the parser output.
If we need them back someday, (a) they’re still there, and still categorized, in the DTCG (Design Token Community Group) files and can be extracted at any time and (b) the original code is still in the git history, there for as long as the repo lasts.
Practically, *we* don’t even use the categories in Patternfly SASS files when we look something up; we just got to `patternfly.css` and look at the generated theme file. What `package.json` generates is the base theme for Authentik and the metadata necessary to make that theme malleable for agents and automation tools. The DTCG and Theme CSS Custom Property files are more than sufficient for that purpose; if anything, as a separate source of truth for “what is a property set to?” the category files are a barrier to tooling rather than a help.
* core/outposts: Move `setOutpostHost()` from the client to the server
## What
Writes the `config.outpost.authentik_host` field from information derived on first set-up and available server-side, then removes the same transaction from the client.q
## Why
@beryju has proposed some changes to the Dashboard, and making them would be awkward if a critical infrastructure transaction like this were made “optional” to the system administrator. My first thought was to move just this transaction into a ReactiveController so we could hook it into the lifecycle of something else, like the Dashboard shell or even the entire Admin application shell in ak-interface-admin. He pointed out that the current `main` has `base_url` as a *required* field. So putting it into the server makes sense.
The port was straightforward. I’m not so confident about the tests, but I think they’re right. I’m not as comfortable with the reconciliation process as I should be. There’s some deep magic there. (And *why* is `ManagedAppConfig` in `blueprints`, of all places?)
* Sigh.
* Have I ever mentioned how much I hate side-effects?
{id="RUSTSEC-2026-0374",reason="basic-toml is a build-time only dependency of the askama template engine, not shipped in the app or daemon; remove when askama drops basic-toml"},
Loaded 100 of 1622 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.