Teams and enterprise sign-in: users, roles, groups and SSO (OIDC, SAML, LDAP/AD, SCIM)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
Research direction
Start with server/auth.go and the route registration points; phase 1 proposes a route registry, JWT hardening, and a shared 401/403 handler without changing behavior. Review the routes and existing auth tests to define coverage. Done for phase 1 means every route is registered as authenticated, tokens include the proposed checks, and the web client handles 401/403 responses; the maintainer’s design questions remain open.
Written by the indexing model from the issue text.
Description
Why
ARTEX has one account. Login accepts only the username ARTEX (server/auth.go), every session is a 7-day JWT whose subject is always "ARTEX", and none of the ~300 API routes checks who is calling. Everyone who uses an install shares one password, one identity and full admin power.
That works for one operator on a laptop. It does not work for the teams ARTEX is built for:
- A pentest team shares one install. Juniors should run tasks but not approve egress or change tools. A client should be able to read findings for their own company and nothing else.
- Approvals need a name. An intercept decision or a target-pin approval is the platform's safety gate. Today the audit trail records
ARTEXfor every one of them. - Enterprises sign in through their identity provider. Security teams expect SSO with Entra ID, Okta, Google or Keycloak, sign-in with on-prem Active Directory, and automatic deprovisioning when someone leaves. A shared local password fails most security reviews before the tool is even tried.
- Access must be revocable per person. Today the only way to cut off one person is to rotate the password for everyone.
The roadmap (#440) lists Microsoft AD integration as planned. This issue proposes the full identity layer that makes it possible, for AD and for every other enterprise identity source.
What it should do
Users and sessions
- Real user accounts. The current
ARTEXaccount is migrated as the first admin, so an upgrade locks no one out. - Server-side sessions with logout, per-user revocation and a shorter TTL with refresh. A global "sign everyone out" stays available.
- Personal access tokens with limited scopes for the browser extension and scripts, replacing the full session JWT the extension uses today.
- A break-glass local admin that can always sign in, plus a host CLI to recover from a broken identity provider.
Roles, groups and per-company access
-
Fixed roles defined in code:
Role Can viewerread tasks, findings, assets and traffic operatorviewer, plus run and steer tasks, chat, replay traffic, use the shared browser approveradd-on: decide intercepts, target pins and scope approvals admineverything, including anything that can execute code or loosen a gate (tools, MCP, hooks, skills, LLM keys, settings, users) Approval is a separate role on purpose: being able to run tasks must not imply being able to approve egress.
-
Groups. Effective permissions are the union of a user's own role bindings and those of their groups.
-
Every role binding is either global or scoped to a company. A company-scoped user sees and acts only on that company's tasks, findings, assets and scope. Tasks with no company are visible only through global bindings.
Enterprise sign-in
- OIDC (Entra ID, Okta, Google, Keycloak, Auth0): authorization code with PKCE, issuer, audience and nonce checks, users created on first sign-in (optional, with a domain allowlist), and group mapping from the ID token.
- SAML 2.0: SP-initiated, signed assertions required, strict audience and recipient checks.
- LDAP / Active Directory: bind with a service account to find the user, then bind as the user. LDAPS or StartTLS is required. AD groups are resolved with nested membership.
- SCIM 2.0: the identity provider creates, updates and deactivates users and groups. Deactivation revokes sessions and tokens immediately.
- IdP groups map to ARTEX groups. An SSO identity is never linked to an existing local account just because the email matches.
- An admin can require SSO for everyone except the break-glass account.
Accountability
- An auth audit log: sign-ins and failures, logouts, token changes, and role, group and IdP changes.
- Intercept decisions, target pins, scope approvals and similar records store the user ID next to the existing text fields.
- Chat-bridge users are linked to ARTEX users and need the
approverrole to approve.
UI
- Sign-in with provider buttons, a profile and session page, and admin pages for users, groups, role bindings, identity providers and tokens.
- The navigation and actions follow the user's permissions, and a 403 is explained, not silent.
How it is enforced
- A route registry: every API route is registered with the permission it needs. A route without one returns 403, and a test fails the build if any route has no permission.
- Company-scoped routes resolve the company from the resource (task, finding, asset), and list endpoints filter by the caller's companies.
- Live streams (SSE) check permissions when they connect and again on their existing periodic re-check, so removing a role cuts off an open stream.
- The JWT is pinned to HS256 with
iss,audandjti. A session row backs every token.
Delivery
Small, focused PRs. Each one keeps the single-operator install working and says what it depends on.
- Groundwork, no behaviour change: route registry with every route marked "authenticated", JWT hardening, and one 401/403 handler in the web client.
- Users and sessions:
usersanduser_sessionstables with theARTEXmigration, principal in the request context,me, logout and refresh, the reset-password script and CLI with--user, and the multi-user sign-in UI. - Roles and groups: groups and role bindings (global and per-company), real permissions on every route, company filtering on list endpoints, the IAM admin API and pages, the audit log, user IDs on approvals, and chat-bridge linking.
- Tokens and OIDC: personal access tokens, with the extension switched to them; OIDC providers, group mapping and the sign-in flow; SSO enforcement with break-glass.
- LDAP / AD, SAML, SCIM: each as its own PR, built on the same identity and group-mapping model.
Each phase is tested with unit tests, a fake identity provider in Go tests, and end-to-end runs against a real Keycloak (OIDC and SAML) and an LDAP server.
Questions for the maintainer
- Is this direction welcome, and does "Microsoft AD integration" on the roadmap mean LDAP bind to on-prem AD, Entra ID through OIDC, or both?
- Dependencies: OIDC would use
github.com/coreos/go-oidc/v3andgolang.org/x/oauth2, LDAPgithub.com/go-ldap/ldap/v3. For SAML,crewjam/samlandrussellhaering/gosaml2both have a history of XML-signature issues. Is either acceptable, or should SAML wait? - Should one global active task and active LLM profile stay shared by all users, or become per-user?
- Upgrade: one forced re-login when users are introduced, or a grace period for existing tokens?
- Should the session token stay a bearer token in local storage (the current marker-cookie design), or move to an HttpOnly cookie with a CSRF token?
- Chat bridges on upgraded installs: keep approvals from unlinked bridge users working behind a legacy flag, or require linking?
I plan to start with phase 1, which changes no behaviour, while these are discussed.
- Dominant language
- Go
- Stars
- 18.7k
- Forks
- 7k
- Avg merge
- 10h 57m
- Merged PRs (30d)
- 494
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BaaRai/ARTEX
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
BaaRai/ARTEX#981 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BaaRai/ARTEX#980 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
BaaRai/ARTEX#812 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
question
Difficulty 4/5 1-2 days Newbie friendliness 35/100
BaaRai/ARTEX#983 · 4 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 3/5 1-2 days Newbie friendliness 20/100
BaaRai/ARTEX#977 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
BUG: Backend Docker build fails due to Go version mismatchPossibly taken @Aakriti0207 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 93/100
gittuf/visualizer#203 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
agent:ready
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
turbot/flowpipe#1162 · 1 comment ·
Maintainers usually reply within 1 day