CAUTION: RSA TOKEN SINGNING BROKE! DO NOT UPDATE!
I am working on a hot patch.
Breaking
YOU WILL NOT BE ABLE TO DOWNGRADE FROM THIS VERSION!
This is a big release, and the underlying storage layer has changed significantly. It is NOT backwards compatible! Create a backup before you uprgade!. The only way to ever downgrade from this version is by applying a backup!
If you are upgrading from an older version, it MUST be 0.37!
Upgrade: full restart of all nodes
For many reasons, this release needs a full cold restart of the whole cluster. If you run a HA deployment, nodes will even refuse to come up if nodes with an old version are reachable.
- A rollback to an older version after the upgrade is not supported. CREATE A BACKUP BEFORE YOU UPGRADE!
- If you run a HA cluster, you MUST stop all nodes with the old version before you start the new one. Do NOT do a ROLLING RELEASE.
- When the whole cluster is shut down, start nodes back up 1 by 1 with the new version.
Hiqlite v0.17
The DB and Cache layer was updated by a major version shift. It will not be able to downgrade from this version. You only way back is via a backup, if you ever need to. The Hiqlite release itself is huge, and I will not list every single detail here. If you are interested in the full changelog, check out the Hiqlite Releases. I will list the parts that affect you the context of Rauthy here.
TL;DR
It is a lot faster: Combined, up to 6x in some cases in terms of throughput and 5.3x for latency and row mapping, and it got fully robust even when you reach i/o saturation.
New Defaults
Defaults for WAL size and logs_until_snapshot have been changed. Default WAL size is now 8 MiB and a snapshot will only created after 100k logs. If you run a tiny instance, and you want to save every bit of disk space, you can reduce WAL size back to 2MiB and logs_until_snapshot = 10000 to get the old behavior. It's now also a lot snappier. If a leader is lost, it usually takes ~0.5 seconds now to elect a new one. The fsync callbacks for the Raft layer are now async, and the network requests between nodes are pipelined instead of sequential.
Slow Queries
If you run a bigger instance and have insufficient read connections for instance, it will emitwarnings in logs. You have some new config options here:
[cluster]
# The queue wait at which the node logs that its read pool is saturated.
#
# A local read waits in the queue of the read pool for one connection to be free, and only the
# thread that owns the connection can see that wait. The warning carries the wait, how many reads
# are queued behind it, and how long this connection's previous query ran - that last number is
# what separates one query holding a connection from a pool with more reads than connections. A
# pool that stays saturated warns once every 10 seconds, not once per query.
#
# default: 100ms
# overwritten by: HQL_SATURATED_POOL_THRESHOLD
saturated_pool_threshold = '100ms'
# The time a local read may run on its connection before the node logs it as a slow query, naming
# the statement and never its parameters.
#
# Independent of `saturated_pool_threshold` and normally higher than it: one is how long a read
# waited for a connection, the other how long a read that got one took.
#
# A stream is measured from its first row to its drop, the pauses of its consumer included, because
# its read actor is held for exactly that long. A stream you consume slowly is logged like a query
# that ran that long, and it blocks its connection just as long.
#
# default: 1s
# overwritten by: HQL_SLOW_QUERY_THRESHOLD
slow_query_threshold = '1s'
# Log the statement text of a read that ran longer than `slow_query_threshold`.
#
# A statement built by the `sql!()` macros carries no value in it - parameters never reach the log.
# A query typed into the dashboard is different: its values are inline in its text, so a slow
# dashboard query writes them into the log. Set this to false to keep statement text out of the log
# entirely. The saturation warning is unaffected, because it never names a statement.
#
# default: true
# overwritten by: HQL_LOG_SLOW_QUERIES
log_slow_queries = trueBackups
The old version required its own bucket on S3 storage. The new one can share a bucket and you can push backups from mulitple deployments, when you set a custom file prefix per instance:
[cluster]
# The prefix of every backup file name. A backup is always written as
# `{backup_file_prefix}_{node_id}_{unix_ts}.sqlite`, on the local disk
# and in the bucket.
#
# Set one prefix per application when several Hiqlite clusters share a
# single bucket: the cleanup jobs only ever delete files that match this
# exact shape, so clusters with different prefixes can never delete each
# other's backups, and objects that are not Hiqlite backups are never
# touched at all.
#
# default: "backup_node"
# overwritten by: HQL_BACKUP_FILE_PREFIX
backup_file_prefix = "backup_node"
[hiqlite]
# On a backup restore, every node other than 1 deletes its state before
# it joins the restored cluster. With this set, it moves the state into
# `{data_dir}/pre_restore` instead, and only removes it once it is a
# member of the restored cluster. If node 1 fails to apply the backup,
# the previous state of the other nodes is then still there.
#
# CAUTION: the old state stays on disk next to the state the node
# receives from the restored cluster. This needs as much additional disk
# space as the database, its snapshots and logs take, on every node,
# until the node joined.
#
# default: false
# overwritten by: HQL_BACKUP_RESTORE_KEEP_PREVIOUS
backup_restore_keep_previous = falseMetrics
Full database metrics will come in a future version, but there is now a /metrics endpoint (Hiqlite API directly, not Rauthy) which at least gives you information about the backup status.
[cluster]
# Secret for `GET /metrics` (Prometheus) and `GET /backup` (JSON), as
# `Authorization: Bearer <secret>`. At least 16 characters long and
# different from `secret_api`: it only reads metrics, so it can live in a
# scrape config. Both endpoints answer 404 while it is not set.
# May be set to "$SECRETS" to load from the `secrets_file` above.
#
# default: not set
# overwritten by: HQL_SECRET_METRICS
secret_metrics = "SuperSecureMetricsSecret1337"Shutdown Delay
You can now configure the shutdown delay. This must be done very carefully though. When not handled properly, and when it does not match your readiness checks and load balancers, it may be possible that a too low value can route requests to a shutting down instance.
[cluster]
# The pause at the start of a graceful shutdown, before the node leaves
# the cluster or hands its leadership over. `<API>/ready` answers 503
# during it, so load balancers and `readinessProbe`s stop routing to
# this node first. Skipped on a single instance.
# Keep it at least one readiness check interval + 1s: a shorter delay
# lets a load balancer route requests to a node that is already shutting
# down, and those requests fail on the client side. A cluster refuses
# to start with less than 3s.
# The whole shutdown is bounded by this delay plus 10.5s for the
# teardown itself, so keep the sum below your orchestrator's grace
# period (`terminationGracePeriodSeconds`, 30s by default).
#
# default: "9500ms"
# overwritten by: HQL_SHUTDOWN_DELAY
shutdown_delay = "9500ms"Documentation
Hiqlite also got a new Docs Section. It could now be deployed as a classic master - slave like Postgres, or in a GEO replicated setup. These have caveats though, and switchovers will not happen automatically.
MIGRATE_DB_FROM Is Validated At Startup
Rauthy now refuses to start if MIGRATE_DB_FROM is set and:
HQL_NODEScontains more than one node. Before, the migration was skipped with an error log and the node started anyway, without the migrated data.- it does not start with
sqlite:orpostgres.
SMTP Settings Are Validated At Startup
When email.smtp_url is set, email.smtp_conn_mode is default or xoauth2, and email.smtp_tls_mode is not danger-insecure, Rauthy now refuses to start if:
email.smtp_usernameis not setemail.smtp_passwordis not set (defaultonly)email.root_cais set but does not contain a valid PEM certificate
The first two aborted the process before, but only later, when the mailer connected after the start. A root_ca without any certificate in it was silently ignored, so the connection used no custom root at all. Such a config needs to be fixed before the upgrade.
Security
A timely update is strongly recommended!
Not all security issues are listed here. There were also 2 high ones which are left out on purpose. An advisory for each one of them will be published in the upcoming weeks.
RSA signing moved to aws-lc-rs
RSA key generation, token signing (RS256 / RS384 / RS512), and RSA signature validation now use aws-lc-rs instead of the rsa crate, which is affected by the Marvin timing side channel (RUSTSEC-2023-0071, #197). Rauthy never was vulnerable to this (see #197), but using a non-vulnerable version is cleaner. Existing keys keep working without any migration. Generating the RSA JWKs is also much faster now, especially in debug builds.
RSA public keys Rauthy validates against (DPoP proofs, upstream backchannel logout tokens) must now be between 2048 and 8192 bit. Before, anything up to 4096 bit was accepted, including keys below 2048 bit.
Additional device_code checks
The device_code grant does additional validations for users (another round-trip of enabled and not expired), and it checks for a force_mfa requirement by the client the user is verifying the device for. This is only a snaptshot in time though, since it's impossible to re-validate if the device is allowed to refresh tokens.
Refreshed device tokens stay bound to their device
A refresh of a device_code refresh token issued the new tokens as if they came from a normal login: the access token lost its did claim, and the rotated refresh token was stored as a normal refresh token with the normal lifetime. From the first refresh on, the chain no longer belonged to the device, so revoking the device did not end it. A device refresh now keeps the device binding, and it moves the device's expiry forward, so the cleanup does not remove a device that is still in use. Like a regular refresh, it keeps its source token until the replacement exists, so a revocation that lands during the refresh ends the chain as well. Chains that were refreshed before the update stay unbound until they expire, or until the user's refresh tokens are revoked.
Token Exchange is limited to the exchanging client's scopes and lifetime
An exchanged token inherited all scopes of the subject_token, even ones the exchanging client is not allowed to have, including custom scopes that embed user attributes. The exchanged token now only keeps scopes the exchanging client is allowed. Inherited scopes outside of that are dropped, and explicitly requesting one is rejected. The lifetime is now capped by the subject_token's own expiry and the user's expiry as well, so a client can no longer extend access by re-exchanging.
Token Exchange keeps the session of the subject_token
A token issued via the Token Exchange now inherits the session of its subject_token, like refreshed tokens do since #1775. With access.token_revoke_on_logout = true, a logout of that session revokes it as well, and so does an admin deleting the session. Before, only a logout of the whole user did.
Forward Auth cookie can no longer be used as a Rauthy session
The Forward Auth session cookie, which the reverse proxy passes on to the protected upstream app, held the exact same value as Rauthy's own session cookie. That was on purpose, so that an invalidation of the main session would immediately log the user out of all forwarded apps. However, if was theoretically possible that such a protected app (which knows nothing about authentication in the first place, otherwise it would have a native auth), could be malicious and replay the forward auth session cookie again Rauthys main API for the logged-in user. The encrypted value inside the forward auth session cookie is now tagged as a pure forward auth session, and separated by client. This means it cannot be replayed, is still bound to the main session under the hood, and a malicious forward auth app cannot replay the same cookie against other forward auth apps.
Existing Forward Auth sessions need to log in once more after the update.
If you use Forward Auth, invalidate all sessions after upgrading (Admin UI > Sessions, or DELETE /auth/v1/sessions). Forward Auth cookies issued before this release still hold the bare session id and can be replayed as a Rauthy session until that session ends. Logging in again does not rotate the session, so only invalidating it closes the window. Rauthy does not do this automatically, because it would log out every user on every instance, including the ones that never used Forward Auth.
Self-Service E-Mail Changes Respect the Registration Domain Restrictions
The domain_restriction and domain_blacklist of [user_registration] were only applied to the open registration form. An account could move itself to any address, including a restricted or blacklisted one, via the E-Mail change on the account dashboard, and the confirmation of that address applied it without any domain check. Both the request that creates the confirmation link and the confirmation of that link are validated now. Admins are not affected: creating a user, or editing the address of an existing one, is an admin decision and can still set any address.
Registration Can Be Blocked For Reserved Mailbox Names
user_registration.reserved_names blocks the local part of an E-Mail address, the way domain_blacklist blocks a domain, for the open registration and for a self-service E-Mail change. The default is the RFC 2142 team addresses plus the usual system accounts (postmaster, abuse, root, mailer-daemon, …). The match is exact and case-insensitive. A self-hosted mail server behind Rauthy can list every mailbox it does not want to be claimed by whoever registers first.
user_registration.reject_plus_subaddressing = true rejects any address with a + in its local part for the same two paths, which is what makes such a list non-bypassable on a mail server that canonicalizes ceo+news into the mailbox ceo.
[user_registration]
# The default redirect target for a browser after a user has
# successfully reset their password via a magic link, or completed the
# initial setup of a new account. It can be a relative path, like
# '/auth/v1/account', or a full URL to your own application.
#
# Only used when the magic link itself did not carry a 'redirect_uri',
# which can be set during a user registration, or with a password reset
# request from a client. Such a 'redirect_uri' always has priority.
#
# If this is not set, no 'Location' header will be returned, and the
# frontend redirects to the account dashboard, which keeps the current
# behavior.
#
# overwritten by: USER_REG_POST_RESET_REDIRECT_URI
#post_reset_redirect_uri = 'https://example.com'
# Reject any E-Mail address which contains a `+` in its local part,
# for the open registration and for a self-service E-Mail change.
#
# default: false
# overwritten by: USER_REG_REJECT_PLUS_SUBADDRESSING
reject_plus_subaddressing = false
# The local parts of an E-Mail address that are blocked for the open
# registration and for a self-service E-Mail change. The match is exact
# and case-insensitive.
#
# default: [ 'abuse', 'admin', 'administrator', 'daemon', 'ftp',
# 'hostmaster', 'mailnull', 'mailer-daemon', 'noc', 'no-reply',
# 'noreply', 'null', 'operator', 'postmaster', 'proxy', 'root',
# 'security', 'support', 'uucp', 'usenet', 'webmaster', 'www'
# ]
# overwritten by: USER_REG_RESERVED_NAMES - single String, \n separated values
reserved_names = []Changes
OpenSSL Removed
The vendored openssl / openssl-sys dependency has been removed completely from Rauthy. webauthn-rs has been upgraded to 0.6 (using the pure-Rust RustCrypto backend), atrium-oauth now uses Rauthy's rustls-backed [http_client] instead of native-tls, and the release binary is ~5.3 MB smaller. Existing Passkeys stay compatible without migration.
CAUTION: RustCrypto's ASN.1/DER parser is stricter than OpenSSL: if you use FIDO device attestation (webauthn.force_passkey_* or webauthn.optimistic_attestation), non-canonical X.509 attestation root certificates in the FIDO MDS dataset are now skipped with a warning, and authenticators presenting malformed DER attestation certificates will fail attestation (falling back to plain registration when optimistic_attestation = true).
User Consent
You can now require user consents during login. The default is disabled. If you run a public instance, you may need to be required to request them for legal reasons. You get a few more config variables:
[consent]
# Set to `true` to ask users for their consent to a client on the
# login page. The consent content comes from `[[consent.sources]]`
# below, the client's consent source in the Admin UI, or the
# built-in one, which shows the requested scopes. Without it,
# configured `[[consent.sources]]` log a warning at startup.
#
# While it is enabled:
# - the login page asks for consent, the Admin UI included: a login
# without a valid session, which includes one forced by
# `prompt=login` or an exceeded `max_age`, always shows the
# consent block, while a valid session skips it only when the
# user's consent grant for the client and `resource` covers the
# requested scopes for the current consent content and there is
# no `prompt=consent`. With `prompt=none`, an uncovered request is
# answered with `consent_required`. The client's `default_scopes`
# are always accepted, other requested scopes can be declined.
# The grant is stored with the time, IP and user agent of the
# login.
# - the authorization code exchange, FedCM and a refresh require the
# user's consent grant for the client (password, device code and
# token exchange tokens issued by this version are exempt). FedCM
# has no consent screen: it needs a grant from an earlier login
# on the login page.
# - a client deletion also deletes all legacy refresh tokens (issued
# before refresh tokens were bound to a client) of all users, and a
# user's consent revoke also deletes that user's legacy refresh
# tokens.
# - every non-exempt refresh token without a consent grant is
# deleted, and its access token revoked, on its next refresh.
# Turning the flag off again does not restore them.
#
# default: false
# overwritten by: CONSENT_ENABLE
enable = false
# Lifetime of cached consent content fetched from a remote consent
# source (see `[[consent.sources]]` below and the per-client
# consent source in the Admin UI). Accepts Durations like '60s',
# '10m', '1h', or an Integer as seconds. Only the TOML value takes
# a bare Integer, the env var needs a unit, e.g. `3600s`.
# Must be at least 1s.
# A failed fetch is cached as well, for `min(content_cache_ttl, 60s)`,
# so an unavailable source is not requested on every lookup.
#
# default: 1h
# overwritten by: CONSENT_CONTENT_CACHE_TTL
content_cache_ttl = '1h'
# Remote consent sources are configured by an admin, so the source
# itself may resolve to a loopback, private or otherwise non-public
# address, unlike ephemeral client documents, and may redirect to
# another one. A redirect from a source on a public address into
# the internal network is refused. Consent source fetches follow
# redirects only to https, never use system proxies and time out
# after 3 seconds.
[[consent.sources]]
# The consent source per RFC 8707 resource indicator, with
# precedence over the client's own consent source.
#
# NOTE: This is an array value, and you can specify it multiple
# times for different resources. Each `resource` may only exist
# once.
#
# The resource indicator, an absolute URI without a fragment.
# It is matched verbatim against the requested `resource` and
# must only contain the characters allowed there:
# [a-zA-Z0-9,.:/_\-&?=~!$'()*+%@]
#resource = 'https://api.example.com'
# Either `local` for the built-in consent content (the requested
# scopes), or an `https://` URL of at most 1024 bytes of the
# `resource` characters above, without userinfo, fragment or a
# `lang` query key in any case or form (`LANG`, `lang[]`,
# `lang.x`, `l%61ng`, ...). Rauthy fetches
# `GET <url>?lang=<BCP47 language>` and expects:
# {
# "name": "Example API",
# "scopes": {
# "data.read": {
# "title": "Read your data",
# "description": "...",
# "warning": false
# }
# },
# "intro": "...",
# "terms_url": "https://example.com/terms"
# }
# The `lang=en` response is required and the default: the
# response for the user's language is used, the `lang=en` one
# if that is unavailable.
# All fields are shown as plain text: HTML in a scope
# `description` is not rendered, only its text is shown.
# The version of the consent content is the hash of the content
# as shown: the name, intro, terms_url and the requested scopes
# with their title, description and warning (the warnings of
# the `lang=en` response are shown in every language). The hash
# covers the field values as received, HTML markup included, so
# an edit that only changes the markup asks for consent again.
# Any edit to a shown field asks for consent again, an edit to a
# scope that was not requested does not. A user who switches the
# language may be asked again.
# If the `lang=en` response is unavailable or invalid, the
# built-in content is used instead.
# These fallbacks change the version as well and may ask again:
# the built-in content while `lang=en` is unavailable or
# invalid, and the `lang=en` content while the translation is
# unavailable.
source = 'local'
# The name of the resource shown on the consent screen. It wins
# over the `name` of a remote consent document, which is only
# used for a client's own consent source from the Admin UI.
name = 'Example API'Credential Stuffing Detection Can Be Disabled
cred_stuff_detection.enable turns the detector off completely. This is not new, only the config switch is.
[cred_stuff_detection]
# Switches the detector on or off. It records every login
# attempt with a password against a non-existing email or a
# wrong password per source IP, and it blacklists that IP for
# `blacklist_duration` once `blacklist_threshold` different
# combinations appear inside `scan_window`. Set this to
# `false` when a big group of users shares one source address,
# like a corporate NAT gateway, where the detector would
# blacklist all of them. A blacklist lives in the database, so
# it survives restarts until it expires.
#
# default: true
# overwritten by: CRED_STUFF_ENABLE
enable = trueID-JAG via Token Exchange
The token exchange can issue an Identity Assertion JWT Authorization Grant (ID-JAG) for an ID token with requested_token_type=urn:ietf:params:oauth:token-type:id-jag. The client redeems it at another authorization server, as used by the MCP Enterprise-Managed Authorization and Okta's Cross App Access. It is disabled until a Resource Authorization Server is configured, and the client needs the token_exchange flow. Token exchange responses now include issued_token_type. Check the book chapter Token Exchange for the details.
[id_jag]
#[[id_jag.audiences]]
# A Resource Authorization Server that the token exchange may
# issue an ID-JAG for, with `requested_token_type`
# `urn:ietf:params:oauth:token-type:id-jag`. Without an entry,
# no ID-JAG is ever issued.
#
# NOTE: This is an array value, and you can specify it multiple
# times for different audiences. Each `audience` may only exist
# once.
#
# The issuer of the Resource Authorization Server, matched
# verbatim against the requested `audience`.
#audience = 'https://as.example.com/'
# The clients that may request an ID-JAG for this `audience`.
# They also need the `token_exchange` flow. The ID-JAG carries
# the Rauthy `client_id`, so the client must be registered under
# the same id at the Resource Authorization Server.
#clients = ['mcp-client']
# The resources that may be requested. Empty rejects any
# `resource`.
#resources = ['https://mcp.example.com/mcp']
# The scopes that may be requested, with the meaning of the
# Resource Authorization Server. Empty rejects any `scope`.
#scopes = ['chat.read']
# The signing algorithm of the ID-JAG. RS256 is the only one
# every Resource Authorization Server must support.
# Possible values: RS256, RS384, RS512, EdDSA, Ed25519
# default: 'RS256'
#alg = 'RS256'RFC 8707 resource indicators for the device authorization grant
RFC 8707 resource indicators can now be used with the device authorization grant flow.
Rolling App Log Files
By default, Rauthy only logs to stdout. With logging.log_file, it writes a rolling app log file instead: the file is rolled over every day (UTC) into <file_name>.<YYYY-MM-DD> files and stdout gets no logs at all. A background task, running on the cron schedule of logging.log_file_cleanup, cleans the files up afterwards: it deletes everything older than logging.log_file_keep_for and compresses the ones older than logging.log_file_archive_after into .gz files first.
[logging]
# If you want Rauthy to log into a file instead of stdout, set the
# path to that log file here. The file is rolled over every day into
# `<file_name>.<YYYY-MM-DD>` files and stdout will get no logs at all.
# The parent directory is created if it does not exist.
#
# default: None - logs go to stdout
# overwritten by: LOG_FILE
log_file = './rauthy.log'
# When the rolling log file cleanup task runs.
# Accepts cron syntax:
# "sec min hour day_of_month month day_of_week year"
#
# default: "0 0 3 * * * *" - every day at 03:00
# overwritten by: LOG_FILE_CLEANUP
log_file_cleanup = "0 0 3 * * * *"
# How long rolling log files are kept before the cleanup task deletes
# them. Accepts Durations like '60s', '10h', '7d', ...
# '0' disables the cleanup task entirely, including compression.
#
# default: 30d
# overwritten by: LOG_FILE_KEEP_FOR
log_file_keep_for = '30d'
# Rolling log files older than this Duration are compressed into a
# `.gz` file before the cleanup deletes them, for instance '3d'.
# Needs `log_file` to be set.
#
# default: None - log files are never compressed
# overwritten by: LOG_FILE_ARCHIVE_AFTER
log_file_archive_after = '3d'Custom JSON path claim matcher
Rauthy now ships a customized, simplified JSONPath matcher. It brings new possibilities and fixes some issues with the old one, and it improves the performance for many concurrent provider logins: the old matcher re-parsed the path on every single login, the new one compiles a provider's paths and regexes once at config save and caches them.
A non-string claim node is compared by its text form, which is what the old matcher did as well, so true matches a boolean claim and 23 a number. New on top of that are the sigils of a claim value, which the old exact comparison did not have: ^ is a prefix match, ~ a regex, and ^^ types a literal leading ^.
Claim mapping to roles and groups
An upstream provider can map values from the ID token of a federated login to existing local roles and groups.
Each rule is a claim_path, a claim_value, a typ (role / group) and the existing target name, and it is reconciled on every login. Only the targets a provider maps are ever removed, and a mapped target belongs to that provider: a login without a match revokes it even when an admin granted that role or group to the user by hand. The paths use Rauthy's own reduced SONPath parser, the values support ^ prefix and ~ regex sigils, a provider supports at most 32 rules, a target name
cannot contain a , - the separator of a user's role and group lists - and every path and regex is validated when the config is saved.
The rauthy_admin prefix is not valid rule targets, because the admin role is granted by the provider's own admin claim mapping only. The Admin UI has a rule editor for it, and the provider docs document the grammar and the reconcile behavior.
Hide the login button of an upstream provider
An auth provider has a new hide_login flag. When it is active, the button of that provider is not rendered on the login page and the registration page, which keeps an internal provider away from normal users. Everything else about the provider behaves like before, including a targeted login via the idp_hint query parameter, which is the intended way to reach such a provider.
Self-Service E-Mail Change Can Be Denied
You can now deny user self-service email changes via the account dashboard. This usually only comes in handy if you have an open registration with a domain restriction, and you want to prevent users from switching to something else afterwards.
[user_values]
# Deny any self-service E-Mail address change. The account dashboard
# will disable the E-Mail field. Changing the address of a user is an
# admin only action.
#
# default: false
# overwritten by: USER_VALUES_SELF_SERVICE_EMAIL_CHANGE_DENY
self_service_email_change_deny = falseImmediate Account Init From The Registration Form
If you are in a special scenario where Rauthy is your IdP for your own(!) email server, you run into a chicken-and-egg problem when you want to have an open user registration.
In that case, users will likely want the domain your server runs on as their login, and your mail server then creates a new mailbox on first login. However, Rauthy requires the user to validate the email via magic link, and then a user can only initialize the account with that link. That breaks the self-hosted mail server flow.
You now have the option to solve this, but it requires you to GUARANTEE that Rauthy is the single source of truth for your users, and that you protect any possibly locally existing accounts on that server yourself. To make this whole flow possible, a user needs to set a password directly during registration (cannot validate email without access), AND the email_verified will be set to true, because OIDC clients usually reject logins when set to false.
Rauthy tries as best as possible to prevent you from any issues in your config, and it only allows this flow when you have set the most secure settings for the user registration:
user_registration.enable = true
user_registration.domain_restriction = '<your domain>'
user_registration.reject_plus_subaddressing = true
user_registration.reserved_names = [] # -> must not be empty, leave default (RFC 2142) otherwise
user_values.self_service_email_change_deny = true
user_registration.allow_open_redirect = falseIf you mess you the guarantees and deployment config, this can leads to trivial account takeover!
You have the following new config variables:
[user_values]
# Deny any self-service E-Mail address change. The account dashboard
# will disable the E-Mail field. Changing the address of a user is an
# admin only action.
#
# default: false
# overwritten by: USER_VALUES_SELF_SERVICE_EMAIL_CHANGE_DENY
self_service_email_change_deny = false
[user_registration]
# Reject any E-Mail address which contains a `+` in its local part,
# for the open registration and for a self-service E-Mail change.
#
# default: false
# overwritten by: USER_REG_REJECT_PLUS_SUBADDRESSING
reject_plus_subaddressing = false
# The local parts of an E-Mail address that are blocked for the open
# registration and for a self-service E-Mail change. The match is exact
# and case-insensitive.
#
# default: [ 'abuse', 'admin', 'administrator', 'daemon', 'ftp',
# 'hostmaster', 'mailnull', 'mailer-daemon', 'noc', 'no-reply',
# 'noreply', 'null', 'operator', 'postmaster', 'proxy', 'root',
# 'security', 'support', 'uucp', 'usenet', 'webmaster', 'www'
# ]
# overwritten by: USER_REG_RESERVED_NAMES - single String, \n separated values
reserved_names = []
[user_registration]
# Ask for the password in the open registration form and init the account
# right away, instead of sending out the password reset Magic Link.
#
# default: false
# overwritten by: USER_REG_DANGER_REG_ACC_INIT_IMEDIATE
danger_reg_acc_init_immediate = falseThis flow makes it possible for an attacker to do email account enumeration. It is impossible to guard against it with this setup. Only do this with an open registration if this is your only choice, and you have secured your setup properly!
Also, keep in mind that whenever a password expires for a user, they have no way to request a password reset, since the same mailbox is guarded by Rauthy, where they might not be able to log in anymore, so such a case will always become a support task for an admin.
PoW Difficulty Is Validated At Startup
pow.difficulty outside of the range spow accepts (10..=99) made every challenge request fail with a 500 at runtime. Rauthy exits at startup with such a config now.
Token Exchange keeps the delegation chain of the subject_token
The Token Exchange now keeps the act of the subject_token as well, like it already does for the actor_token: it is nested inside the new one, or passed on unchanged without an actor_token. If both tokens carry an act, the exchange is rejected, because the two chains cannot be merged. A chain is limited to 32 actors.
Token Exchange can bind the actor_token to the exchanging client
With the new per-client option Actor token from this client only (actor_same_client via the API), an actor_token in a Token Exchange must have been issued to the exchanging client itself, and any other is rejected with invalid_request. It is off by default, which keeps the current behavior of accepting any valid access token.
act in the Token Introspection
The /oidc/introspect response now contains the act claim of a token issued via a Token Exchange with delegation, including a nested chain, as registered by RFC 8693. Nothing changes for tokens without an act.
Let the user choose MFA method
When a user has OTP + Passkeys registered, you can not opt-in that the user can choose which one to use. The default is to always require the way safer passkey if both are registerd, and handles OTP only as a fallback.
Always Show Password Forgotten
The 'Password forgotten?' link on the login page only shows up after a failed login. With the new access.password_reset_link_always, it is visible from the start, even before the password input is shown. The default is false, which keeps the current behavior.
[access]
# By default, the 'Password forgotten?' link on the login page will
# only show up after a failed login. If set to `true`, it will be
# visible from the start, even before the password input is shown.
#
# default: false
# overwritten by: PASSWORD_RESET_LINK_ALWAYS
password_reset_link_always = falsePassword Reset Redirect Timeout
After a successful password reset, the reset page redirected after a fixed 5 seconds, so a user who missed the confirmation could think the reset had sent them back to where they started. The new user_values.password_reset_redirect_timeout (PASSWORD_RESET_REDIRECT_TIMEOUT) sets the timeout in seconds, and 0 disables the redirect, which keeps the confirmation visible with a link to continue. That link now reads Continue to sign in when it leads back to the client, and the message shows the actual number of seconds. The default is 5, which keeps the current behavior.
[user_values]
# Seconds after a successful password reset until the reset
# page redirects the user, either to the `redirect_uri` of the
# reset request or to the account dashboard. Set to `0` to
# disable the redirect: the success message then stays visible
# with a link to continue.
#
# default: 5
# overwritten by: PASSWORD_RESET_REDIRECT_TIMEOUT
password_reset_redirect_timeout = 5Post Reset Redirect
The redirect after a successful password reset via a magic link, and after the initial setup of a new account, always ended on Rauthy's account dashboard, unless the magic link was created with its own redirect_uri, which a client can provide during a registration or a reset request.
You now have a new config variable to set a custom fallback if not specific overwrite was given.
[user_registration]
# The default redirect target for a browser after a user has
# successfully reset their password via a magic link, or completed
# the initial setup of a new account. Can be a relative path, like
# '/auth/v1/account', or a full URL to your own application.
#
# Only used when the magic link itself did not carry a
# 'redirect_uri'. Such a 'redirect_uri' always has priority. When
# this is not set, no 'Location' header is returned, and the
# frontend redirects to the account dashboard.
#
# overwritten by: USER_REG_POST_RESET_REDIRECT_URI
post_reset_redirect_uri = 'https://example.com'Opt-in Bootstrap Reconcile
The bootstrap groups.json, roles.json, scopes.json and clients.json can be re-applied on every start, and not only against an empty database. Check the book for the details.
[bootstrap]
# If set to `true`, the `clients.json`, `groups.json`,
# `roles.json` and `scopes.json` inside `bootstrap_dir` are
# re-applied on every start, and not only against an empty
# database. Missing entries are created, changed entries are
# updated, and nothing is ever deleted. Only the primary node
# does this. Changes to the files need a restart to be applied.
# Check the book for the details.
#
# default: false
# overwritten by: BOOTSTRAP_RECONCILE
reconcile = falseRead-only LDAP Server
Rauthy can now serve apps that can only log in with an LDAP bind, like the Jellyfin LDAP plugin, with a minimal, read-only LDAPS server. It is disabled by default and configured in the new [ldap] section. Each LDAP app is a client with the password flow enabled and gets its own subtree at cn=<client_id>,ou=clients,<base_dn>. User binds run the same checks as the password grant. See the book chapter LDAP for details.
Apps send the binds of all users from a single IP. If the LDAPS port is only reachable for your apps, disable_ip_brute_force_protection makes user binds skip the per-IP checks, so a few failed logins do not block the app's IP for everyone. It is disabled by default.
If a reverse proxy terminates TLS for LDAP as well, plain_text serves plain LDAP instead. It requires server.proxy_mode = true.
Each user who should log in via LDAP needs a PAM username, which is published as their uid. PAM usernames are always lowercase and therefore unique for the case-insensitive LDAP uid. Users without one are not part of the directory.
For a confidential client, a user bind only succeeds on a connection that did a successful service bind with the client secret before. Public clients accept user binds right away. Each successful user bind creates a new LdapLogin event:
[events]
# The level for the generated Event after a successful
# LDAP user bind.
#
# default: info
# overwritten by: EVENT_LEVEL_LDAP_LOGIN
level_ldap_login = 'info'[ldap]
# Enables a minimal, read-only LDAPS server for clients that can
# only log in via an LDAP bind, like the Jellyfin LDAP plugin.
# Only implicit TLS (LDAPS) is supported, no StartTLS.
# See the book chapter "LDAP" for the directory layout.
#
# default: false
# overwritten by: LDAP_ENABLE
enable = false
# The address the LDAPS server listens on.
#
# default: '0.0.0.0'
# overwritten by: LDAP_LISTEN_ADDRESS
listen_address = '0.0.0.0'
# The port the LDAPS server listens on.
#
# default: 6360
# overwritten by: LDAP_PORT
port = 6360
# The base DN of the directory. Each client gets its own subtree
# below it at `cn=<client_id>,ou=clients,<base_dn>`.
#
# default: 'dc=rauthy,dc=local'
# overwritten by: LDAP_BASE_DN
base_dn = 'dc=rauthy,dc=local'
# TLS certificate and key for the LDAPS server, in PEM format.
# Both must be set together. If not set, the `[tls]` certificate
# is used. Set them when Rauthy itself runs plain HTTP behind a
# reverse proxy that does not terminate TLS for LDAP as well.
# They are hot-reloaded like the `[tls]` certificate and use
# `tls.poll_watch_interval` as well.
#
# overwritten by: LDAP_TLS_CERT, LDAP_TLS_KEY
#cert_path = 'tls/ldap.crt'
#key_path = 'tls/ldap.key'
# Serves plain LDAP without TLS instead of LDAPS, for a reverse
# proxy that terminates TLS and forwards the raw TCP stream. As a
# safeguard, this requires `server.proxy_mode = true`. Rauthy
# then sees the proxy's IP for every LDAP connection, so the
# per-IP brute-force protection applies to the proxy as a whole.
# Never expose the plain LDAP port to anything but the proxy.
#
# default: false
# overwritten by: LDAP_PLAIN_TEXT
plain_text = false
# Disables the per-IP brute-force protection for LDAP user binds:
# no credential stuffing detection, no per-IP failed login counter
# and no IP blacklisting because of failed user binds. Apps like
# Jellyfin send the binds of all users from a single IP, so a few
# failed logins from different users would otherwise block the
# app's IP for everyone. The per-user failed login counter and its
# login delays still apply, and an already blacklisted IP is still
# refused. Service binds keep the per-IP protection.
# CAUTION: a client connecting directly to the LDAPS port can then
# try passwords across many users without an IP limit. Only enable
# it when the LDAPS port is reachable for your apps only.
#
# default: false
# overwritten by: LDAP_DISABLE_IP_BRUTE_FORCE_PROTECTION
disable_ip_brute_force_protection = false
# The maximum number of open LDAP connections. Further ones wait
# until a connection is closed.
#
# default: 1000
# overwritten by: LDAP_MAX_CONNECTIONS
max_connections = 1000CAUTION: See this as experimental for now. Since each client is different, they might use more or less functions, or others. The current impl does not mean every client will work for logins, it means this is a starting point. We only want to implement the minimum of functionality we actually need. If you have an LDAP client that does not work, we need to know the functionality it's missing, so it can be added.
Compatibility for iOS Resident Keys
iOS resident keys were not working properly. This was not an issue on Rauthys side, but actually on Apples, which ignored cred extensions and did not provide the necessary information. More work is being done now that tries to also cover such cases, and resident keys should work on iOS now.
Search Users by Name and Username in the Admin UI
The Users page in the Admin UI can search given_name / family_name and preferred_username in addition to the existing E-Mail and ID. Server-side searches are case-insensitive, and the q validation accepts names from any script.
Users of a Group / Role in the Admin UI
The Groups and Roles views of the Admin UI have a new Users tab that lists every user that is assigned to the selected group / role.
Added I18n: Czech
Czech (cs) translations are now available for the UI (common and admin) and for e-mails. The e-mail date format can be set with email.tz_fmt.cs (TZ_FMT_CS).
Externally Provisioned Client Secrets
PUT /clients/{id}/secret accepts an optional secret in its payload. When given, this value is stored instead of generating a new random secret. This makes continuous declarative provisioning of clients against a running instance possible, which the bootstrap Plain secret cannot do, since the bootstrap only runs on an empty database. When secret is not given, the behavior is unchanged and a new random secret is generated, so existing callers (like the Admin UI) are not affected.
Open Native Apps after MFA Login
When a client uses a custom scheme redirect_uri for a native App (RFC 8252), like myapp://callback, and the login requires a Passkey, the browser silently blocked the final redirect to the App: external protocols require a user activation, which the Passkey ceremony consumed. The MFA Acknowledged page now shows an Open the App to continue link for non-http locations in this case. A click provides a fresh user activation, and the App receives the authorization code. Http(s) redirects are unchanged and remain automatic.
Concurrent User Deletes
When the same user is deleted by two requests at the same time, the one that loses the race now gets a 404 instead of succeeding a second time.
UI Sesison Keep-Alive
The login page, the account dashboard and the admin UI now keep their own session alive. The new GET /auth/v1/keep_alive answers the session's next idle timeout deadline, and each open page beats once per timeout, one minute before that deadline, so a page that sits open no longer runs into its own session timeout. A logged-out device code page now redirects to the login page instead of reloading its own document on every load.
Password Length Up To 1024
The max password length was validated twice with different values: the password policy's length_max was capped at 128, and the request validators hard-capped plain passwords at 256. Both are now 1024, so a user base can be imported from an application that allowed longer passwords. The default password policy is untouched.
Bugfix
- The
stateparam validation during upstream provider logins was more strict than it should have been. This prevented the use of upstream providers with clients like e.g. Proxmox.
#1838 - An RP Initiated Logout rejected an expired
id_token_hintwithToken has expired, so the user ended up on a JSON error and was not logged out. Clients like Outline store theid_tokenat login and send it as the hint when the user logs out, which is usually long after the token expired. The hint is now accepted as long as Rauthy issued it, as RP-Initiated Logout 1.0 section 2 recommends. The signature,iss,typ,iatandnbfare still validated. prompt=nonetogether withprompt=login, or with amax_agethat is exceeded or has no session to check, now redirects witherror=login_required, as OIDC Core requires, instead of showing the login page.- A busy fetcher of ephemeral client documents now answers
503with thex-retry-not-beforeand the standardRetry-Afterheaders instead of429, which is the status of a lockout after failed logins. - Changing the password from the account page cleared the given and family name and all user values, like phone, address and timezone, because the request only contained the password and the self-update replaces the whole profile with the request. The password form now sends the current profile values along with the new password.
#1867 session_validate_ip = falsewas not honored for forward auth. It was impossible to disable the additional IP validation.
#1869- Registering an email OTP from the account page showed the activation code input without ever creating the OTP, and therefore without sending the email, whenever the MFA modification token was obtained through the re-authentication modal. The pending registration is now resumed after a successful re-authentication, and it is dropped when that re-authentication is aborted, so an interrupted flow cannot trigger an action on a later, unrelated fetch.
#1846 - With
preferred_username.email_fallbackon,/userinfowas supposed to return the email aspreferred_usernamewhen none is set. It never did.
#1877 at_hashwas computed with the access token alg instead of id token. This could lead to validation issues, theoretically.
#1875- The clock-skew allowance was meant to accept tokens that expired a few seconds ago. Instead it rejected tokens that were still valid for a few more seconds.
#1871 - Typing the activation code of an email OTP could send the activation twice, because the auto-submit that runs once the code has the expected length also re-ran on other changes. It now only runs when the code itself changes to a complete value, so each action sends a single request and the manual submit is unaffected.
- An invalid
lifetimes.jwk_autorotate_cronorgeo.maxmind_update_cron, or one without a future occurrence, made its scheduler silently die after boot. Rauthy now refuses to start instead.
#1857 - A bug in the JWKS cleanup scheduler always kept the oldest instead of the latest JWK for each alg, and then cleaned up all others that were older than 90 days.
#1927 - A login page that sat open longer than the session timeout answered every login attempt with Invalid credentials, even though the entered email and password were never looked at, because its own session had expired. A
401for a login request without any session now answers with thex-session-expiredheader, and the login page restarts its flow on its own when it gets that header, without claiming anything about the credentials.
#1929