Breaking Changes for a major version
This is a list of things that can be subject to change on a future major version upgrade, and can therefore break existing applications. A migration path will have to be prepared for each of them, or at least a warning.
- General
- ditch top-level
oauthfeature, renameoauth_basetooauth, promote features to top-level. - create
oauth_authorization_serverandoauth_resource_serverplugins. - prefix all optional routes with
load_(or suffix with_routes) ex:r.load_oauth_applications). It would have been useful to haveoauth_applicationsreturning the dataset, and we can't use it because name's already attributed.- alternatively, try to built-in this feature in rodauth.
- supported grants set via explicit features set-up (instead of
use_<grant>_grant_type?options).
- ditch top-level
- Security
- refresh token protection policy becomes "rotation" by default (OAuth 2.1);
- refresh token expiration time will be independent of the access token expiration time;
- tokens won't be able to have clear text access and refresh tokens (and client secrets) by default;
- legacy clear text tokens will be migratable;
- (to explore) there will be a separate tokens strategy with a separate table and db-level AC policies, similar to how rodauth handles passwords by default; tokens aren't exactly passwords, but the idea here is to explore how to hide lookups, so potential attackers can't associate stolen tokens with the scopes or owners;
- PKCE setup will be strict by default (OAuth 2.1);
- remove
oauth_tokenstable; tokens become a column fromoauth_grants; -
oauth_token_subjectshould be set per grant type;
- Renaming
-
s/invalid_oauth_response_status/oauth_invalid_response_status/g; -
s/already_in_use_response_status/oauth_already_in_use_response_status/g; -
oauth_prefix in error message options; -
s/oauth_jwt_token_issuer/oauth_jwt_issuer/g; -
s/oauth_application_jws_jwk_column/oauth_applications_jws_jwk_column/g;
-
- OAuth Application
- remove
oauth_application_default_scopeoption; - oauth application selects their own default set of scopes, which get loaded on grant set-up/forms;
- tokens can have a subset of the application scopes;
- remove
- JWT
- create
oauth_jwt_base, with JWT infrastructure (encode/decode, etc) - create
oauth_jwt_access_tokens; when enabled, access tokens are JWT;- should allow having "hybrid" OIDC integration with db access tokens and JWT ID Tokens;
- think about what to do with refresh tokens (they're not JWT yet either);
- remove
oauth_jwt_audienceandoauth_jwt_issuer(to be per-application); - (to explore) jwt verification claim:
audverification involves db comms (unlessoauth_jwt_audienceis set). Maybe find a way to work around that. - Make
oauth_jwt_keys,oauth_jwt_public_keys, etc the only way to configure keys (discontinue the singular and legacy options);
- create
- OpenID
- separate auth_method "oauth scopes" from "openid scopes";
Edited by HoneyryderChuck