- Please add here
- [#303] execute account selection even without owner, and
select_account_for_resource_ownercan now receivenilas the first argument. - [#304] allow handle auth_time per grant
- [#305] Document the
auth_time_from_access_tokenconfig option in the README (per-grantauth_time), clarifying that it only affects the ID Tokenauth_timeclaim and notmax_ageenforcement - [#307] Fix
bundle exec rake serverfor the test application - [#313] Move Configuration documentation from README to Wiki
- [#312] Raise
Errors::MissingRequiredClaiminstead of silently dropping a blank REQUIRED ID Token claim (iss/sub/aud/exp/iat) inIdToken#as_json, which previously could emit a non-conformant ID Token (OIDC Core 1.0 §2). OPTIONAL claims such asnonce/auth_timeare still omitted when blank - [#311] Include the REQUIRED
client_secret_expires_atmember (value0, never expires) in the Dynamic Client Registration response whenever aclient_secretis issued (RFC 7591 §3.2.1 / OpenID Connect Dynamic Client Registration 1.0 §3.2)
- [#294] Drop stale
Metrics/ClassLengthandMetrics/BlockLengthoverrides from.rubocop_todo.yml - [#293] Drop
Naming/VariableNumberfrom.rubocop_todo.ymland normalise test variable names - [#291] Document multi-namespace mount pattern for multiple resource owner models (#192)
- [#292] Drop formatting cops from
.rubocop_todo.ymland align trailing-comma style with upstream doorkeeper - [#296] Fix the
promptparameter being rejected withinvalid_requestwhen it contains leading or duplicate spaces (e.g.prompt=%20none) — blank entries in the space-delimited value are now ignored - [#299] Raise
InvalidConfigurationwhen theissuerconfig resolves to a blank value instead of silently advertising an emptyissuerin the discovery document. Since v1.10.0 an arity-2issuerblock receives(resource_owner, application)— bothnilin the discovery context — so a block relying on the old v1.9.0 request argument could returnniland produce a discoveryissuerthat mismatched the ID tokeniss(#298)
Important
- Breaking (arity-2 issuer blocks):
resolve_issuernow dispatches arity-2 blocks with(resource_owner, application)in all contexts, including discovery. In v1.9.0DiscoveryControllerpassedrequestas the first argument; existing arity-2 blocks that relied on this receive(nil, nil)in v1.10.0 and should migrate to arity-3 — see #298 for details and migration examples
- [#241] Fix NameError on doorkeeper master by deferring AR model loading in run_hooks (see Doorkeeper PR)
- [#242] Fix
NoMethodErrorfor openid_request in testing environments. - [#246] Fix
at_hashto use correct hash algorithm based onsigning_algorithm - [#250] Return configured
issuerinstead ofroot_urlin WebFinger response (thanks to @sato11 for the original work in #172) - [#248] Fix
max_agealways triggering reauthentication whenauth_time_from_resource_ownerreturns Integer - [#254] Breaking: Omit
expires_infrom theresponse_type=id_tokenresponse (OIDC Core §3.2.2.5 —expires_inrepresents the Access Token lifetime; it is still returned forresponse_type=id_token token) - [#252] Treat
auth_time_from_resource_owneras optional inIdToken— omitauth_timeclaim when unconfigured instead of raisingInvalidConfiguration - [#256] Accept non-callable values (symbol / string) for the
protocolconfig option, matching the pattern used byissuer/signing_algorithm/signing_key/expiration - [#258] Skip
IdTokenconstruction on password grants without theopenidscope - [#259] Skip
IdTokenconstruction on authorization code grants without theopenidscope - [#261] Fix obsolete RuboCop configuration (
require:→plugins:,RSpec/FilePathsplit, removeCapybara/FeatureMethods) - [#263] Security/Breaking: Determine dynamically registered client's
confidentialflag fromtoken_endpoint_auth_methodper RFC 7591 — previously every dynamically registered client was created as public (confidential: false), which let callers authenticate with onlyclient_id(by_uid_and_secret(uid, nil)bypass). Default is nowclient_secret_basic(confidential);noneproduces a public client; unsupported values (e.g.private_key_jwt) are rejected withinvalid_client_metadata. Also derivetoken_endpoint_auth_methods_supportedin the response fromDoorkeeper.configuration.client_credentials_methodsinstead of a hardcoded list, matching #236 - [#264] Apply safe RuboCop autocorrections and fix resulting artifacts
- [#265] Add Dynamic Client Registration section to README
- [#266] Validate
application_type,response_types, andgrant_typesparameters in dynamic client registration per RFC 7591 — reject unsupported values withinvalid_client_metadataand echo the requested values back in the registration response, instead of silently ignoring them and returning the server's global configuration - [#267] Add
authorize_dynamic_client_registrationconfig option to gate the dynamic client registration endpoint per RFC 7591 §3.1 — when set to a callable, the block is evaluated in the controller scope (with access torequest,params,request.headers, etc.) and falsy return values reject the request with401 invalid_token. Default isnilso the endpoint remains open for backward compatibility; consumers should configure this to validate an Initial Access Token (or any other authorization scheme) before allowing client registration - [#268] Update Dynamic Client Registration README for validated metadata parameters
- [#269] Document
authorize_dynamic_client_registrationin README - [#270] Document the unified issuer block signature in README
- [#278] Test against Ruby 4.0.
- [#271] Security: Add
auth_time_from_sessionconfig for per-sessionmax_ageenforcement. The legacyauth_time_from_resource_ownercannot distinguish between concurrent sessions and is now deprecated formax_ageuse (see #150) - [#272] Document
auth_time_from_sessionin README (follow-up to #271) - [#273] Security/Hardening: Merge framework-controlled registered claims last —
iss/sub/aud/exp/iat/nonce/auth_timefor the ID Token andsubfor UserInfo — so a custom claim block can no longer override security-critical values. No legitimate configuration relied on this; custom claims that intentionally shadowed a registered claim name will now be ignored for that key (OIDC Core §2 / §3.1.3.7 / §5.3.2). - [#276] Get RuboCop to zero offenses: fix
Lint/MissingSuperinIdTokenResponse, replaceputswithwarnfor deprecation notices, and modernise spec style - [#277] Fix README inaccuracies (
signing_algorithmdescription and link,discovery_url_optionsendpoint list,oauth-authorization-serverroute) and use constant-time comparison in the DCR authorization example to prevent timing attacks on the Initial Access Token - [#279] Return
account_selection_requiredwhen aprompt=select_accounthandler does not generate a response, per OIDC Core 1.0 §3.1.2.6 — previously the authorization silently continued without account selection. Adds the missingErrors::AccountSelectionRequiredclass, mirroring the existinglogin_requiredbackstop forreauthenticate_resource_owner - [#275] Return
login_requiredformax_agereauthentication whenprompt=none, instead of triggering the interactivereauthenticate_resource_ownerflow (OIDC Core §3.1.2.1) - [#284] Document
acr/amrclaims in README — show how to expose Authentication Context Class Reference and Authentication Methods References via theclaimDSL, with callouts for theresponse:andscope:defaults that silently bite - [#288] Document
offline_accessscope recipe in README — show how to wireuse_refresh_tokenwith scope-based filtering for OIDC offline access - [#281] Fix
NoMethodError/DoubleRenderErrorwhenresource_owner_authenticatorredirects with a truthy non-model value (e.g.current_user || redirect_to(login_url)). Normalize the leaked value tonilwhenperformed?and add missingif ownerguard onselect_account. - [#285] Document custom
jwks_uripath pattern in README — show how to advertise a non-default path in the discovery document using Rails'directURL helper - [#283] Support multiple signing keys in the JWKS response —
signing_keynow also accepts an array (and callables returning an array). The first entry is the active key used to sign new ID tokens; the remaining entries are published in the JWKS so clients can still validate tokens signed with a retired key during a rotation window. Single-value and callable forms continue to work unchanged - [#286] Allow claims to be assigned to multiple scopes via
scope: [:profile, :all_data]— the claim is returned whenever the access token grants any of the listed scopes. Note: the previously implicitClaim#scope=writer (fromattr_accessor :scope) is no longer provided; rebuild the claim instead of mutating it - [#287] Add
apply_prompt_to_non_oidc_requestsoption to honor thepromptparameter on plain OAuth requests that do not include theopenidscope - [#282] Allow
prompt=nonereauthorization with a narrower subset of previously-granted scopes (issue #63). Per RFC 6749 §1.5, narrower-or-equal scopes do not require fresh user consent; previously these requests returnedconsent_required. - [#290] Freeze
Claim#scopesandClaim#responsearrays at construction so callers can't accidentally mutate the claim's internal state from outside - [#297] Fix the generated initializer's
issuerexample referencing an undefinedrequestlocal (the block parameter is_request), which raisedNameErrorwhen copied verbatim
- [#229] Allow to application manage signing key and algorithm
- [#230] Add dynamic client registration
- [#233] fix: handle
DoubleRenderErrorin library instead of requiring consumer workaround - [#232] Implements customizable OpenID request class
- [#236] Derive
token_endpoint_auth_methods_supportedfrom Doorkeeper's client_credentials config - [#225] Allow configuration of id_token expiration using a block.
- [#237] Fix dynamic client registration returning hashed secret when
hash_application_secretsis enabled - [#226] Respect Doorkeeper's configured
pkce_code_challenge_methods
- [#219] Test against Ruby 3.4.
- [#216] Test against Rails 7.1, 7.2, 8.0.
- [#222] Support max_age=0
- [#221] Avoid raising invalid_request error on prompt=create
- [#220] Define priority on possible prompt values to statically & successfully process multiple prompt values
- [#224] Define priority between max_age & prompt
- [#215] Drop support for Ruby 2.7, 3.0 and Rails 6.
- [#209] Configuration per IdToken expiration (thanks to @martinezcoder)
- Support Doorkeeper 5.7
- [#201] Add back typ=JWT to header
- [#198] Fully qualify
JWT::JWK::Thumbprintconstant with :: (thanks to @stanhu)
- [#194] Default to RFC 7638 kid fingerprint generation (thanks to @stanhu).
- [#186] Simplify gem configuration reusing Doorkeeper configuration option DSL (thanks to @nbulaj).
- [#182] Drop support for Ruby 2.6 and Rails 5 (thanks to @sato11).
- [#188] Fix dookeeper-jwt compatibility (thanks to @zavan).
Note that v1.8.4 changed the default kid fingerprint generation from RFC 7638 to a format based on the SHA256 digest of the key element. To restore the previous behavior, upgrade to v1.8.6.
- [#177] Replace
json-jwtwithruby-jwtto align with doorkeeper-jwt (thanks to @kristof-mattei). - [#185] Don't call active_record_options for Doorkeeper >= 5.6.3 (thanks to @zavan).
- [#183] Stop render consent screen when user is not logged-in (thanks to @nov).
- [#180] Add PKCE support to OpenID discovery endpoint (thanks to @stanhu).
- [#168] Allow to use custom doorkeeper access grant model (thanks @nov).
- [#170] Controllers inherit
Doorkeeper::AppliactionMetalController(thanks @sato11). - [#171] Correctly override
AuthorizationsControllerparams (thanks to @nbulaj).
- [#153] Fix ArgumentError caused by client credential validation introduced in Doorkeeper 5.5.1 (thanks to @CircumnavigatingFlatEarther)
- [#161] Fix .well-known/openid-connect issuer (respond to block if provided) (thanks to @fkowal).
- [#152] Expose oauth-authorization-server in routes (thanks to @mitar)
No changes from v1.8.0-rc1.
This gem now requires Doorkeeper 5.5 and Ruby 2.5.
- [#138] Support form_post response mode (thanks to @linhdangduy)
- [#144] Support block syntax for
issuerconfiguration (thanks to @maxxsnake) - [#145] Register token flows with the strategy instead of the token class (thanks to @paukul)
- [#126] Add discovery_url_options option for discovery endpoints URL generation (thanks to @phlegx)
- [#123] Remove reference to ApplicationRecord (thanks to @wheeyls)
- [#124] Clone doorkeeper.grant_flows array before appending 'refresh_token' (thanks to @davidbasalla)
- [#129] Avoid to use the config alias while supporting Doorkeeper 5.2 (thanks to @kymmt90)
- [#119] Execute end_session_endpoint in the controllers context (thanks to @joeljunstrom)
- [#111] Add configuration callback
select_account_for_resource_ownerto support theprompt=select_accountparam - [#112] Add grant_types_supported to discovery response
- [#114] Fix user_info endpoint when used in api mode
- [#116] Support Doorkeeper API (> 5.4) for registering custom grant flows.
- [#117] Fix migration template to use Rails migrations DSL for association.
- [#118] Use fragment urls for implicit flow error redirects (thanks to @joeljunstrom)
- [#108] Add support for Doorkeeper 5.4
- [#103] Add support for end_session_endpoint
- [#109] Test against Ruby 2.7 & Rails 6.x
This version adds on_delete: :cascade to the migration template for the oauth_openid_requests table, in order to fix #82.
For existing installations, you should add a new migration in your application to drop the existing foreign key and replace it with a new one with on_delete: :cascade included. Depending on the database you're using and the size of your application this might bring up some concerns, but in most cases the following should be sufficient:
class UpdateOauthOpenIdRequestsForeignKeys < ActiveRecord::Migration[5.2]
def up
remove_foreign_key(:oauth_openid_requests, column: :access_grant_id)
add_foreign_key(:oauth_openid_requests, :oauth_access_grants, column: :access_grant_id, on_delete: :cascade)
end
def down
remove_foreign_key(:oauth_openid_requests, column: :access_grant_id)
add_foreign_key(:oauth_openid_requests, :oauth_access_grants, column: :access_grant_id)
end
end- [#96] Bump
json-jwtbecause of CVE-2019-18848 (thanks to @leleabhinav) - [#97] Fixes for compatibility with Doorkeeper 5.2 (thanks to @linhdangduy)
- [#98] Cascade deletes from
oauth_openid_requeststooauth_access_grants(thanks to @manojmj92) - [#99] Fix
audienceclaim when application is not set on access token (thanks to @ionut998)
- [#85] This gem now requires Doorkeeper 5.2, Rails 5, and Ruby 2.4
- [#81] Allow silent authentication without user consent (thanks to @jarosan)
- Don't support Doorkeeper >= 5.2 due to breaking changes
- [#80] Check for client presence in controller, fixes a 500 error when
client_idis missing (thanks to @cincospenguinos @urnf @isabellechalhoub)
- [#75] Fix return value for
after_successful_response(thanks to @daveed)
- [#72] Add
revocation_endpointandintrospection_endpointto discovery response (thanks to @scarfacedeb)
- [#70] This gem now requires Doorkeeper 5.0, and actually has done so since v1.5.4 (thanks to @michaelglass)
- [#69] Return
crvparameter for EC keys (thanks to @marco-nicola)
- [#66] Fix an open redirect vulnerability (CVE-2019-9837, thanks to @meagar)
- [#67] Don't delete existing tokens with
prompt=consent(thanks to @nov)
- [#62] Support customization of redirect params in
id_tokenandid_token tokenresponses (thanks to @meagar)
- [#60] Don't break native authorization in Doorkeeper 5.x
- [#58] Use versioned migrations for Rails 5.x (thanks to @tvongaza)
- [#56] The previous release was a bit premature, this fixes some compatibility issues with Doorkeeper 5.x
- [#55] This gem is now compatible with Doorkeeper 5.x
- [#52] Custom claims can now also be returned directly in the ID token, see the updated README for usage instructions
- Support for Ruby versions older than 2.3 was dropped
- Redirect errors per Section 3.1.2.6 of OpenID Connect 1.0 (by @ryands)
- Set
id_tokenwhen it's nil in token response (it's used inrefresh_tokenrequests) (by @Miouge1)
- Support for Implicit Flow (
response_type=id_tokenandresponse_type=id_token token), see the updated README for usage instructions (by @nashby, @nhance and @stevenvegt)
- The configuration setting
jws_private_keywas renamed tosigning_key, you can still use the old name until it's removed in the next major release
- Support for pairwise subject identifiers (by @travisofthenorth)
- Support for EC and HMAC signing algorithms (by @110y)
- Claims now receive an optional third
access_tokenargument which allow you to dynamically adjust claim values based on the client's token (by @gigr)
- Fixes the
undefined local variable or method 'pre_auth'error
- The configuration setting
jws_public_keywasn't actually used, it's deprecated now and will be removed in the next major release - The undocumented shorthand
to_procsyntax for defining claims (claim :user, &:name) is not supported anymore
- Claims now receive an optional second
scopesargument which allow you to dynamically adjust claim values based on the requesting applications' scopes (by @nbibler) - The
promptparameter valuesloginandconsentare now supported - The configuration setting
protocolwas added (by @gigr)
- Standard Claims are now mapped correctly to their default scopes (by @tylerhunt)
- Blank
nonceparameters are now ignored
nilvalues and empty strings are now removed from the UserInfo and IdToken responses- Allow
json-jwtdependency at ~> 1.6. (by @nbibler) - Configuration blocks no longer internally use
instance_evalwhich previously gave undocumented and unexpectedselfaccess to the caller (by @nbibler)
This release is a general clean-up and adds support for some advanced OpenID Connect features.
- This version adds a table to store temporary nonces, use the generator
doorkeeper:openid_connect:migrationto create a migration - Implement the new configuration callbacks
auth_time_from_resource_ownerandreauthenticate_resource_ownerto support advanced features
- Add discovery endpoint (a16caa8)
- Add webfinger and keys endpoints for discovery (f70898b)
- Add supported claims to discovery response (1d8f9ea)
- Support prompt=none parameter (c775d8b)
- Store and return nonces in IdToken responses (d28ca8c)
- Add generator for initializer (80399fd)
- Support max_age parameter (aabe3aa)
- Respect scope grants in UserInfo response (25f2170)