Commit Graph

100 Commits

Author SHA1 Message Date
Sam Dornan
0a25b384fd fix(auth): hash passwords with bcrypt directly and upgrade to bcrypt 5 (#4916) 2026-09-30 10:51:32 -04:00
Georges-Antoine Assi
8b7a6464fb fix(auth): address Greptile review on OIDC identity matching
- Match on (issuer, sub) with exact collation, so subjects from another
  provider or differing only in case never match.
- Refuse a login whose email is linked to another subject at the same
  issuer instead of rebinding the account; relink only across issuers.
- Check the account is enabled before saving identity changes.
- Keep the old email when it is claimed between the check and the write.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 17:34:14 -04:00
Georges-Antoine Assi
9d4bb40a6d fix(auth): match OIDC users by their sub claim so an email change still logs in
Store the provider's `sub` on a new nullable users.oidc_sub column, look users
up by it first and fall back to email, backfilling the sub on the next login. A
user matched by sub gets their stored email updated, unless another account
already holds it.

Fixes #1690

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 17:34:14 -04:00
Georges-Antoine Assi
b69207cc66 fix(oidc): address Greptile review on the UserInfo fallback
Keep email_verified tied to the email it came with, and fall back to the
ID token claims when provider discovery fails as well.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 17:34:13 -04:00
Georges-Antoine Assi
83bd57a5d1 fix(oidc): fetch claims missing from the ID token from the UserInfo endpoint
Providers like Authelia follow OIDC Core 5.4 and return scope claims
(email, preferred_username, groups) only from the UserInfo endpoint.
When any claim RomM reads is absent from the ID token, fetch UserInfo
with the access token, check that its sub matches, and merge it under
the ID token claims.

Fixes #1927

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 17:34:13 -04:00
Georges-Antoine Assi
41767a6a44 Merge remote-tracking branch 'origin/master' into feat/device-push-install 2026-09-27 16:13:58 -04:00
Sam Dornan
6b13fd1698 chore(deps): bump redis to 8.1 and fakeredis to 2.38, drop types-redis (#4844)
* chore(deps): bump redis to 8.1 and fakeredis to 2.38

redis-py 6.2.0 -> 8.1.0 and fakeredis 2.30.1 -> 2.38.0. RQ 2.12
(redis!=6,>=3.5) and fakeredis (redis>=4.3) both accept redis 8.

fakeredis 2.38 types FakeServer's version argument as a tuple, so pass
(7,) instead of 7. Behaviour is unchanged since fakeredis normalises an
int to a one-element tuple.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014wzuPg8vDEjsQ8xqvZgFwx

* chore(deps): drop types-redis in favour of redis-py's own types

types-redis only covers redis 4.6 and shadowed the inline types that
redis 8 ships, so mypy was checking calls against a stale API. Removing
it also drops its transitive stub packages (types-cffi, types-pyopenssl,
types-setuptools), which nothing else uses.

redis-py's types differ from the stubs in three ways:
- Redis, AsyncRedis and Pipeline are not generic, so drop the [str] and
  [bytes] parameters.
- Responses are typed bytes | str regardless of decode_responses, so cast
  at the few call sites that rely on the decoded (or raw) type.
- watch, unwatch, multi, aclose and execute_command are unannotated, so
  add redis to untyped_calls_exclude, as is done for rq and apprise.

Also replace setex, deprecated in redis 8, with set(..., ex=...).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014wzuPg8vDEjsQ8xqvZgFwx

* fix(device-auth): replace deprecated GETSET with SET ... GET

code-review step. GETSET is deprecated since Redis 6.2 in favour of
SET with GET. Using it with ex= also sets the poll key's TTL in the same
command, instead of a separate EXPIRE that a crash could skip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014wzuPg8vDEjsQ8xqvZgFwx

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:28:09 -05:00
nendo
f0c49b6a38 feat(devices): push downloads from the web UI to a device's download queue 2026-09-28 02:08:03 +09:00
Sam Dornan
5a6c895d33 chore(mypy): give every generic its type arguments (#4818)
* chore(mypy): switch to strict mode with listed exceptions

Replace the hand-picked flags with `strict = True`, turning off only the
four flags that aren't clean yet (disallow_any_generics,
warn_return_any, disallow_untyped_calls, disallow_untyped_decorators).
Any other strict flag, including those future mypy releases add to the
preset, is on by default.

That turns on no_implicit_reexport, strict_equality and extra_checks:
- Import each name from the module that defines it. About 240 test
  sites patched a dependency through the module that imported it
  (`scan_module.fs_rom_handler`); they now import the same object from
  its source, so every patch targets what it did before. Tests that
  replace a module attribute are unchanged.
- handler.streaming.memory_cards re-exports store_memory_card_version
  explicitly, since endpoints call it there and tests patch it there.
- mutagen gets implicit_reexport, as it re-exports without __all__.
- Test comparisons build typed values (CoverResult, a typed expected
  dict, enum .value) and the CORS lookup casts for its identity check.
- One ss_handler ** spread keeps a coded ignore: extra_checks wants its
  NotRequired dump_* keys spelled out, and the media dict never has them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PLzXae5up2pYXRoBjfjn2G

* chore(mypy): give every generic its type arguments

Drop disallow_any_generics from the strict-mode exceptions and fix the
347 bare generics it reports, 230 of them in app code.

- Bare `dict` becomes `dict[str, Any]`: update payloads, raw provider
  JSON and endpoint bodies map string keys to mixed values, so the Any is
  real and now written down. The OpenAPI document is unchanged.
- Rom query filters take and return RomSelect; _music_facet_joins and
  _exclude_hidden are generic over the Select they're given, and
  _build_hash_selects returns id-only selects.
- Redis clients are typed by what they return: the decoding caches are
  Redis[str], the RQ connection and binary cache Redis[bytes].
- The rest get explicit parameters: Row, Pattern, ColumnElement,
  QueryableAttribute, SpooledTemporaryFile, Task, Future and friends.

Precise types reached callers that had been getting Any, which surfaced:
- The LaunchBox cache writer is fed binary-cache pipelines.
- The flashpoint and IGDB request helpers return raw JSON of varying
  shape, not always a dict.
- The rom search endpoint returned dicts under a list[SearchRomSchema]
  annotation; it now validates them into that schema.
- The audit filter's id subquery selects strings.
- In tests the binary cache is the non-decoding fake shared with
  async_cache, so it is cast to Redis[bytes] rather than changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PLzXae5up2pYXRoBjfjn2G

* test(upload): assert cleanup against the patched upload directory

The 409 test checked config's ROM_UPLOAD_TMP_BASE while the fixture patches
the endpoint's copy to tmp_path/uploads, so it passed even if cleanup failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PLzXae5up2pYXRoBjfjn2G

* chore(mypy): keep the row type through the ROM filter helpers

filter_roms and its helpers also receive select(Rom.id) membership queries,
so they now take and return the caller's Select type instead of narrowing to
RomSelect. merged_ra_metadata mixes scalar and list values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PLzXae5up2pYXRoBjfjn2G

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 16:32:29 -05:00
Sam Dornan
3750d6ff70 chore(mypy): require full annotations outside tests, type the setup responses (#4795) 2026-09-26 15:31:00 -04:00
zurdi
66deda768c feat(audit): record scans, tasks, sign-ins and account changes
Scans leave a start and an end with their stats, or who stopped them;
manual task runs, sign-ins by session, token and OIDC, failed sign-ins
(one per address and username a minute), password resets, account and
permission changes, client tokens and device approvals each leave an
event. UI settings saves and avatar changes are left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 01:24:36 +02:00
zurdi
2c38ca1918 refactor: simplify notification channels after review
- A channel's min_level is its own enum (info, warning, error), so the
  API refuses `success` and neither the list nor the dialog maps it.
- One home each for the admin-reaches-the-LAN rule (the DB handler now
  returns the owner's role) and for describing a failed delivery.
- One webhook config builder for create and update, which drops the
  secret of a Discord webhook on both.
- SMTP_SECURITY outside starttls/tls/none leaves email off, so the
  heartbeat says so, with a warning at startup.
- The attempts counter gets its TTL in the same round trip as INCR.
- Deliveries group channels by user and serialize a notification only
  when a channel wants it.
- The v2 side reuses errorMessage (now with a fallback) instead of its
  own detail parsing, mirrors the backend length limits as constants,
  shares one channel test factory, and derives `created` on save from
  the list instead of carrying it on the event.
- Drop RBadge's inline override, which nothing needs now that an inline
  badge gets no anchor class, and trim docstrings to one sentence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 18:17:13 +02:00
zurdi
28fc82c63b fix: address the code review and security audit of notification channels
- Bound a webhook delivery: 15 s in all, and only the first KiB of a
  refusal's body is read, so a hostile endpoint can't hold the API or a
  worker with an endless or slow reply.
- Key the confirmation-code cooldown per user and per address instead of
  per channel, which a delete and re-create reset, so a user can't mail
  an address without limit.
- Don't carry a stored secret to another origin or format: it has to be
  given again (Discord, which uses none, drops it), so a changed URL
  can't be used to read an ntfy token or HMAC key.
- Refuse a webhook URL whose port isn't a number; one got saved and then
  broke the channel list with a 500.
- Refuse an unknown SMTP_SECURITY instead of logging in over plaintext.
- Tell the reset form whether reset links are really emailed, which also
  needs a shareable ROMM_BASE_URL (heartbeat NOTIFICATIONS.EMAILS_RESET_LINKS).
- Say a code went out only when the address is new to the channel.
- Match a channel's address whole, so a trailing newline isn't kept.
- Test that forgot-password answers alike and sends the link afterwards,
  and document the new cache keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 18:07:00 +02:00
zurdi
6e1f2ddf45 feat: email password reset links when SMTP is set up (the rest)
The previous commit carried only the renames of this change, when staging
the rest failed on a path the rename had already moved. This is the change
itself.

A reset link only ever went to the server log, for an admin to pass on. It
now goes to the user's email address when SMTP is set up, the user has one
and ROMM_BASE_URL is shareable, falling back to the log otherwise or when the
server refuses the message. The link is built from ROMM_BASE_URL alone, never
the request's Host, so a forged header can't aim it at another server; it
goes out after the response, so its timing doesn't reveal whether the
username exists; and a user's inbox gets at most one a minute.

The SMTP sender moves from the notification channels to
handler/email_handler.py now that it has a second caller. The v2 reset form
says the link is on its way when the server sends email.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 17:37:59 +02:00
Georges-Antoine Assi
0215577c04 Merge pull request #4694 from rommapp/claude/authz-and-invite-hardening
fix(security): check endpoint ownership and consume invites atomically
2026-09-22 20:49:04 -04:00
Sam Dornan
4542998510 fix(backend): make type ignores honest and replace mypy trunk-ignores with fixes (#4711)
* fix(backend): make type ignores match what mypy reports

Third in the staged series clearing the errors #4655 made visible.
Whole-project mypy: 91 errors in 26 files -> 64 in 23.

Twenty `# type: ignore[assignment]` comments in
endpoints/responses/rom.py never suppressed anything. The request-scoped
values `from_orm_with_request` attaches to a Rom (rom_user, has_notes,
user_saves and the rest) are not declared on the model, so mypy reports
`attr-defined`; it does so under 1.19 as well as 2.3, so the code was
wrong when the comments were written rather than drifting since. They
now name the error they were meant to silence.

Seventy-nine ignores across 24 files suppressed nothing at all under
`--warn-unused-ignores`, and are removed. One of them,
`utils/zip_cache.py`, keeps its `attr-defined` code for the private
`zipfile._get_compressor` and drops only `assignment`. The unused set is
identical under mypy 2.3.0 and 2.3.1, and removing them leaves the error
count unchanged under both, so none was quietly needed.

The two `filter` helpers typed as `[QueryT: Select | Update | Delete]`
bound the TypeVar to the union, so `query.filter(...)` returned the union
and could not be assigned back to `QueryT`. Constraining it to the three
types lets mypy check each one separately, and the callers are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SPpv6W2ygP9tQ61fTQxdYp

* fix(backend): replace mypy and ASYNC240 trunk-ignores with real fixes

A `trunk-ignore` only suppresses when Trunk runs the linter. Plain mypy
does not read them, so the 13 on mypy findings were all still errors to
`mypy .` and would fail a whole-project check. Each now has a fix.

endpoints/tasks.py: `common_data` was a plain dict literal unpacked into
eight TypedDict constructors, so mypy saw `dict[str, Any]` and could not
match its keys. It holds exactly the fields of BaseTaskStatusResponse and
is now annotated as one, so the unpacking is checked.

handler/metadata/gamelist_handler.py: both media maps were inferred as
`dict[str, str]`, so indexing the TypedDict with their keys was
unprovable. Their keys are now typed `GamelistMediaKey`, the Literal of
the TypedDict's fields. A misspelt map key is now an error at the entry;
before, only the index site could have noticed, and it was suppressed.

handler/metadata/playmatch_handler.py: `attr` was a bare `str`. A TypeIs
guard narrows it to the five lookup attributes, and the frozenset is
derived from that Literal so the names live in one place. mypy now checks
that each name is a real PlaymatchRomMatch key. It does not check that
each takes an int, since mypy is lenient about value types on a union key;
that still rests on which five names are listed.

endpoints/search.py: the per-source tuples mixed ROM-list and handler
types, which mypy joined to `object`. The dict is now annotated with what
the loop uses: Mapping rows and the MetadataHandler base.

tests/handler/metadata/test_launchbox_handler.py: `Path.stat()` inside an
async test (ASYNC240) now goes through `anyio.Path`, as the rest of the
codebase already does.

Whole-project mypy: 64 errors in 23 files -> 51 in 20, identical under
2.3.0 and 2.3.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SPpv6W2ygP9tQ61fTQxdYp

* fix(backend): keep gamelist media keys in one place

Review pointed out that `GamelistMediaKey` repeated all fourteen fields
of GamelistMetadataMedia. Python has no `keyof`, so any Literal of a
TypedDict's keys is a second declaration of them, and a field added to
the TypedDict would be left out of it without any error.

The three index sites go back to suppressing `literal-required`, now as
`# type: ignore[literal-required]` so plain mypy reads it as well as
Trunk. The TypedDict stays the only declaration of the key set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SPpv6W2ygP9tQ61fTQxdYp

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-22 16:02:39 -05:00
Sam Dornan
1dca4a00e7 fix(security): check an invite before the account checks, and spend it atomically
Registration ran the username and email uniqueness checks ahead of the
token, so an anonymous caller with any garbage token could enumerate
accounts one guess at a time. The token is now verified first, without
consuming it, so a registration rejected on a duplicate keeps the invite.

Consumption moves from a GET followed by a DELETE to a single GETDEL, so
two registrations racing on one invite cannot both see it as valid and
both create an account. The invite link itself is no longer written to
the log, only its id; the link is already in the response.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 09:46:10 -05:00
Sam Dornan
9ea1379c62 fix(security): fail closed on a password hash passlib cannot identify
OIDC-provisioned accounts hold a placeholder rather than a bcrypt hash.
passlib raises on one it cannot identify, so a login against such an
account turned a 401 into a 500 that marked it as OIDC-backed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 09:45:16 -05:00
Sam Dornan
2140d899cb fix(security): move session revocation behind the auth handler
Addresses the two open review findings on the credential-change path.

The endpoint was sequencing two Redis revocations around the database
write itself, reaching past the handler layer into the session
middleware. The whole sequence now lives in `auth_handler`, so the
endpoint validates, calls a handler and serializes, as the rest of the
backend does.

The second revocation runs after the write has committed, so raising
from it reported a failed change that had in fact succeeded, and an
operator could not tell the two apart. It is now logged instead, naming
the account and warning that a session created during the update may
still be live. The first revocation still raises, because it has a write
to abort.

`set_user_new_password` (the forgot-password path) goes through the same
helper, which gives it the pre-write pass it did not have: an
unreachable Redis there used to change the password and leave the
account's sessions live.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SPpv6W2ygP9tQ61fTQxdYp
2026-09-20 17:11:00 +00:00
Georges-Antoine Assi
dc28d2f1a5 fix(auth): reject a taken OIDC username instead of suffixing it
Registering `a-user-2` when `a-user` exists silently hands the provider's
user a name they did not choose. Fail the login with a 409 instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-10 08:00:32 -04:00
Georges-Antoine Assi
ab743de0f6 fix(auth): fit the collision suffix inside the username column
A provider name already at the column's length left no room to append
`-2` to, and the log said the name was invalid even when all that happened
was a collision. Both now come from the one helper that knows which it was.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-09 21:38:34 -04:00
Georges-Antoine Assi
38cd2b6620 fix(auth): sanitize the username an OIDC provider hands us
`preferred_username` was stored verbatim, so a provider that issues
`first.last` created an account whose username RomM's own rules reject.
The account works for login but cannot be edited afterwards: every write
through the users endpoints re-runs `validate_username` on it.

Coerce the name to the allowed charset at registration, falling back to
the email local part when nothing usable survives, and suffix it until it
is free since the column is unique.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-09 20:37:12 -04:00
zurdi
bf801cb314 feat(permissions): narrow user role to admin/user and adapt v1
Collapse the Role enum from viewer/editor/admin to two kinds (admin/user);
non-admin access now comes entirely from permission groups + overrides.

Backend:
- Role -> StrEnum {USER, ADMIN}, VARCHAR-backed (native_enum=False); Role.coerce
  maps legacy/unknown strings (incl. in-flight invites) to USER.
- Resolver: group-less users fall back to the default group (dropped the
  role-based legacy fallback); kiosk caps all non-admins to read-only.
- OIDC editor/viewer claims both map to USER (env var names unchanged).
- Migration 0092 converts the native enum to VARCHAR and normalizes
  ADMIN->admin, VIEWER/EDITOR->user.
- Updated endpoints, conftest fixtures, role/oidc/parity/db-handler tests, tools.

Frontend:
- v2 + v1 user management now use admin/user (dropdowns, defaults, getRoleIcon).
- Regenerated types (Role = 'user' | 'admin'); added role-user i18n to all locales.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 22:42:51 +00:00
Spinnich
11a81c756f feat(auth): add OIDC_ALLOW_REGISTRATION toggle
Gate automatic account creation on OIDC login behind a new OIDC_ALLOW_REGISTRATION environment variable. Defaults to true, preserving the current auto-provisioning behavior; set it to false to run OIDC in an "existing users only" mode, where a login from an email without an existing RomM account is rejected with a 403 instead of silently creating one. Existing users are unaffected either way.

Adds the config constant, env.template and docs entries, and tests covering the enabled/disabled and existing-user paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 12:33:00 +00:00
Georges-Antoine Assi
997e2c44aa start pre-4.8 cleanup 2026-03-12 23:02:12 -04:00
nendo
ea5b7546aa refactor: address PR #3114 review feedback
- Use atomic getdel for pairing code exchange
- Add cascade="all, delete-orphan" to User.client_tokens
- Move generate/hash_client_token into AuthHandler as static methods
- Extract endpoint helpers to utils/client_tokens.py
2026-03-11 10:56:35 +09:00
nendo
e0b25fbc6c feat(client-tokens): add client API tokens with QR pairing flow
Long-lived, revocable, scope-restricted tokens for external clients
(mobile apps, retro handhelds, third-party tools). Includes:

- Backend: model, migration, DB handler, auth integration (rmm_ prefix
  routing in HybridAuthBackend), CRUD + pairing + exchange endpoints,
  rate limiting, scope intersection enforcement, admin oversight
- Frontend: settings page with token management table, stepped
  create/deliver dialog (config -> copy/pair), QR code with RomM logo,
  admin token table, standalone /pair page for QR scan landing
- /pair page supports custom-scheme callbacks for app deep linking,
  falls back to displaying code for manual entry
- 33 backend tests across 5 classes (CRUD, auth, isolation, pairing,
  admin)
2026-03-11 10:56:35 +09:00
HydroSulphide
b9ea937373 Merge branch 'master' into fix-oauth-token-expiry-and-refresh-rotation 2026-03-10 08:51:44 +01:00
HydroSulphide
fd788684b9 fix: TOCTOU race condition allows duplicate refresh token use 2026-03-10 08:38:32 +01:00
HydroSulphide
02336974a6 Implemented greptile suggestions 2026-03-10 08:04:07 +01:00
HydroSulphide
8758cb31b7 Tried to fix everything the bot complained about and the failed pytests.
Three tests were also implemented to check initial implementation that now invalidates expired access and refresh tokens and also rotating refresh tokens.

Since I introduced wrapper functions for create_oauth_token to distinguish between access and refresh token there is no need to set the token type in the data dict, since the type is now enforced in the wrapper functions create_access_token and create_refresh_token.

By convention I renamed create_oauth_token to _create_oauth_token as it is considered a private helper function now.
2026-03-10 07:22:02 +01:00
copilot-swe-agent[bot]
2a7c86e304 Fix OIDC login downgrading existing user roles when no claims provided
Co-authored-by: pacnpal <183241239+pacnpal@users.noreply.github.com>
2026-03-09 18:26:49 +00:00
HydroSulphide
41f64eb42b fix: oauth token invalidation on expiration date and rotating refresh token 2026-03-09 17:03:29 +01:00
Georges-Antoine Assi
e2ece6b938 run fmt 2026-03-08 22:54:58 -04:00
copilot-swe-agent[bot]
53b0b9021b Switch invite token expiration unit from minutes to seconds
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-03-09 02:48:21 +00:00
copilot-swe-agent[bot]
5f309639af Make invite token expiration configurable via env var and UI
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-03-09 01:43:53 +00:00
Georges-Antoine Assi
baddeea972 type ignore 2025-12-08 12:58:01 -05:00
Georges-Antoine Assi
85bf51d088 raise error is prefered username is none 2025-12-08 12:57:20 -05:00
Georges-Antoine Assi
50ddb42c25 [ROMM-2748] Add OIDC_USERNAME_ATTRIBUTE 2025-12-08 10:27:15 -05:00
Georges-Antoine Assi
f2774b9395 Merge pull request #2716 from rommapp/redis-backed-sessions
Add redis-backed session middleware
2025-11-22 18:40:43 -05:00
Georges-Antoine Assi
615e3132e4 changes from bot review 2025-11-22 10:55:14 -05:00
Georges-Antoine Assi
27e02fa2a2 consume the token as soon as its read 2025-11-22 10:51:41 -05:00
Georges-Antoine Assi
ec6bb24662 Add new redis-backed session middleware 2025-11-22 10:47:59 -05:00
Tarow
cb2015fc4d fix: type error when role claim is null 2025-10-19 11:49:31 +02:00
Georges-Antoine Assi
154df816cf only set algos on decode calls 2025-10-03 12:54:42 -04:00
Georges-Antoine Assi
d863ca9e90 Explicitly set supported algorithms on jwt encode/decode 2025-10-03 11:18:01 -04:00
Michon van Dooren
240f348f92 Add support for OIDC role claim 2025-09-29 22:27:10 +02:00
Michael Manganiello
e4e3928d1b misc: Apply import sorting 2025-09-04 11:17:00 -03:00
Georges-Antoine Assi
9079954a3c fix tests 2025-07-19 22:27:05 -04:00
Michael Manganiello
252722e3bc misc: Apply pyupgrade changes for Python 3.12 compatibility
Command applied:
```
find ./backend/ -type f -name "*.py" -exec pyupgrade --py312-plus {} \;
```
2025-06-29 12:27:16 -03:00