Skip to content

Require https redirect URIs in production and staging - #283

Merged
aaronjae22 merged 4 commits into
mainfrom
feat/production-https-redirect-policy
Aug 14, 2026
Merged

Require https redirect URIs in production and staging#283
aaronjae22 merged 4 commits into
mainfrom
feat/production-https-redirect-policy

Conversation

@aaronjae22

Copy link
Copy Markdown
Collaborator

Part of #279 (PR 3/3)

Sets ALLOWED_REDIRECT_URI_SCHEMES = ['https'] for production and staging.

Prod and stg has been inheriting django-oauth-toolkit's default which accepts http:// redirect URIs.

The other two changes exist due the changes made on that one:

The form on oauth/forms.py previously hardcoded "Each URI must start with http:// or https://".
After the policy change that message becomes wrong in production; a user would follow it and then hit DOT's raw redirect uri URI Validation error. invalid_scheme on save. It now derives both the accepted schemes and the message text from the same setting, so the friendly message is the correct one in every environment.

LOLA/spec

§6.1: "The destination MUST fetch data using HTTPS, not HTTP." That MUST sits on the destination, but a source handing authorization codes to http:// callbacks undermines it. §5.1 lists redirect_uri among the authorization-request parameters the source validates.

@aaronjae22
aaronjae22 requested a review from lisad August 10, 2026 22:24
@aaronjae22 aaronjae22 self-assigned this Aug 10, 2026
@aaronjae22
aaronjae22 force-pushed the feat/production-https-redirect-policy branch from 0f7bf8d to 6c17c5b Compare August 14, 2026 17:32
Base automatically changed from feat/redirect-uri-scheme-enforcement to main August 14, 2026 17:43
@aaronjae22
aaronjae22 force-pushed the feat/production-https-redirect-policy branch from 6c17c5b to ade5bf4 Compare August 14, 2026 17:43
@aaronjae22
aaronjae22 merged commit bd1f028 into main Aug 14, 2026
3 checks passed
@aaronjae22
aaronjae22 deleted the feat/production-https-redirect-policy branch August 14, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants