Repository navigation
feat: require recent verified ID to invoke action - #198
Philivanei wants to merge 23 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Configuration validation, verification-state handling, revocation availability, accessibility, and security-gate coverage need correction before approval.
6 open issues
Validate Terraform duration as a whole Int32 minute value · New Increase light-theme verification status text contrast · New Keep TAP revocation available when verification expires · New Block actions and redirect resumption while status is unresolved · New Retry failed status requests and handle unknown verification state · New Add enabled verification gate and expiry boundary test coverage · New
What changed in this PR
Adds an optional recent Verified ID requirement for sensitive self-service actions, enforced by the server and reflected in the Function Plane UI.
Changes:
- Adds configurable verification validity and server-side checks for password reset, Temporary Access Pass creation, and risk dismissal.
- Introduces verification-status retrieval, polling, expiry handling, and refresh after verification.
- Adds blocked-action messages, verification badges, and contextual guidance.
| File | Description |
|---|---|
terraform/variables.tf |
Defines requirement and validity inputs. |
terraform/main.tf |
Passes settings to the backend. |
terraform/locals.tf |
Maps new configuration inputs. |
terraform/config.auto.tfvars.sample |
Shows basic requirement settings. |
terraform/config.auto.tfvars.advanced.sample |
Documents optional configuration. |
src/MyWorkID.Server/Strings.cs |
Adds verification error messages. |
src/MyWorkID.Server/ServicesExtensions.cs |
Registers and validates requirement options. |
src/MyWorkID.Server/Options/VerifiedIdRequirementOptions.cs |
Defines enablement and validity defaults. |
src/MyWorkID.Server/Filters/RequireRecentVerifiedIdEndpointFilter.cs |
Enforces recent verification. |
src/MyWorkID.Server/Features/VerifiedId/VerifiedIdRequirementService.cs |
Retrieves and evaluates verification timestamps. |
src/MyWorkID.Server/Features/VerifiedId/VerifiedIdModule.cs |
Registers the service and time provider. |
src/MyWorkID.Server/Features/VerifiedId/Queries/GetVerifiedIdStatus.cs |
Exposes signed-in verification status. |
src/MyWorkID.Server/Features/VerifiedId/LastVerificationTimestampParser.cs |
Parses directory verification attributes. |
src/MyWorkID.Server/Features/VerifiedId/IVerifiedIdRequirementService.cs |
Defines the verification service contract. |
src/MyWorkID.Server/Features/VerifiedId/Entities/VerifiedIdVerificationState.cs |
Models verification validity. |
src/MyWorkID.Server/Features/VerifiedId/Entities/GetVerifiedIdStatusResponse.cs |
Defines the status response. |
src/MyWorkID.Server/Features/UserRiskState/Commands/DismissUserRisk.cs |
Gates risk dismissal. |
src/MyWorkID.Server/Features/ResetPassword/Commands/ResetPassword.cs |
Gates password resets. |
src/MyWorkID.Server/Features/GenerateTap/Commands/GenerateTap.cs |
Gates access-pass creation. |
src/MyWorkID.Server/appsettings-dummy.json |
Documents backend configuration defaults. |
src/MyWorkID.Client/src/types.ts |
Adds status and panel contracts. |
src/MyWorkID.Client/src/services/api-service.ts |
Adds the status API request. |
src/MyWorkID.Client/src/lib/verified-id-status.ts |
Adds timestamp and validity utilities. |
src/MyWorkID.Client/src/hooks/use-verified-id-status.ts |
Loads, polls, and refreshes status. |
src/MyWorkID.Client/src/components/function-plane/user-display.tsx |
Displays verification badges. |
src/MyWorkID.Client/src/components/function-plane/function-plane.tsx |
Integrates blocking and verification guidance. |
src/MyWorkID.Client/src/components/function-plane/function-plane-components/validate-identity.tsx |
Explains requirements and refreshes status after success. |
src/MyWorkID.Client/src/components/function-plane/function-plane-components/password-reset.tsx |
Displays blocked password-reset state. |
src/MyWorkID.Client/src/components/function-plane/function-plane-components/create-tap.tsx |
Adds access-pass blocking and redirect handling. |
src/MyWorkID.Client/src/components/function-plane/blocked-action-notice.tsx |
Provides a shared blocked-action notice. |
src/MyWorkID.Client/src/assets/css/main.css |
Styles badges and generalizes status colors. |
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
The verification gate trusts timestamps not bound to the signed-in user, allowing someone with access to an account’s session to unlock sensitive actions using their own credential.
7 open issues
Bind verification timestamp to the authenticated user's identity · New Consume redirect state before dispatching the initial request · New Recheck verification when loading or unavailable status clears · New Prevent stale verification responses from overwriting newer results · New Retry until a newer verification timestamp is observed · New Continue refreshing status after verification becomes optional · New Use server time for verification expiry decisions · New
6 resolved since last review
Validate Terraform duration as a whole Int32 minute value Add enabled verification gate and expiry boundary test coverage Retry failed status requests and handle unknown verification state Block actions and redirect resumption while status is unresolved Keep TAP revocation available when verification expires Increase light-theme verification status text contrast
Review effort: Balanced
|
Superseded by a stack of four smaller PRs (bottom to top): #204, #205, #206, #207. Stack: https://github.com/glueckkanja/MyWorkID/stack/208 |


This pull request introduces a comprehensive "Verified ID" (identity verification) requirement for sensitive actions in the Function Plane UI. It ensures users must have a recent identity verification to perform actions like password reset, access pass creation, and risk dismissal, and provides clear UI feedback and guidance throughout the process. The changes include new UI badges, blocking logic, and improved user messaging.
Identity Verification Enforcement and User Feedback:
UserDisplaycomponent now shows a verification badge indicating verification status (required, expired, or checking), alongside risk status. [1] [2] [3]Verification Guidance and Recommendations:
ValidateIdentityPaneldisplays a warning box explaining why verification is needed and the validity window, using new icons and formatting. [1] [2] [3]Panel and Component Integration:
blockedReasonprop to display appropriate blocking messages and disable actions when verification is required. [1] [2] [3] [4] [5] [6]ValidateIdentityPanelnow accepts handlers and status objects to refresh verification state after a successful check. [1] [2] [3]Supporting Hooks and Utilities:
useVerifiedIdStatushook to manage and provide verification status throughout the UI. [1] [2]User Experience Improvements:
These changes collectively ensure that users are clearly guided to verify their identity when required and are prevented from performing sensitive actions without proper verification, improving both security and usability.
closes #96