Skip to content

Auth, user management and storage improvements - #27

Merged
wardviaene merged 1 commit into
mainfrom
improve/auth-and-storage
Oct 10, 2026
Merged

wardviaene merged 1 commit into
mainfrom
improve/auth-and-storage

Conversation

@wardviaene

Copy link
Copy Markdown
Contributor

Summary

  • SAML / OIDC login flow: one-time login codes and state, session lifetime defaults, ID token claim checks (aud, iss, email_verified), license limit applied to new external users, cleanup and cap of pending login state
  • OIDC token renewal: the configured user action is applied after repeated renewal failures
  • Profile: password change requires currentPassword; userType is now local, oidc or saml
  • Reload: users are reloaded from disk on SIGHUP (used by vpn-server's reset-admin-password)
  • SCIM: 1-based paging per RFC 7644, totalResults is the full count, renames are handled by user id (409 on a duplicate login)
  • TOTP: verification improvements, including clock skew tolerance
  • Passwords: hashing and login handling improvements
  • Local storage: path handling and atomic WriteFile
  • Logging: the access log omits query strings
  • OIDC provider API: responses no longer include clientSecret

API changes for vpn-server

  • POST /api/profile/password takes {"password", "currentPassword"}. The vpn-server webapp change is in a separate vpn-server PR.
  • An OIDC callback with a state that was already used now returns 400.
  • New method UserStore.UpdateUserByID; saml.Iface gains ConsumeAuthenticatedUser.

Tests

go test -race ./... passes. New tests cover all of the above.

🤖 Generated with Claude Code

- SAML and OIDC login flow improvements: one-time login codes and state,
  session lifetime defaults, ID token claim checks, license limits for
  external users, cleanup of pending login state
- OIDC token renewal applies the configured action on repeated failures
- Profile password changes require the current password; userType now
  distinguishes local, oidc and saml users
- Users are reloaded from disk on SIGHUP
- SCIM paging follows RFC 7644, renames are handled by user id
- TOTP verification improvements
- Password hashing and login handling improvements
- Local storage path handling and atomic file writes
- Access log omits query strings
- Additional tests across auth, users, storage and SCIM

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wardviaene
wardviaene merged commit 0b41081 into main Oct 10, 2026
4 checks passed
@wardviaene
wardviaene deleted the improve/auth-and-storage branch October 10, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant