Commit Graph

1874 Commits

Author SHA1 Message Date
Edouard Vanbelle d8b3f2e026 refactor(oidc): migrate provider into issuer
this make OIDC compliant with the invariant binding (issuer and subject)
admin can now rename their provider without breaking

clarifing federation_kind: report the kind of federation wired not the allowed login method
hybryd login method are still allowed
2026-08-08 16:37:45 +02:00
Edouard Vanbelle 10a8dd7d8b refactor(oidc): prep. support of Open Cloud Mesh
add federation kind (OCM, OIDC, MagicLink)
    rename oidc_provider into federation_issuer
    rename oidc_subject into federation_subject
2026-08-08 15:10:26 +02:00
Dionisio Pozo 521040521d Merge pull request #659 from EdouardVanbelle/chore/worktree
chore(build): add support of git worktree
2026-08-08 01:53:46 +02:00
Edouard Vanbelle d547406a09 chore(build): add support of git worktree
help build.rs to determine if a build is necessary when working in a git worktree
2026-08-07 20:42:17 +02:00
Dionisio Pozo 37613bed6e Merge pull request #646 from EdouardVanbelle/feat/opaque-auth 2026-08-07 20:28:07 +02:00
Edouard Vanbelle 21607e3e7f feat(opaque): improve password change
- rebuild the opaque envoloppe
- revoke all other useer's sessions
- send a security email to user
2026-08-06 20:52:17 +02:00
Edouard Vanbelle 60cf9d976b feat(opaque): prepare removal of Argon legacy password for the future 2026-08-05 23:14:37 +02:00
Edouard Vanbelle 1a701b3a64 fix(opaque): fix integration test 2026-08-05 23:13:51 +02:00
Edouard Vanbelle 94e5b9e355 feat(opaque): permits ksf values change
KSF values are stored per user, if admin change value, client will detect it and regenerate the envelop
This pervent users being stuck
2026-08-05 22:52:19 +02:00
Edouard Vanbelle 84a1b0e005 feat(admin/user): show users auth method + add cli to recover broken opaque login 2026-08-05 21:13:21 +02:00
Edouard Vanbelle c4bf2568ba feat(opaque): lower KSF values to support old clients (memory intensive) 2026-08-05 20:48:55 +02:00
Edouard Vanbelle c95d108bf8 feat(opaque): show users migrated in admin panel 2026-08-04 23:58:59 +02:00
Edouard Vanbelle baac330389 fix(opaque): fix cookie setting 2026-08-04 23:58:23 +02:00
Edouard Vanbelle 906934ba25 fix(opaque): use safe url base64 2026-08-04 23:32:33 +02:00
Edouard Vanbelle 2de476d281 feat(pass reset): request a pass change on 1st login 2026-08-04 23:32:30 +02:00
Edouard Vanbelle 6965855388 reactor(opaque): normalize to OXICLOUD_AUTH_OPAQUE_* variables 2026-08-04 07:31:32 +02:00
Edouard Vanbelle 6a5b8980ae chore(migration): update the migration timestamp 2026-08-04 07:18:40 +02:00
Edouard Vanbelle 39ea00fff3 test(opaque): fix playwright scenarios 2026-08-04 07:03:08 +02:00
Edouard Vanbelle 526903e0d5 fix(db-migration): keep timestamp order 2026-08-04 07:03:08 +02:00
Edouard Vanbelle 7781e07b48 feat(oidc): harden email verified cases 2026-08-04 07:03:08 +02:00
Edouard Vanbelle 5418a5bd34 feat(opaque): add end to end test hurl + binary 2026-08-04 07:03:08 +02:00
Edouard Vanbelle 903d769e03 feat(opaque): handle the force password change 2026-08-04 07:03:08 +02:00
Edouard Vanbelle e8de07768e feat(opaque): add end to end integration test 2026-08-04 07:03:08 +02:00
Edouard Vanbelle 168d94370a feat(opaque): legacy login refuses migrated OPAQUE users 2026-08-04 07:03:08 +02:00
Edouard Vanbelle fac65a7c4d feat(opaque): add lookup identifier (with anti-enum) 2026-08-04 07:03:08 +02:00
Edouard Vanbelle ebe76ffac2 feat(opaque): Silent migration on legacy login 2026-08-04 07:03:08 +02:00
Edouard Vanbelle 92254ef894 feat(opaque): diasable OPAQUE in e2e front test for now 2026-08-04 07:03:08 +02:00
Edouard Vanbelle bd8384c9b5 feat(opaque): add change password 2026-08-04 07:03:08 +02:00
Edouard Vanbelle 94c6121f3b feat(opaque): add /api/auth/opaque/params 2026-08-04 07:03:08 +02:00
Edouard Vanbelle 7d7621e387 feat(opaque): wire API
- POST /api/auth/opaque/login/ke1 (public) — takes {userIdentifier, startLoginRequest}, resolves the identifier via the same @-dispatch as legacy login (AuthApplicationService::lookup_user_for_login, factored out), fetches envelope, runs ServerLogin::start (real branch for known users, dummy branch for anti-enum on unknown/unregistered), stashes state under a random exchange_id in the moka cache, returns {exchangeId, loginResponse}.
- POST /api/auth/opaque/login/ke3 (public) — atomic take from the cache FIRST (anti-enum + anti-replay), then decodes the payload, runs ServerLogin::finish, stamps opaque_migrated_at (Phase 3 signal), and mints a session via the new AuthApplicationService::mint_session_for_authenticated_user helper — returns the same AuthResponseDto shape as legacy login so the SPA has one downstream handler.
- Session mint factored: mint_session_for_authenticated_user(User) extracted from login() so both the legacy password path and OPAQUE KE3 converge through one implementation.
- OpaqueRepositoryPort::mark_migrated with COALESCE-preserving idempotent stamp of opaque_migrated_at.
- opaque-setup CLI + Dockerfile wiring already shipped (Step 0 hygiene).
- Routing fix: sub-prefix split (/api/auth/opaque/register vs /api/auth/opaque/login) — axum composes middleware between sibling nests at the same prefix, which was cross-applying auth+CSRF to my public login routes. Distinct prefixes side-step that cleanly. Documented in both main.rs and the router builder doc.
- Rate-limit sharing: login KE1/KE3 layered with the SAME login_limiter instance as legacy POST /api/auth/login, so an attacker can't halve the per-IP budget by spraying both endpoints.

