Move Authentik users and groups to their own tab

Apps → Authentik now has two tabs for administrators: Status (the outposts,
certificates, tokens and alerts, as before) and Users and groups (New user,
Users and Groups). The tab is a ?view=users link like the other pages' tabs;
everyone else sees only the status. Docs updated to name the tab.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-01 01:08:07 +01:00
1 parent c9385387bc
commit 655b1443ec
5 files changed
+63 -17

No files matched your search

+4 -4
View File
@@ -521,16 +521,16 @@ osTicket's API cannot close a ticket, so this is the one place in the app that *
- **Config fields:** the **address** of Authentik (`https://auth.example.lan`), an **API token** (Authentik → Directory → Tokens and App passwords → *Create*, intent **API Token**, for a user who may read; stored encrypted), optionally a **token for making and managing users** (below) and, for an https address with a certificate you made yourself, *insecure*.
- **Required access:** read only. This app only ever sends GET requests: the version, the workers, the outposts and their health, the certificates, the tokens and the events log. **Nothing is ever changed.** Give the token a user with just enough to read these (an administrator, or a user in a role that may view them);
if one of the lists is refused, that part is left out and the rest still works.
- **Making and managing users (optional, administrators only):** with a second, separate token in *Token for making and managing users* — an API token of an account that may add, change and delete users, which is close to an administrator of Authentik, so give it only if you want this — **Apps → Authentik → New user** makes a user
- **Making and managing users (optional, administrators only):** all of it is on its own tab, **Apps → Authentik → Users and groups**, which only an administrator sees; **Status** (the default) stays what it was. with a second, separate token in *Token for making and managing users* — an API token of an account that may add, change and delete users, which is close to an administrator of Authentik, so give it only if you want this — **Apps → Authentik → Users and groups → New user** makes a user
(user name, name, an email if there is one, and groups, which are read from Authentik when the form opens; a group that makes members administrators of Authentik is marked) and then a **one-time recovery link** for them. They open the link and **choose their own password**: this app never sets, sees or keeps one.
The link is in the answer to that one request and nowhere else (not stored, not in the audit log); the audit log has *who made which user* and *who made a link for whom*, never the link or a token. If the user is made and the link is not (Authentik needs a **recovery flow** on the brand — System → Brands),
the page says so and the link is made in Authentik (the user → *Create recovery link*). Authentik builds the link from the address it was called at, so the integration's address should be the one people use. The token for making users is only used for this; reading Authentik never uses it,
and *Stop allowing this* on the page removes it again (the reading token stays).
**Users** on the same page lists the people (service accounts — what an outpost or an integration signs in with — are left out), searchable, with whether each is on, whether they are an administrator and when they last signed in, and lets an administrator **edit a user's name, email and groups** (the user name is shown but not changeable: it is how a person is known elsewhere, and renaming could make them a new person here; Authentik is sent only what differs, as a `PATCH`, and groups as what goes in and what comes out on top of the groups the user has *now*, so a membership somebody gave them meanwhile is kept; a user whose groups Authentik does not say can be renamed but not moved between groups), **switch a user off** (a `PATCH` of `is_active` and nothing else;
and *Stop allowing this* on that tab removes it again (the reading token stays).
**Users** on the same tab lists the people (service accounts — what an outpost or an integration signs in with — are left out), searchable, with whether each is on, whether they are an administrator and when they last signed in, and lets an administrator **edit a user's name, email and groups** (the user name is shown but not changeable: it is how a person is known elsewhere, and renaming could make them a new person here; Authentik is sent only what differs, as a `PATCH`, and groups as what goes in and what comes out on top of the groups the user has *now*, so a membership somebody gave them meanwhile is kept; a user whose groups Authentik does not say can be renamed but not moved between groups), **switch a user off** (a `PATCH` of `is_active` and nothing else;
they can no longer sign in, nothing of theirs is lost, *Switch on* brings it back) or **delete** one (a `DELETE`, for good: the user name has to be typed, and is checked again by the server against the user as Authentik has them now). **Refused, by the server, with the reason:** a service account, the account the token
itself belongs to, and the last active administrator (so nobody can be locked out, or the sign-in in front of everything else cut off — for an edit, only when it would take them out of every group that makes them one); do those in Authentik. Each is in the audit log (*who edited — which fields, never their new values — switched off / on / deleted which user*). Switching off or deleting someone in Authentik does not end a session they
already have in this app: end it under Users → *Signed in now*. Lists are read 200 at a time.
**Groups** on the same page lists the groups with how many are in each and lets an administrator **make** one (a name and nothing else, a `POST /core/groups/` with `is_superuser` always false: it starts empty and is never a group that makes administrators; a name Authentik already has is its own refusal), **rename** one and **put users in and take them out** (a `PATCH` of `name` and nothing else; `POST /core/groups/{id}/add_user/` and `remove_user/`, one user each,
**Groups** on the same tab lists the groups with how many are in each and lets an administrator **make** one (a name and nothing else, a `POST /core/groups/` with `is_superuser` always false: it starts empty and is never a group that makes administrators; a name Authentik already has is its own refusal), **rename** one and **put users in and take them out** (a `PATCH` of `name` and nothing else; `POST /core/groups/{id}/add_user/` and `remove_user/`, one user each,
so somebody who joined meanwhile is never dropped by a whole list replacing the members). Everything asked is checked first and **nothing is changed unless all of it may be**: a service account, the token's own account, the last active administrator
being taken out of the group that makes them one, and someone whose groups Authentik did not say (when taking them out of such a group) are refused with the reason. If Authentik fails part-way, the answer says how many of the changes had been made, and the audit log
(*who renamed which group, who was put in and taken out*) has what was done. Whether a group **makes its members administrators of Authentik** is shown and is **not** changed or set from here, and groups are not deleted here. A group whose name is one of the
+1 -1
View File
@@ -572,7 +572,7 @@ quietly never made. The page shows the photo and video counts, what the library
**Authentik** (Apps → Authentik). Add an Authentik integration (its address and an API token) and the app watches the sign-in in front of everything else: it raises a **critical** alert when an **outpost** that guards applications stops reporting, and warns when a **certificate** or an **API token** is
about to run out (the token it reads Authentik with included), when **no worker** is connected, and when **sign-ins are failing** or flows are misconfigured. The page lists the outposts, what runs out soonest and the failed sign-ins of the last day. See INTEGRATIONS.md and docs/MONITORING.md.
An administrator can also **make a user** from that page — with a second, optional token for it — and gets a **one-time recovery link** to send them, so they choose their own password; no password is ever set or seen here, and the link is shown once and not kept. The same page lists the users and lets an administrator **edit** one (name, email, groups), **switch one off** (and on again) or **delete** one (the user name has to be typed); service accounts, the account the token belongs to and the last active administrator are refused. **Groups** can be made (empty, and never as a group that makes administrators), renamed and have users put in and taken out (not deleted, and whether a group makes administrators is not changed here); a group that decides roles in this app is marked and asks first.
An administrator also has a second tab there, **Users and groups**, and can **make a user** on it — with a second, optional token for it — and gets a **one-time recovery link** to send them, so they choose their own password; no password is ever set or seen here, and the link is shown once and not kept. The same page lists the users and lets an administrator **edit** one (name, email, groups), **switch one off** (and on again) or **delete** one (the user name has to be typed); service accounts, the account the token belongs to and the last active administrator are refused. **Groups** can be made (empty, and never as a group that makes administrators), renamed and have users put in and taken out (not deleted, and whether a group makes administrators is not changed here); a group that decides roles in this app is marked and asks first.
**Jellyfin** (Apps → Jellyfin). Add a Jellyfin integration (its address and an API key) and the app shows whether it is up, **who is streaming what** and whether it is being transcoded, the scheduled tasks that failed, and a chart of how many watched at once; it warns when Jellyfin **wants a restart**, a
**task failed** or **sign-ins are failing**. And when the Jellyfin runs on a server the app manages, **an update run asks first if people are watching**, and a patch plan **waits for them (up to two hours)** instead of restarting the machine in the middle of a film. See INTEGRATIONS.md and docs/MONITORING.md.
+1 -1
View File
@@ -163,7 +163,7 @@ even further, to admin only:
- **Immich** (Apps → Immich): everyone signed in sees the counts, the disk and the job queues; adding one (its address and API key) is an administrator's job, like any integration.
- **Paperless-ngx** (Apps → Paperless): everyone signed in sees the counts, the system status and the names of the files that failed to import; adding one (its address and a superuser's token) is an administrator's job, like any integration.
- **Prometheus** (Monitoring → Prometheus): everyone signed in sees the targets, what is down and the alerts firing; adding one (its address, and a token if it needs one) is an administrator's job, like any integration.
- **Authentik** (Apps → Authentik): everyone signed in sees the outposts, what runs out and the failed-sign-in count (the names of tokens and certificates, not their values); adding one (its address and API token) is an administrator's job, like any integration. **Making a user** there (and the groups to offer), **listing** the users and **editing, switching them off or on or deleting them**, and **making and renaming groups and changing who is in them**, are an administrator's alone, and only for an Authentik that was given a token for it; each is written in the audit log (who made, edited (which fields, not the new values), switched off, switched on or deleted which user, who made or renamed which group and who was put in or taken out of it, and who made a recovery link), never the link.
- **Authentik** (Apps → Authentik): everyone signed in sees the outposts, what runs out and the failed-sign-in count (the names of tokens and certificates, not their values); adding one (its address and API token) is an administrator's job, like any integration. The **Users and groups** tab is an administrator's alone (others see only the status): **making a user** (and the groups to offer), **listing** the users and **editing, switching them off or on or deleting them**, and **making and renaming groups and changing who is in them**, are an administrator's alone, and only for an Authentik that was given a token for it; each is written in the audit log (who made, edited (which fields, not the new values), switched off, switched on or deleted which user, who made or renamed which group and who was put in or taken out of it, and who made a recovery link), never the link.
- **Jellyfin** (Apps → Jellyfin): everyone signed in sees who is streaming and what is wrong; adding one (its address and API key) is an administrator's job, like any integration. Starting an update run on a server people are streaming from needs `startAnyway` — the update drawer asks (operators).
- **Media managers** (Apps → Media managers, for Sonarr, Radarr and Prowlarr): everyone signed in sees what each says is wrong, its queue, disks and indexers; adding one (its API key) is an administrator's job, like any integration. Nothing on the page changes anything in them.
- **App versions** (Operations → App versions): everyone signed in sees what each application runs against the newest release; switching the lookup of releases on and off, and the number of days after which a newer release is a warning, are an administrator's.
+1 -1
View File
@@ -110,7 +110,7 @@ changing `.env`.
**The first person to sign in becomes the administrator**, so sign in yourself first on a new installation. Everyone after that starts as a **viewer** until an administrator
changes their role under **Administration → Users** — or until their groups decide it ([below](#roles)).
Only people Authentik lets into the application can sign in at all, which is why the application's access policy matters: the first account is whoever you let in first. A person an administrator makes from **Apps → Authentik** is a new Authentik user, no more: to sign in here they still have to be allowed into the application (its group binding or policy), and they start as a viewer like anyone else.
Only people Authentik lets into the application can sign in at all, which is why the application's access policy matters: the first account is whoever you let in first. A person an administrator makes from **Apps → Authentik → Users and groups** is a new Authentik user, no more: to sign in here they still have to be allowed into the application (its group binding or policy), and they start as a viewer like anyone else.
## Roles
+56 -10
View File
@@ -1,8 +1,9 @@
import { useCallback, useEffect, useState } from "react";
import { Link } from "react-router-dom";
import { Link, useSearchParams } from "react-router-dom";
import { api, type AuthentikInfo, type CurrentUser } from "../api/client";
import AuthentikNewUser from "../components/AuthentikNewUser";
import AuthentikGroupList from "../components/AuthentikGroupList";
import ViewTabs from "../components/ViewTabs";
import AuthentikUserList from "../components/AuthentikUserList";
import EmptyState from "../components/EmptyState";
import TimeAgo from "../components/TimeAgo";
@@ -25,7 +26,7 @@ function Left({ days, warn, critical }: { days: number; warn: number; critical:
return <span className={days <= critical ? "text-red" : days <= warn ? "text-yellow" : "text-secondary"}>{text}</span>;
}
function Card({ a, isAdmin, onChanged }: { a: AuthentikInfo; isAdmin: boolean; onChanged: () => void }) {
function Card({ a }: { a: AuthentikInfo }) {
const s = a.state;
return (
<div className="card mb-3">
@@ -129,9 +130,28 @@ function Card({ a, isAdmin, onChanged }: { a: AuthentikInfo; isAdmin: boolean; o
{s.lastConfigError && <div className="text-secondary small">Latest configuration error: {s.lastConfigError}</div>}
</>
)}
{isAdmin && a.enabled && <AuthentikNewUser a={a} onChanged={onChanged} />}
{isAdmin && a.enabled && <AuthentikUserList a={a} />}
{isAdmin && a.enabled && <AuthentikGroupList a={a} />}
</div>
</div>
);
}
/** What an administrator can do in one Authentik: make users, look after them and look after groups. */
function ManageCard({ a, onChanged }: { a: AuthentikInfo; onChanged: () => void }) {
return (
<div className="card mb-3">
<div className="card-header">
<h3 className="card-title">{a.name}</h3>
</div>
<div className="card-body">
{a.enabled ? (
<>
<AuthentikNewUser a={a} onChanged={onChanged} />
<AuthentikUserList a={a} />
<AuthentikGroupList a={a} />
</>
) : (
<div className="text-secondary">Switched off under Integrations.</div>
)}
</div>
</div>
);
@@ -139,6 +159,10 @@ function Card({ a, isAdmin, onChanged }: { a: AuthentikInfo; isAdmin: boolean; o
/** Authentik, the front door: whether its outposts are reporting, what is about to run out, whether a worker is connected, and who is failing to sign in. */
export default function Authentik({ user }: { user: CurrentUser }) {
const isAdmin = user.role === "admin";
const [params] = useSearchParams();
// The second tab is for an administrator: everything on it is theirs alone.
const view = isAdmin && params.get("view") === "users" ? "users" : "status";
const [data, setData] = useState<AuthentikInfo[] | null>(null);
const [error, setError] = useState<string | null>(null);
const load = useCallback(
@@ -160,10 +184,32 @@ export default function Authentik({ user }: { user: CurrentUser }) {
return (
<>
<h2 className="page-title">Authentik</h2>
<p className="text-secondary">
The sign-in in front of everything else. It is read every few minutes with an API token (see <Link to="/integrations">Integrations</Link>). An <strong>outpost that goes quiet</strong> (the apps it guards stop letting anyone in), a <strong>certificate</strong> or an{" "}
<strong>API token</strong> that is about to run out, <strong>no worker</strong> and a burst of <strong>failed sign-ins</strong> are alerts — see <Link to="/alerts">Alerts</Link>.{user.role === "admin" && " An administrator can also make a user here, with a one-time link for them to choose a password, and switch users off or delete them, and make and rename groups and change who is in them."}
</p>
{isAdmin && (
<ViewTabs
label="Authentik view"
tabs={[
{ to: "/authentik", label: "Status", active: view === "status" },
{ to: "/authentik?view=users", label: "Users and groups", active: view === "users" },
]}
/>
)}
{view === "status" ? (
<p className="text-secondary">
The sign-in in front of everything else. It is read every few minutes with an API token (see <Link to="/integrations">Integrations</Link>). An <strong>outpost that goes quiet</strong> (the apps it guards stop letting anyone in), a <strong>certificate</strong> or an{" "}
<strong>API token</strong> that is about to run out, <strong>no worker</strong> and a burst of <strong>failed sign-ins</strong> are alerts — see <Link to="/alerts">Alerts</Link>.
{isAdmin && (
<>
{" "}
Making users and looking after users and groups is under <Link to="/authentik?view=users">Users and groups</Link>.
</>
)}
</p>
) : (
<p className="text-secondary">
Make a user — with a one-time link for them to choose their own password — switch users off, edit or delete them, and make and rename groups and change who is in them. It needs a token that may do that on the integration (<Link to="/integrations">Integrations</Link> → edit),
and everything done here is written in the audit log.
</p>
)}
<ErrorNotice error={error} />
{!data && !error && <BlockSkeleton lines={4} />}
{data && data.length === 0 && (
@@ -173,7 +219,7 @@ export default function Authentik({ user }: { user: CurrentUser }) {
</div>
</div>
)}
{data?.map((a) => <Card key={a.id} a={a} isAdmin={user.role === "admin"} onChanged={() => void load()} />)}
{data?.map((a) => (view === "users" ? <ManageCard key={a.id} a={a} onChanged={() => void load()} /> : <Card key={a.id} a={a} />))}
</>
);
}