Repository navigation
Correct generated-credentials log sample and signing-key rotation window - #986
Devon-White wants to merge 1 commit into
Conversation
- Server SDK security guide: the SDK never prints a generated password; show the real startup log line per language and point to SWML_BASIC_AUTH_USER / SWML_BASIC_AUTH_PASSWORD - One rotation figure (about a minute) on every page that states it, and note that calls in progress keep signing with the old key until they end Closes #959
|
Close to ready. The SDK log samples are right and the new rotation window holds up, but the REST reference for Rotate signing key still says "about 1–2 minutes", so the pages and the API reference now disagree. The PR description also needs an edit before merge. Technical1. The REST reference still states the old window.
Then run 2. The window and the in-progress behavior check out. In the referenced source code, a new key reaches new calls within about a minute of a Dashboard reset or an API rotation, and a call that has already signed a request keeps that key until it ends. All four pages now say that. 3. The log samples match the published SDKs. I installed 4. Name the default usernames.
Consistency5. 6. This one is pre-existing, so follow-up is fine. 7. Possible follow-up for the Server SDK guide. The agent's Style8. 9. Optional. The bold "Option 2: Let SDK Generate Credentials (Development)" sits right above the block you rewrote. Since you're already in that section, sentence-casing it is a cheap win. Leaving it is fine too, as your notes say. Everything else looks clean. The new text has no em dashes, no links or anchors were added, and the code block titles follow the house template for language tabs. PR descriptionPlease edit the description before merge. This repo is public, and the "Platform" source-anchor paragraph and two of the reviewer notes describe how the platform handles signing keys internally. Keep the conclusions, which are the about-a-minute window, in-progress calls keeping the old key, and the reporter's live repro. Cut the explanation of how that happens. The public SDK links are fine to keep. |
Closes #959
Summary
/docs/server-sdks/guides/security): the "Let SDK Generate Credentials" option no longer claims the SDK prints the generated password. It now shows the line each SDK actually logs at startup (in Python and TypeScript code tabs), describes the username neutrally (SWML_BASIC_AUTH_USERwhen set, an SDK default otherwise), and tells readers to setSWML_BASIC_AUTH_USERandSWML_BASIC_AUTH_PASSWORDwhen they need to know the credentials./docs/swml/guides/webhook-security(rotation paragraph and the troubleshooting bullet)/docs/platform/your-signalwire-api-space(was "a minute or two")/docs/platform/projects(was "a minute or two"; not named in the issue, but it states the same window)Source anchors
Server SDKs (public repos, at their current default branch):
signalwirewhenSWML_BASIC_AUTH_USERis unset, password issecrets.token_urlsafe(32)— security_config.py#L293-L296; env var names — security_config.py#L44-L45; startup lineBasic Auth: {username}:(credentials configured) (source: {source})— web_mixin.py#L473.SWML_BASIC_AUTH_USERor else the agent's name, password is 16 random bytes in hex, sourcegenerated— AgentBase.ts#L614-L623; startup lineAuth: {user}:**** (source: {source})— AgentBase.ts#L4400; env var names — SWMLService.ts#L174-L175.Platform (internal source, described here as behavior only): a call resolves the project's signing key on its first signed request and keeps that key for the rest of the call. Keys are also shared across a project's new calls for 60 seconds by default, which is the "about a minute" window. Rotating the key through the Dashboard or the REST API clears the control plane's own cached copy immediately, so that 60-second shared cache is the only delay for new calls. Reviewers with access can ask for the exact anchors.
Notes for reviewers
basic_auth_password_autogeneratedwarning), and TypeScript's logger adds a timestamp/level prefix whose format depends onSIGNALWIRE_LOG_FORMAT, so I left those out rather than reproduce a format that varies.Verification
yarn fern-md-check: all 2895 MDX files valid.Preview