Anti-enum + anti-replay hardening in KE3: take runs BEFORE payload parse so:
- Unknown / expired / already-consumed exchange_id → 401 InvalidCredentials (same shape as wrong-passphrase, no payload-shape leak)
- Consumed handle can't be re-used to spam parse attempts
2026-08-04 07:03:08 +02:00
Edouard Vanbelle ae65c8475f test(opaque): add test that coverable by hurl 2026-08-04 07:03:08 +02:00
Edouard Vanbelle 033146a6c9 feat(opaque): add login opaque exchange 2026-08-04 07:03:08 +02:00
Edouard Vanbelle 0e395ae15f feat(auth): bring opaque (RFC 9807) auth
OPAQUE (RFC 9807) implementation (using `opaque-ke` crate)

    with opaque authentfication, server will never receive the password (in the auth=password mode)
    this is a must have to create trust with users to permit end to end encryption in the future
    (we cannot know if user use the same password/passphrase for his asymetric key or his oxicloud auth,
    this is why server must never have the password)

    pass1: prepare server
2026-08-04 07:03:08 +02:00
Dionisio Pozo d76803f602 Merge pull request #658 from EdouardVanbelle/fix/oidc-login-method
feat(oidc): permit oidc only + RP initiate logout + back-channel logout
2026-08-04 00:21:17 +02:00
Edouard Vanbelle c4b454479e fix(test-integration): fix OS possible race with tantivy test 2026-08-03 23:10:51 +02:00
Edouard Vanbelle 95104904c4 feat(oidc): reduce amount of page when auto_redirect_to_oidc 2026-08-03 23:00:15 +02:00
Edouard Vanbelle d065f99952 feat(oidc): deprecate OXICLOUD_OIDC_DISABLE_PASSWORD_LOGIN 2026-08-03 22:26:46 +02:00
Edouard Vanbelle ac32595846 test(oidc): test auto_redirect_if_standalone_oidc and RP iniiate logout 2026-08-03 22:26:46 +02:00
Edouard Vanbelle 921cbef152 test(oidc): test back-channel logout 2026-08-03 22:26:43 +02:00
Edouard Vanbelle acd4420fe3 feat(oidc): impl back channel logout 2026-08-03 08:00:13 +02:00
Edouard Vanbelle 166b8c4891 feat(oidc): RP initiator logout
request token invalidation to IdP (OIDC) on logout
2026-08-03 07:59:14 +02:00
Edouard Vanbelle 5ebe2d3bae feat(oidc): add auto-redirect for OIDC
add `auto_redirect_if_standalone_oidc` in `OXICLOUD_AUTH_POLICIES`
let admin decide to redirect immediately to IdP if OIDC is the only auth method enabled
2026-08-03 01:01:00 +02:00
Edouard Vanbelle b91f2fab2b feat(oidc): add oidc method in OXICLOUD_AUTH_METHODS
permit an admin to specify `oidc` only as the only method to login/register
note that if OIDC is enabled, the engine always append oidc in OXICLOUD_AUTH_METHODS
we could move to an explicit declaration in a major release
2026-08-03 00:49:40 +02:00
Dionisio Pozo 02db85c040 Merge pull request #657 from EdouardVanbelle/fix/services-use-blob-abstraction
fix: prevent services accessing directly to localstorage (audio, media metadata and face indexing)
2026-08-02 23:46:44 +02:00
Edouard Vanbelle 7663f803d3 fix: fix services accessig directly to localstorage
Prevent services accessing directly to localstorage and prefer using an astraction layer
to expose full blob. The abstraction layer (dedup services) will cover backend storage
election (local, s3, ...), encryption, etc

This change permit audio_metadata_service, media_metadaa_service, face_indexing_service to handle
blobs without worring of the backend.

note: prefered way to handle blob is the streamed way. Some services may not have this possibility
2026-08-02 22:20:46 +02:00
Dionisio Pozo 74866bea81 Merge pull request #656 from EdouardVanbelle/feat/storage-key-rotation 2026-08-02 18:10:45 +02:00
Edouard Vanbelle 6ab87d83e8 docs(backend-storage): explain design including the blob header 2026-08-02 17:38:47 +02:00
Edouard Vanbelle 8b0fb03b5c feat(recoverable jobs): clarify life cycle pause vs cancel
a job can be paused/resumed
    a job as an exclusibity by it's name
    if you want to run another job with same name:
    either cancel the first one, or wait of it's terminaison

    pause does not permit to run the other job, this can create
    race conditions
2026-08-02 17:38:44 +02:00
Edouard Vanbelle 5eec0fb36e fix(migration): recover the main banner progression on server restart 2026-08-02 16:25:47 +02:00
Edouard Vanbelle 07802e01f8 feat(recoverable job): add pause/resume capability 2026-08-02 16:17:15 +02:00