Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/security/oidc-security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ title: Single Sign-On Security Notes

# Single Sign-On Security Notes

:::info
Single sign-on (OpenID Connect) is available from OpenInvento v1.5.0. It is not part of v1.4.1 and earlier.
:::

OpenInvento acts as an OpenID Connect relying party (RP): it sends the user to an identity provider (OP), receives an authorization code and turns it into a local session. This page lists every relying-party requirement we checked, how the code handles it and how that was verified.

The login is built on [mozilla-django-oidc](https://github.com/mozilla/mozilla-django-oidc) 5.0.2 with PyJWT. Our extensions live in `backend/account_auth/oidc.py` (`OIDCBackend`, `OIDCLoginView`, `OIDCCallbackView` and helper functions). The requirements come from:
Expand Down
16 changes: 8 additions & 8 deletions docs/setup-installation/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ Below is the complete reference table of all environment variables supported by
| `ENABLE_UPDATE_CHECKER` | No | `true` | When set to `true`, OpenInvento queries the GitHub API once every 24 hours to check for new releases and alerts administrators. |
| `ALLOW_INVENTORY_USER_INVITES` | No | `true` | When set to `true`, users can invite other registered users to access their inventories. |
| `ENABLE_TASK_SCHEDULER` | No | `true` | When set to `true`, enables the task scheduler for background jobs. Strongly recommended for receiving in-app notifications and managing scheduled tasks. |
| `OIDC_ENABLED` | No | `false` | When set to `true`, enables login via OpenID Connect (single sign-on). See [Single Sign-On](./single-sign-on) for all `OIDC_*` options. |
| `OIDC_ISSUER` | If OIDC enabled | `None` | Issuer URL of the OpenID Connect provider. |
| `OIDC_CLIENT_ID` | If OIDC enabled | `None` | Client ID registered at the provider. |
| `OIDC_CLIENT_SECRET` | No | empty | Client secret; leave empty for public clients (PKCE only). |
| `OIDC_CA_BUNDLE` | No | empty | CA certificate (PEM) for a provider with a private or self-signed certificate. See [Single Sign-On](./single-sign-on#providers-with-a-private-or-self-signed-certificate). |
| `DISABLE_LOCAL_LOGIN` | No | `false` | When set to `true`, disables password login and public signup for all accounts except `LOCAL_LOGIN_USERS`. |
| `LOCAL_LOGIN_USERS` | No | `INIT_ADMIN_USERNAME` | Comma-separated break-glass usernames that keep password login when `DISABLE_LOCAL_LOGIN` is enabled. |
| `OIDC_ENABLED` | No | `false` | When set to `true`, enables login via OpenID Connect (single sign-on). See [Single Sign-On](./single-sign-on) for all `OIDC_*` options. Available from v1.5.0. |
| `OIDC_ISSUER` | If OIDC enabled | `None` | Issuer URL of the OpenID Connect provider. Available from v1.5.0. |
| `OIDC_CLIENT_ID` | If OIDC enabled | `None` | Client ID registered at the provider. Available from v1.5.0. |
| `OIDC_CLIENT_SECRET` | No | empty | Client secret; leave empty for public clients (PKCE only). Available from v1.5.0. |
| `OIDC_CA_BUNDLE` | No | empty | CA certificate (PEM) for a provider with a private or self-signed certificate. See [Single Sign-On](./single-sign-on#providers-with-a-private-or-self-signed-certificate). Available from v1.5.0. |
| `DISABLE_LOCAL_LOGIN` | No | `false` | When set to `true`, disables password login and public signup for all accounts except `LOCAL_LOGIN_USERS`. Available from v1.5.0. |
| `LOCAL_LOGIN_USERS` | No | `INIT_ADMIN_USERNAME` | Comma-separated break-glass usernames that keep password login when `DISABLE_LOCAL_LOGIN` is enabled. Available from v1.5.0. |
---

## URL & Host Configuration (`APP_URL` & `APP_URLS`)
Expand All @@ -49,7 +49,7 @@ OpenInvento uses `APP_URL` and `APP_URLS` to automatically configure two critica
APP_URLS=http://192.168.1.100:8080,https://inventory.local
```
- **Origin Only**: Do not include subpaths in `APP_URL`. Supply the site origin only.
- **Only `APP_URLS`**: If `APP_URL` is empty, the first entry of `APP_URLS` is used as `APP_URL`, for example for the single sign-on redirect URI. Single sign-on started under another entry moves to that host first, so users end up logged in there.
- **Only `APP_URLS`** (from v1.5.0): If `APP_URL` is empty, the first entry of `APP_URLS` is used as `APP_URL`, for example for the single sign-on redirect URI. Single sign-on started under another entry moves to that host first, so users end up logged in there.

---

Expand Down
4 changes: 4 additions & 0 deletions docs/setup-installation/single-sign-on.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ sidebar_position: 2.5

# Single Sign-On (OpenID Connect)

:::info
Single sign-on is available from OpenInvento v1.5.0. It is not part of v1.4.1 and earlier.
:::

OpenInvento can delegate login to an OpenID Connect (OIDC) provider such as [Pocket ID](https://pocket-id.org/), Keycloak, Authentik, Authelia, or any other standards-compliant identity provider. Users then sign in with the account they already have at the provider instead of a separate OpenInvento password.

The [security notes](../security/oidc-security) list every OpenID Connect requirement with how it is handled and verified.
Expand Down
Loading