diff --git a/docs/CONFIG.md b/docs/CONFIG.md index e5d6ad6a..db5daaed 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -138,6 +138,7 @@ read back through the API. | `setup_complete` | `false` | Set true once the first-run wizard finishes; gates the `/setup` route. | | `employee_directory_mode` | `selfhosted` | `selfhosted` (tables in this app) or `external` (a separate HR database, see `EMPLOYEE_DB_*`). | | `usb_directory_mode` | `selfhosted` | `selfhosted` or `external` (a separate `cmmc_usb` database, see `CMMC_USB_DB_*`). | +| `audit_retentiondays` | `0` | Delete audit entries older than this many days. 0 keeps everything forever. Saving a period deletes nothing by itself: purge from this page or run `flask audit purge --apply`. | | `site_base_url` | (empty) | Public base URL for QR codes and absolute links. Scheme + host, optionally including the subpath a site is served under (`https://host/shopdb`). Blank = use the browsing origin. | | `facility_name` | (empty) | Facility name in the dashboard header. Blank = frontend falls back to `ShopDB`. | | `pc_access_domain` | `device.geaerospace.net` | Domain appended to a PC hostname for remote-access links. Blank = hostname as-is. | @@ -287,23 +288,32 @@ Three flows use it: ### audit -| Key | Default | Notes | -|-----|---------|-------| -| `audit_retention_days` | `90` | Days to retain audit logs (0 = keep forever). | +Retention lives in the `site` section as `audit_retentiondays`. It was +documented here as `audit_retention_days` as well, which was a second key that +nothing read - the settings page wrote to it and retention stayed off. One key +now, and the page writes that one. ### auth +**SAML is not implemented yet.** These keys exist so a site can be configured +ahead of the feature, and the settings page says so on screen. Nothing reads +them today: there is no SAML login route and no assertion is accepted, so +sign-in is local accounts only whatever is set here. In particular +`saml_allow_local_login` does NOT disable password login - the toggle is locked +on until there is another way in, because a control that appears to close the +local door while it stays open is worse than no control. + | Key | Default | Notes | |-----|---------|-------| -| `saml_enabled` | `false` | Enable SAML SSO. | -| `saml_idp_metadata_url` | (empty) | SAML IdP metadata URL. | -| `saml_entity_id` | (empty) | SAML SP entity id. | -| `saml_acs_url` | (empty) | SAML Assertion Consumer Service URL. | -| `saml_allow_local_login` | `true` | Allow local username/password login when SAML is on. | -| `saml_auto_create_users` | `true` | Auto-create users on first SAML login. | -| `saml_admin_group` | (empty) | SAML group name that grants the admin role. | +| `saml_enabled` | `false` | Reserved. Enable SAML SSO once it ships. | +| `saml_idp_metadata_url` | (empty) | Reserved. SAML IdP metadata URL. | +| `saml_entity_id` | (empty) | Reserved. SAML SP entity id. | +| `saml_acs_url` | (empty) | Reserved. SAML Assertion Consumer Service URL. | +| `saml_allow_local_login` | `true` | Reserved, and locked on. Local login cannot be turned off while it is the only way in. | +| `saml_auto_create_users` | `true` | Reserved. Auto-create users on first SAML login. | +| `saml_admin_group` | (empty) | Reserved. SAML group name that grants the admin role. | -**Personal API tokens.** Besides login JWTs and SAML, a user may create +**Personal API tokens.** Besides login JWTs, a user may create personal API tokens (PATs) for scripts and integrations, from Settings > API Tokens (or `POST /api/apitokens`). A PAT is sent like a JWT (`Authorization: Bearer shopdb_pat_...`), authenticates as its owning user diff --git a/frontend/src/assets/style.css b/frontend/src/assets/style.css index 30b8d035..e3f6afff 100644 --- a/frontend/src/assets/style.css +++ b/frontend/src/assets/style.css @@ -1153,6 +1153,18 @@ td.actions .btn + .btn { margin: 0 0 1rem 0; line-height: 1.5; } +/* A settings block whose feature is not built yet. Reads as a warning rather + than body text, because the failure it prevents is an administrator + believing a control does something. */ +.setting-notice { + border-left: 3px solid var(--warning); + background: var(--bg); + color: var(--text); + font-size: 0.9rem; + line-height: 1.5; + margin: 0 0 1rem 0; + padding: 0.6rem 0.8rem; +} .settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); diff --git a/frontend/src/views/settings/AuditSettings.vue b/frontend/src/views/settings/AuditSettings.vue index 7831da07..b4c1f132 100644 --- a/frontend/src/views/settings/AuditSettings.vue +++ b/frontend/src/views/settings/AuditSettings.vue @@ -8,8 +8,10 @@
- Configure how long audit logs are retained. Older logs will be automatically purged.
- Set to 0 to keep logs indefinitely.
+ How long audit entries are kept. 0 keeps everything forever, which is
+ the default. Saving a period does NOT delete anything by itself:
+ purge from Settings > Site & Facility, or run
+ flask audit purge --apply on the server.
+ Not implemented yet. These settings are stored so a + site can be configured ahead of the feature landing, but nothing + consumes them today: there is no SAML login route, and no assertion + is accepted. Sign-in is local accounts only, whatever is set here. +
- Enable SAML SSO for enterprise authentication. Users can sign in using your organization's - identity provider (Azure AD, Okta, etc.). Local login can remain enabled as a fallback. + When it ships, users will sign in through your organization's identity + provider (Azure AD, Okta, etc.), with local login available as a + fallback.