Skip to content

fix(registration): reuse stored credentials if already in keyring#861

Open
andrewazores wants to merge 13 commits intocryostatio:mainfrom
andrewazores:credential-regeneration
Open

fix(registration): reuse stored credentials if already in keyring#861
andrewazores wants to merge 13 commits intocryostatio:mainfrom
andrewazores:credential-regeneration

Conversation

@andrewazores
Copy link
Copy Markdown
Member

Based on #860
Depends on #860

  1. Agent checks with Cryostat's credential keyring if the ID of the credential the Agent previously submitted (if any) is still present. If so, the Agent assumes this credential is still valid and does not submit a new one.
  2. If the Agent is triggered to enter its registration flow rapidly and a credential generation request is already in-flight, then subsequent requests will reuse a coalesced response from the original in-flight request rather than possibly firing a second request while the first is still in-flight. This also prevents the Agent from rapidly regenerating and invalidating its own webserver credentials.
  3. Fixes a byte buffer mutation mishandling where the temporary in-memory webserver password buffer might be zeroed out while the request submitting it to Cryostat's credential keyring is still underway.

@andrewazores andrewazores requested a review from a team May 1, 2026 15:32
@andrewazores andrewazores force-pushed the credential-regeneration branch from b2af1f1 to 3f68790 Compare May 1, 2026 16:11
@andrewazores andrewazores marked this pull request as ready for review May 1, 2026 16:21
@andrewazores andrewazores force-pushed the credential-regeneration branch from 2bee3bf to d86d3fa Compare May 1, 2026 18:19
@andrewazores andrewazores force-pushed the credential-regeneration branch from 6c781f9 to 04b1426 Compare May 1, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant