Add API key management page for signed-in users - #1923
Open
krowvin wants to merge 13 commits into
Open
Conversation
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
krowvin
marked this pull request as ready for review
September 4, 2026 05:31
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
Collaborator
Author
|
Merged
Local validation passed: full Java 11 build (786 service unit tests), 13 adapter/auth unit tests, 6 Chromium browser tests, Storybook, lint, formatting, and production build. Real local CDA/Oracle/Keycloak testing against the #1935 backend verified duplicate conflict feedback, successful retry, creation, refresh, one-time-secret closing, and 204 revocation feedback. Temporary keys were removed. Commits: 592f77f (merge) and 4b80047 (UI feedback and validation recovery). |
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
This reverts commit cba7914.
|
thanks for doing this, looks good! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a signed-in API Keys page and guide for creating, viewing, rotating, and revoking keys without Swagger. Keys belong to the current user and inherit that user's permissions. Secrets are shown once and kept out of browser storage and query caches. Rotation creates a replacement before offering to revoke the original.
Merge current
develop, including /auth/keys cleanup #1935, while retaining the Swagger links to the key-management guide.Add dismissible toasts for create, copy, refresh, revoke, rotation, expired keys, and request failures. Toasts remain accessible inside dialogs; errors also stay beside the form. Success feedback expires after eight seconds, while errors and warnings remain dismissible.
Translate the new endpoint validation responses into useful name/date/payload guidance; handle duplicate-name 409 responses and empty 204 revocation responses. Invalid local dates are rejected before submission.
Keep replacement names within 64 characters and clear stale key details after refresh or a 404. Failed creation never revokes the original; failed or cancelled revocation preserves both keys.
Show a permission warning page on denied key access, listing
CWMS Usersand a signed-incac_authsession, highlighting recognized missing roles, and directing users to their CWMS Admin. Management controls are hidden until access is restored.Emphasize in bold that keys are shown only at creation and cannot be retrieved again, in the create/save dialogs and help/rotation instructions. Companion API response and Swagger clarification: Omit API key secrets from GET responses and clarify one-time retrieval #1941.
Validation:
14 adapter/auth unit tests, 10 Chromium browser tests, Storybook test, lint, formatting, and production build passed. The API-key tests now run in the web GUI CI workflow.
Real local CDA/Oracle/Keycloak checks against the /auth/keys cleanup #1935 backend verified duplicate-name conflict feedback, retry in the same dialog, creation, expiration metadata refresh, one-time-secret closing, and 204 revocation feedback. Temporary keys were removed; secrets were excluded from logs and screenshots.
Previous full Java 11
gradlew buildpassed, including 786 service unit tests and generated OpenAPI/TypeScript checks.Screenshots
These screenshots show the earlier layout before the latest wording and styling refinements. They are embedded from an earlier commit; screenshot files are excluded from the PR changes.
The IP address shown in the curl example is generated dynamically from the current host and changes with the deployment. This screenshot was taken on a local development host.
Mobile views
One-time-key guidance validation: 14 unit tests, 10 Chromium browser tests, lint, formatting, and production build passed.
AI tools used