Commit Graph

618 Commits

Author SHA1 Message Date
hsiegeln
9231a1fc60 fix: move forgot password link below sign-in button
All checks were successful
CI / build (push) Successful in 2m0s
CI / docker (push) Successful in 1m7s
Repositions the "Forgot password?" link from above the sign-in button
to below it, matching the desired layout. Updates link style to be
centered with link color instead of right-aligned muted text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 16:06:36 +02:00
f325416833 Merge pull request 'feature/vendor-admin-account-settings' (#60) from feature/vendor-admin-account-settings into main
All checks were successful
CI / build (push) Successful in 3m22s
CI / docker (push) Successful in 27s
Reviewed-on: #60
2026-04-27 15:58:05 +02:00
hsiegeln
ab800bbef9 fix: handle Logto data URI in MFA QR code display
All checks were successful
CI / build (push) Successful in 2m7s
CI / docker (push) Successful in 1m31s
CI / build (pull_request) Successful in 3m23s
CI / docker (pull_request) Has been skipped
Logto's secretQrCode is a data:image/png;base64 URI, not an otpauth://
string. QRCodeSVG crashes trying to encode it ("Data too long"). Now
renders data URIs as <img> and only uses QRCodeSVG for otpauth:// URIs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 15:43:39 +02:00
hsiegeln
15d6c7abc1 fix: remove explicit pagination from Logto role API calls
All checks were successful
CI / build (push) Successful in 2m3s
CI / docker (push) Successful in 59s
Logto's /api/roles/{id}/users endpoint rejects page=1 with
guard.invalid_pagination. Remove explicit pagination params and
let Logto use its defaults.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 15:40:05 +02:00
0b4d0e3b2f Merge pull request 'feat: vendor admin management and shared account settings' (#59) from feature/vendor-admin-account-settings into main
All checks were successful
CI / build (push) Successful in 2m15s
CI / docker (push) Successful in 20s
Reviewed-on: #59
2026-04-27 15:20:23 +02:00
hsiegeln
f823a409d0 fix: add AccountService mock to TenantPortalServiceTest constructor
All checks were successful
CI / build (push) Successful in 3m9s
CI / build (pull_request) Successful in 3m8s
CI / docker (pull_request) Has been skipped
CI / docker (push) Successful in 1m43s
The TenantPortalService constructor gained an AccountService parameter
in the consolidation refactor — the test was missing it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 15:15:19 +02:00
hsiegeln
e9e18f6c38 docs: update CLAUDE.md for account package, vendor admins, and shared components
Some checks failed
CI / build (push) Failing after 2m1s
CI / docker (push) Has been skipped
CI / build (pull_request) Failing after 1m46s
CI / docker (pull_request) Has been skipped
- Add account/ package to Key Packages table
- Add VendorAdminService/Controller to vendor/ package
- Note TenantPortalService delegation to AccountService
- Update ui/CLAUDE.md: AccountSettingsPage, VendorAdminsPage,
  Administrators sidebar, user menu dropdown, shared components

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 15:09:41 +02:00
hsiegeln
372d3c77a0 fix: code review findings — dead catch blocks, notification email, role verification
- Remove dead IllegalArgumentException catch blocks in TenantPortalController
  (delegated methods now throw ResponseStatusException, handled by Spring)
- Add password reset notification email in VendorAdminService.resetAdminPassword
- Add verifyIsVendorAdmin guard to resetAdminPassword and resetAdminMfa
  to prevent platform admins from resetting arbitrary non-admin users

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 15:06:16 +02:00
hsiegeln
e5e0cad7c3 refactor: consolidate tenant SettingsPage to use shared account components
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 14:59:09 +02:00
hsiegeln
8668642b8d feat: add account settings route and user menu dropdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 14:58:27 +02:00
hsiegeln
d44ee4b977 feat: add VendorAdminsPage with list, create/invite, remove, reset actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 14:56:03 +02:00
hsiegeln
5d1d263c74 feat: add AccountSettingsPage composing shared account components 2026-04-27 14:54:26 +02:00
hsiegeln
e563631efb feat: extract shared account components (Profile, Password, MFA, Passkey)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 14:53:05 +02:00
hsiegeln
bf42f13afc feat: add TypeScript types and React Query hooks for account and vendor admin APIs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 14:49:44 +02:00
hsiegeln
0da1ffea7f fix: guard against null orgId in createAndInviteUser and createUserWithPassword
Vendor admins use global roles, not org roles — passing null orgId
would previously cause addUserToOrganization to call
/api/organizations/null/users and fail.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 14:48:00 +02:00
hsiegeln
022b6d9722 feat: add vendor admin management (list, create/invite, remove, reset password/MFA)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 14:46:42 +02:00
hsiegeln
665ffefd3e refactor: use AccountService for display name in OnboardingService
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 14:46:20 +02:00
hsiegeln
cc3d2dc111 refactor: delegate TenantPortalService MFA/password/passkey methods to AccountService
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 14:44:20 +02:00
hsiegeln
ab240e42b0 feat: add /api/account/** security config and MFA enforcement exemptions
Permit /settings/** SPA route, gate /api/account/** as authenticated,
and exempt account MFA/profile/password paths from MFA enforcement filter.
2026-04-27 14:41:21 +02:00
hsiegeln
b63e5e9c81 feat: add AccountController with /api/account/* endpoints 2026-04-27 14:41:05 +02:00
hsiegeln
90d84ffd00 feat: add AccountService extracting user identity operations from TenantPortalService
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 14:39:40 +02:00
hsiegeln
19428b4e27 feat: add password verify and role management methods to LogtoManagementClient
Adds verifyUserPassword (for current-password check before password change) and
four global role methods (listRoleUsers, getRoleByName, assignGlobalRole,
revokeGlobalRole) needed by the upcoming AccountService and VendorAdminService.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 14:36:59 +02:00
hsiegeln
316e5ef6c1 docs: implementation plan for vendor admin management and account settings
16 tasks covering: LogtoManagementClient additions, AccountService
extraction, AccountController, VendorAdminService/Controller,
SecurityConfig updates, frontend component extraction, shared
AccountSettingsPage, VendorAdminsPage, and Layout user menu.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 14:32:46 +02:00
hsiegeln
86d9ba4985 docs: vendor admin management and account settings design spec
Two features: multi-vendor admin management (invite/create, remove,
reset password/MFA) and shared account settings page (profile, password
change with current-password verification, MFA self-service). Includes
consolidation plan extracting user-level identity operations from
TenantPortalService into new AccountService.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 14:20:49 +02:00
hsiegeln
292adeea4c docs: update documentation for passkey MFA feature
All checks were successful
CI / build (push) Successful in 2m23s
CI / docker (push) Successful in 2m19s
- Add V002/V003 migrations and VendorAuthPolicy classes to CLAUDE.md
- Document MFA & passkey enforcement model in config CLAUDE.md
- Mark passkey MFA design spec as Implemented

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 11:51:12 +02:00
hsiegeln
43a1058f33 fix: code review findings — auth-settings HTTP method, authorization, redirect
- Change auth-settings endpoint from PUT to PATCH (matches partial update semantics and frontend hook)
- Add @PreAuthorize("SCOPE_tenant:manage") to updateAuthSettings endpoint
- Consolidate MFA/passkey 403 redirect handling in API client

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 09:01:23 +02:00
hsiegeln
60a800f757 feat: add passkey offer step to onboarding wizard
After tenant creation, checks vendor auth policy and conditionally
shows a passkey enrollment offer screen before redirecting. User
can skip and set up later.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:55:24 +02:00
hsiegeln
76a62135ab feat: add WebAuthn and method picker modes to sign-in UI
Adds mfaWebauthn and mfaMethodPicker modes with smart routing based on
stored preference (localStorage). Auto-triggers passkey prompt on mode
entry. Adds "Use passkey instead" link in TOTP mode. Saves method
preference on successful verification.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:55:16 +02:00
hsiegeln
17ba02c30d feat: add WebAuthn Experience API functions to sign-in UI
Adds startWebAuthnAuth and verifyWebAuthnAuth functions that call
the Logto Experience API WebAuthn endpoints for passkey MFA verification.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:55:10 +02:00
hsiegeln
9b898924ab feat: add passkey management and auth policy sections to tenant settings
Adds PasskeySection (list/rename/delete passkeys), AuthPolicySection
(MFA mode + passkey enable/mode controls), and PasskeyNudgeBanner
(dismissable nudge for users without a passkey enrolled).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:55:04 +02:00
hsiegeln
8de16019b7 feat: add vendor authentication policy management page
Adds /vendor/auth-policy route with MFA mode (off/optional/required) and passkey (enabled/disabled, optional/preferred/required mode) controls, including a confirmation guard before enforcing required MFA.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:51:45 +02:00
hsiegeln
ad2b16f26d feat: add passkey and auth policy React Query hooks
Adds hooks for listing/renaming/deleting passkeys, MFA method preference,
tenant auth settings, and vendor auth policy (using the new putJson method).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:48:44 +02:00
hsiegeln
2007a4b2da feat: add passkey types and APP_PASSKEY_REQUIRED handling
Extends MfaStatus with passkeyEnrolled/passkeyCount fields, adds
PasskeyCredential and AuthPolicy types, expands TenantSettings with
passkey fields, handles APP_PASSKEY_REQUIRED 403 redirect, and adds
putJson method to the api client for JSON PUT requests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:48:39 +02:00
hsiegeln
9057479da7 feat: expose vendor auth policy in public config endpoint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:48:13 +02:00
hsiegeln
89c83ec7b8 feat: expand MfaEnforcementFilter for vendor policy and passkey checks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:48:09 +02:00
hsiegeln
b3104dc410 feat: add passkey and auth settings endpoints to TenantPortalController 2026-04-27 08:45:52 +02:00
hsiegeln
5bf94c6d4e feat: add passkey management and auth settings to TenantPortalService 2026-04-27 08:45:49 +02:00
hsiegeln
40daca36a0 feat: add WebAuthn credential and custom data methods to LogtoManagementClient 2026-04-27 08:45:45 +02:00
hsiegeln
8c9edfdb55 feat: add passkey_enrolled and mfa_method_preference to Custom JWT claims
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:44:42 +02:00
hsiegeln
25f4afcddc feat: add vendor auth policy REST endpoints
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:42:59 +02:00
hsiegeln
02be1d9264 feat: add VendorAuthPolicy entity and repository
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:42:55 +02:00
hsiegeln
cc7c87a520 feat: add vendor_auth_policy table for passkey MFA support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:42:51 +02:00
hsiegeln
ca19faf4f0 docs: add passkey MFA implementation plan
18-task plan covering database migration, backend policy/endpoints,
sign-in UI WebAuthn modes, and platform UI management pages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 08:39:44 +02:00
hsiegeln
b86cc812b7 docs: add passkey MFA design spec
Logto-native WebAuthn approach with independent vendor/tenant policy
domains, three registration entry points, and smart MFA method defaults.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 08:26:09 +02:00
hsiegeln
f0dda0d2ee fix(ui): clean up tenant pages and add license inspection
All checks were successful
CI / build (push) Successful in 2m6s
CI / docker (push) Successful in 1m28s
- Remove tier badge from tenant license page header
- Remove tier badge and Tier KPI card from tenant dashboard
- Add "Inspect License" toggle on vendor tenant detail to view all limits

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 07:51:29 +02:00
hsiegeln
3cd6bd5585 chore: update GitNexus index stats in documentation
Some checks failed
CI / build (push) Successful in 2m16s
CI / docker (push) Successful in 1m38s
SonarQube Analysis / sonarqube (push) Failing after 2m36s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 22:14:42 +02:00
hsiegeln
25d66af45e fix(ui): hide redundant SSO button in empty state, fix dashboard navigation
Some checks failed
CI / docker (push) Has been cancelled
CI / build (push) Has been cancelled
- Hide top-right "Add SSO Connection" when no connectors exist (empty
  state already has its own button)
- Fix broken relative navigations on tenant dashboard: ../license and
  ../oidc resolved to wrong paths; now use absolute /tenant/license and
  /tenant/sso

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 22:13:41 +02:00
hsiegeln
d783040030 feat(ui): add license usage visualization with progress bars
Split license limits into metered "Resource Usage" (with color-coded
progress bars) and static "Plan Limits" cards. Updated UsageIndicator
with 8px bars, green/amber/red thresholds, and tabular-nums formatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 22:12:33 +02:00
hsiegeln
6afc337b16 feat: add usage data to license and vendor detail endpoints
Add getAppCount() to ServerApiClient, include usage counts (agents,
environments, apps, users) in tenant license and vendor detail responses
so the frontend can render progress bars against license limits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 22:08:47 +02:00
hsiegeln
e881e302b6 fix(ui): check ApiError.status instead of message string for 404 detection
All checks were successful
CI / build (push) Successful in 2m3s
CI / docker (push) Successful in 1m27s
The ApiError class (088bc34) extracts messages from response bodies, so
a 404 with no body produces "Request failed" — not "404". The email
connector hook's string check failed, treating "not configured" as an
error and showing "Failed to load config" on fresh installs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 21:28:53 +02:00