This commit is contained in:
+13
-13
@@ -1,6 +1,6 @@
|
||||
# Connecting computer to Authelia (OIDC)
|
||||
# Connecting superbrain to Authelia (OIDC)
|
||||
|
||||
computer includes an **Authelia OpenID Connect provider scaffold**, but
|
||||
superbrain includes an **Authelia OpenID Connect provider scaffold**, but
|
||||
end-to-end sign-in is intentionally **stubbed**. Real credentials register
|
||||
the NextAuth provider; the login button and sign-in callback still block it
|
||||
until a developer implements mapping to local Go users.
|
||||
@@ -62,10 +62,10 @@ docker run --rm authelia/authelia:4.39 authelia crypto hash generate pbkdf2 \
|
||||
```
|
||||
|
||||
This prints:
|
||||
- **Random Password**: the *plain* secret. It goes into computer as `OIDC_CLIENT_SECRET`.
|
||||
- **Random Password**: the *plain* secret. It goes into superbrain as `OIDC_CLIENT_SECRET`.
|
||||
- **Digest**: the *hashed* secret. It goes into Authelia's `client_secret`.
|
||||
|
||||
### 2.2 Register the computer client (`configuration.yml`)
|
||||
### 2.2 Register the superbrain client (`configuration.yml`)
|
||||
|
||||
Merge this example into the existing OIDC provider configuration. Replace the
|
||||
client secret digest and public app hostname; keep your existing provider
|
||||
@@ -76,19 +76,19 @@ identity_providers:
|
||||
oidc:
|
||||
# jwks / hmac_secret must already be configured for OIDC to work
|
||||
claims_policies:
|
||||
computer:
|
||||
superbrain:
|
||||
# Include these identity claims in the ID token.
|
||||
id_token: ['email', 'email_verified', 'name', 'preferred_username']
|
||||
clients:
|
||||
- client_id: 'computer'
|
||||
client_name: 'computer'
|
||||
- client_id: 'superbrain'
|
||||
client_name: 'superbrain'
|
||||
client_secret: '$pbkdf2-sha512$310000$...' # Digest from 2.1
|
||||
public: false
|
||||
authorization_policy: 'two_factor' # or 'one_factor'
|
||||
consent_mode: 'explicit'
|
||||
claims_policy: 'computer'
|
||||
claims_policy: 'superbrain'
|
||||
redirect_uris:
|
||||
- 'https://<COMPUTER_HOST>/api/auth/callback/authelia'
|
||||
- 'https://<superbrain_HOST>/api/auth/callback/authelia'
|
||||
scopes: ['openid', 'profile', 'email']
|
||||
grant_types: ['authorization_code']
|
||||
response_types: ['code']
|
||||
@@ -100,7 +100,7 @@ Validate the configuration and restart your Authelia deployment after editing.
|
||||
**Redirect URI rule:** it must exactly match
|
||||
`<NEXTAUTH_URL>/api/auth/callback/authelia`, including scheme, hostname, port
|
||||
if present, and path. For an HTTPS deployment, use
|
||||
`https://<COMPUTER_HOST>/api/auth/callback/authelia`.
|
||||
`https://<superbrain_HOST>/api/auth/callback/authelia`.
|
||||
|
||||
The callback is handled by NextAuth on the **web app**, not the Go API.
|
||||
Forward `/api/auth/*` to Next.js in your reverse proxy. The identically named
|
||||
@@ -115,7 +115,7 @@ email/password account; matching an email string alone is not enough.
|
||||
|
||||
---
|
||||
|
||||
## 3. What to configure in computer
|
||||
## 3. What to configure in superbrain
|
||||
|
||||
Set these environment variables in the **root** `.env` or hosting environment.
|
||||
Compose passes the OIDC variables to the API and web containers. Replace the
|
||||
@@ -123,10 +123,10 @@ sample hostnames with your actual hosts.
|
||||
|
||||
| Variable | Example | Notes |
|
||||
|---|---|---|
|
||||
| `NEXTAUTH_URL` | `https://computer.company.tld` | Public web app URL; determines the callback |
|
||||
| `NEXTAUTH_URL` | `https://superbrain.company.tld` | Public web app URL; determines the callback |
|
||||
| `COOKIE_SECURE` | `1` | For an HTTPS deployment |
|
||||
| `OIDC_ISSUER` | `https://auth.company.tld` | Exact issuer advertised in Authelia's discovery document |
|
||||
| `OIDC_CLIENT_ID` | `computer` | Must match `client_id` in Authelia |
|
||||
| `OIDC_CLIENT_ID` | `superbrain` | Must match `client_id` in Authelia |
|
||||
| `OIDC_CLIENT_SECRET` | *(plain secret from 2.1)* | The **plain** value, not the digest |
|
||||
|
||||
Keep the existing `AUTH_SECRET`: changing it makes stored IMAP passwords
|
||||
|
||||
Reference in New Issue
Block a user