mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-12-02 10:09:02 +01:00
Explain how to check the saved OIDC callback (#4838)
The OIDC and reverse-proxy guides sent readers straight to a forwarded scheme header. First compare the existing provider callback with the identity provider registration, then identify whether a saved override or the public address owns it. Keep the working administrator login and proxy trust boundary intact. Contract-Neutral: Public and mirrored help plus an existing Help test; no sign-in, configuration, proxy trust or API behavior changes. --- Fleet candidate `20261121T075801Z-product-intelligence` from the `product-intelligence` lane. Reviewed tip `8c69b354b843ddcd73c506893ee425da8e46ef93` on `main`. [How Pulse handles triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
This commit is contained in:
25
docs/OIDC.md
25
docs/OIDC.md
@@ -232,7 +232,7 @@ separate-session login and permission checks in Quick Start.
|
||||
| :--- | :--- |
|
||||
| **`invalid_id_token`** | Compare the configured issuer with the IdP issuer locally; use the existing redacted error, not a token dump or newly enabled Debug logs. |
|
||||
| **`unexpected signature algorithm "HS256"`** | Your IdP is signing with HS256. Configure it to use **RS256**. |
|
||||
| **Redirect Loop** | Check `X-Forwarded-Proto` header (must be `https`) and cookie settings. |
|
||||
| **Redirect Loop** | [Check the callback address](#check-the-callback-address) before changing proxy or cookie settings. |
|
||||
| **Self-Signed Certs** | The SSO provider form in Settings has no CA Bundle field. Set `oidc.caBundle` on the provider through the SSO provider API (`/api/security/sso/providers`) to a host path readable by Pulse (e.g. `/etc/ssl/certs/oidc-ca.pem` mounted into the container). For a provider configured with the legacy `OIDC_ENABLED` environment variables, set `OIDC_CA_BUNDLE` instead (see [Configuration](CONFIGURATION.md)). |
|
||||
|
||||
### Safe diagnosis
|
||||
@@ -330,3 +330,26 @@ save, [check the saved provider](#a-provider-change-could-not-be-confirmed)
|
||||
before writing anything. If the failure began after a save, keep the time,
|
||||
the setting you changed (or that nothing changed) and the locally redacted
|
||||
error. Do not repeat the save, rotate the secret or sign out to diagnose it.
|
||||
|
||||
### Check the callback address
|
||||
|
||||
Keep your working administrator session open. On your usual HTTPS Pulse
|
||||
address, open **Settings → Security → Single Sign-On** and compare the saved
|
||||
provider's **Callback / Redirect URL** with the redirect URL registered in
|
||||
the identity provider. Match the whole address, including the scheme, host,
|
||||
port if shown and provider-specific path. If only the registration is wrong,
|
||||
correct it in the identity provider. There is no need to save the Pulse
|
||||
provider again.
|
||||
|
||||
If Pulse shows the wrong address, open the existing provider without saving
|
||||
and check **Redirect URL**. A saved override takes precedence over **Public
|
||||
URL** in **Settings → System → Network**. If there is no override, check
|
||||
**Public URL** and the [trusted proxy setup](REVERSE_PROXY.md#before-configuring-the-proxy).
|
||||
Adding `X-Forwarded-Proto: https` alone does not make Pulse trust the proxy.
|
||||
Do not expose the backend or disable TLS or origin checks. After correcting
|
||||
the address, register the exact callback shown on the card before trying a
|
||||
fresh sign-in in a separate browser session.
|
||||
|
||||
If the addresses already match, use the existing
|
||||
[sign-in error to find the failing step](#safe-diagnosis). A redirect loop
|
||||
alone does not tell you which setting is wrong.
|
||||
|
||||
@@ -169,5 +169,6 @@ HTTP/error status, not cookies, proxy secrets or a full network export.
|
||||
- **"Connection lost" (Workloads), "Disconnected", "Reconnecting...", "Sync reconnecting", "Backend healthy" or a stuck "Connecting to Pulse" screen:** separate the WebSocket upgrade from state delivery. If an already-observed upgrade failed through this proxy, check its `Upgrade` and `Connection` forwarding. An HTTP 101 or welcome message without subsequent state is a different failure; changing those headers is not an established remedy. Use the [stalled-dashboard guidance](TROUBLESHOOTING.md#health-is-green-but-the-dashboard-is-stalled), even if `/api/health` returns 200. Keep authentication, TLS and origin checks enabled; do not expose the backend to test a bypass.
|
||||
- **502 Bad Gateway**: Check Pulse's actual listener and the proxy's upstream address, port and network reachability; this does not by itself prove Pulse is stopped. Container `localhost` refers to that container, not another service.
|
||||
- **CORS Errors**: Do not add CORS headers in the proxy; Pulse handles them. Set **Settings → System → Network → Allowed Origins** or use `ALLOWED_ORIGINS` if needed.
|
||||
- **OIDC redirects fail**: Ensure `X-Forwarded-Proto` is set (see above).
|
||||
- **OIDC redirects fail**: [Check the saved callback address](OIDC.md#check-the-callback-address)
|
||||
against the identity provider's registration before changing proxy headers.
|
||||
- **Wrong client IPs**: Check the immediate peer and header replacement above. Do not broaden proxy trust or change authentication to repair attribution.
|
||||
|
||||
@@ -232,7 +232,7 @@ separate-session login and permission checks in Quick Start.
|
||||
| :--- | :--- |
|
||||
| **`invalid_id_token`** | Compare the configured issuer with the IdP issuer locally; use the existing redacted error, not a token dump or newly enabled Debug logs. |
|
||||
| **`unexpected signature algorithm "HS256"`** | Your IdP is signing with HS256. Configure it to use **RS256**. |
|
||||
| **Redirect Loop** | Check `X-Forwarded-Proto` header (must be `https`) and cookie settings. |
|
||||
| **Redirect Loop** | [Check the callback address](#check-the-callback-address) before changing proxy or cookie settings. |
|
||||
| **Self-Signed Certs** | The SSO provider form in Settings has no CA Bundle field. Set `oidc.caBundle` on the provider through the SSO provider API (`/api/security/sso/providers`) to a host path readable by Pulse (e.g. `/etc/ssl/certs/oidc-ca.pem` mounted into the container). For a provider configured with the legacy `OIDC_ENABLED` environment variables, set `OIDC_CA_BUNDLE` instead (see [Configuration](CONFIGURATION.md)). |
|
||||
|
||||
### Safe diagnosis
|
||||
@@ -330,3 +330,26 @@ save, [check the saved provider](#a-provider-change-could-not-be-confirmed)
|
||||
before writing anything. If the failure began after a save, keep the time,
|
||||
the setting you changed (or that nothing changed) and the locally redacted
|
||||
error. Do not repeat the save, rotate the secret or sign out to diagnose it.
|
||||
|
||||
### Check the callback address
|
||||
|
||||
Keep your working administrator session open. On your usual HTTPS Pulse
|
||||
address, open **Settings → Security → Single Sign-On** and compare the saved
|
||||
provider's **Callback / Redirect URL** with the redirect URL registered in
|
||||
the identity provider. Match the whole address, including the scheme, host,
|
||||
port if shown and provider-specific path. If only the registration is wrong,
|
||||
correct it in the identity provider. There is no need to save the Pulse
|
||||
provider again.
|
||||
|
||||
If Pulse shows the wrong address, open the existing provider without saving
|
||||
and check **Redirect URL**. A saved override takes precedence over **Public
|
||||
URL** in **Settings → System → Network**. If there is no override, check
|
||||
**Public URL** and the [trusted proxy setup](REVERSE_PROXY.md#before-configuring-the-proxy).
|
||||
Adding `X-Forwarded-Proto: https` alone does not make Pulse trust the proxy.
|
||||
Do not expose the backend or disable TLS or origin checks. After correcting
|
||||
the address, register the exact callback shown on the card before trying a
|
||||
fresh sign-in in a separate browser session.
|
||||
|
||||
If the addresses already match, use the existing
|
||||
[sign-in error to find the failing step](#safe-diagnosis). A redirect loop
|
||||
alone does not tell you which setting is wrong.
|
||||
|
||||
@@ -169,5 +169,6 @@ HTTP/error status, not cookies, proxy secrets or a full network export.
|
||||
- **"Connection lost" (Workloads), "Disconnected", "Reconnecting...", "Sync reconnecting", "Backend healthy" or a stuck "Connecting to Pulse" screen:** separate the WebSocket upgrade from state delivery. If an already-observed upgrade failed through this proxy, check its `Upgrade` and `Connection` forwarding. An HTTP 101 or welcome message without subsequent state is a different failure; changing those headers is not an established remedy. Use the [stalled-dashboard guidance](TROUBLESHOOTING.md#health-is-green-but-the-dashboard-is-stalled), even if `/api/health` returns 200. Keep authentication, TLS and origin checks enabled; do not expose the backend to test a bypass.
|
||||
- **502 Bad Gateway**: Check Pulse's actual listener and the proxy's upstream address, port and network reachability; this does not by itself prove Pulse is stopped. Container `localhost` refers to that container, not another service.
|
||||
- **CORS Errors**: Do not add CORS headers in the proxy; Pulse handles them. Set **Settings → System → Network → Allowed Origins** or use `ALLOWED_ORIGINS` if needed.
|
||||
- **OIDC redirects fail**: Ensure `X-Forwarded-Proto` is set (see above).
|
||||
- **OIDC redirects fail**: [Check the saved callback address](OIDC.md#check-the-callback-address)
|
||||
against the identity provider's registration before changing proxy headers.
|
||||
- **Wrong client IPs**: Check the immediate peer and header replacement above. Do not broaden proxy trust or change authentication to repair attribution.
|
||||
|
||||
@@ -107,6 +107,27 @@ describe('OIDC setup without losing access', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('routes OIDC and proxy readers to the same callback check before changing settings', () => {
|
||||
const guide = article('OIDC');
|
||||
const fragment = 'check-the-callback-address';
|
||||
const heading = guide.querySelector(`h3[id="${fragment}"]`)!;
|
||||
const oidcEntry = guide.querySelector(`tr a[href="#${fragment}"]`)!;
|
||||
const proxyEntry = article('REVERSE_PROXY').querySelector(`a[href="/docs/OIDC#${fragment}"]`)!;
|
||||
expect(oidcEntry.closest('tr')).toHaveTextContent('Redirect Loop');
|
||||
expect(proxyEntry.closest('li')).toHaveTextContent('OIDC redirects fail');
|
||||
|
||||
const compare = heading.nextElementSibling!;
|
||||
const correct = compare.nextElementSibling!;
|
||||
expect(text(compare)).toContain('Keep your working administrator session open');
|
||||
expect(text(compare)).toContain('correct it in the identity provider');
|
||||
expect(text(compare)).toContain('There is no need to save the Pulse provider again');
|
||||
expect(text(correct)).toContain('A saved override takes precedence over Public URL');
|
||||
expect(
|
||||
correct.querySelector('a[href="/docs/REVERSE_PROXY#before-configuring-the-proxy"]'),
|
||||
).toHaveTextContent('trusted proxy setup');
|
||||
expect(correct.nextElementSibling!.querySelector('a[href="#safe-diagnosis"]')).not.toBeNull();
|
||||
});
|
||||
|
||||
it('links all setup decisions to real focused documentation headings', () => {
|
||||
const guide = article('OIDC');
|
||||
for (const [name, fragment] of [
|
||||
|
||||
Reference in New Issue
Block a user