path:
/TESTING-AUTH.md
4.64 KB | plain
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Testing authentication and authorization
## Application boundary
Signet consumes identity from a trusted forward-auth proxy (`Remote-User` and
the existing configurable group header for role mapping). Authentication-server
choice and administration belong to the deployment administrator. Authelia is
only an optional deployment provider, not a product dependency or implementation
task. The tests below concern Signet's forwarded-identity contract.
## Current integration status (2026-11-12)
Ticket13 verifies fail-closed identity on the roadmap integration branch:
missing/invalid usernames return401 in both APIs; missing groups grant no roles.
The configured header names and group/role mappings are exercised with remapping;
DEV_MODE/DEV_REMOTE_* cannot create credentials. See ticket13 evidence.
The unrelated original dirty checkout's unconditional admin fallback was excluded
from the integration branch; do not deploy that checkout. The development stack
has no authentication-server dependency and does **not** prove a production
forward-auth integration. Keep it isolated from untrusted users: clients can
supply identity headers. A trusted production proxy must overwrite them and
prevent backend bypass; ticket14 remains open.
## Isolated development tests
Use the Alpine dev container described in `README.md`; `test/dev-up.sh` is its
entrypoint, not a script to run directly on the host. It requires explicit test
identities and does not install or start an authentication server.
`test/e2e.sh identity-contract` temporarily remaps the isolated config/restarts
APIs and restores them on exit; never run that contract test on production.
The client no longer asks for a username or groups in browser prompts. Without
trusted identity it shows an inline **Sign-in required** message and grants no
access. Real users should use the deployment's login service; this message does
not provision or configure that service. Production proxy integration is still
unverified.
Only on `localhost` or `127.0.0.1`, a developer can deliberately send explicit
test headers using the dev identity setting below. Non-loopback origins ignore
this setting; that client guard is not a substitute for proxy header overwrite
and blocked backend access:
```js
localStorage.setItem('signetDevIdentity', JSON.stringify({
user: 'asha',
groups: 'clerks'
}));
location.reload();
```
Clear it after testing with `localStorage.removeItem('signetDevIdentity')`.
A missing setting receives neither an implicit server identity nor an identity
prompt. The localhost `(clear test identity)` link clears only that test setting,
not a provider session. A successful
page load with dev-supplied headers is still not evidence of proxy authentication.
Roles are mapped in `etc/signet.conf.example`, copied into the dev container's
`/etc/signet/signet.conf`:
| Role | Example dev group | Purpose |
| --- | --- | --- |
| `drafter` | `clerks` | Prepare and submit documents |
| `signer` | `management` | Record decisions for assigned parties |
| `admin` | `signet-admins` | Administer templates, series and facsimiles |
| `pim_admin` | `signet-admins` | Write PIM attributes |
These are example mappings, not fixed production group names. Holding the
signer role does not replace assignment to a party. Authenticated users may
read PIM; writes require `pim_admin`. DAM write authorization remains unresolved.
The test suite sends explicit `Remote-User` and `Remote-Groups` headers; this
tests application authorization, not proxy authentication or spoof prevention.
## Authelia work is incomplete
`etc/authelia.yml`, `etc/authelia-users.yml`, `docker-compose.yml` and
`test/Dockerfile` contain development experiments. Their presence, or a 200/401
from an Authelia endpoint, does not establish end-to-end authentication.
Passwords and group mappings must be checked against the actual configuration;
this guide makes no claim that example username/password pairs work.
Containers are development-only; production targets bare-metal Alpine/OpenRC.
For a deployment, the administrator should verify the forwarded-identity trust
boundary with their chosen provider:
- Unauthenticated requests are denied or redirected before reaching the APIs.
- Direct backend access is blocked, and missing identity fails closed.
- Spoofed `Remote-User`/`Remote-Groups` headers are overwritten by the proxy.
- Authenticated identity reaches both Signet and PIM with the configured roles.
- PIM writes and DAM writes follow their explicit authorization policies.
- API requests cannot bypass the proxy. Provider session/logout policy is owned
and tested by the deployment administrator.
None of these production checks was run during the documentation reconciliation.