Skip to content

providers/oauth2: override RedirectURITypeEnum capitalization for generated API - #22037

Merged
BeryJu merged 2 commits into
goauthentik:mainfrom
saluc28:fix/redirect-uri-enum-naming
May 5, 2026
Merged

BeryJu merged 2 commits into
goauthentik:mainfrom
saluc28:fix/redirect-uri-enum-naming

Conversation

@saluc28

@saluc28 saluc28 commented May 4, 2026 •

Copy link
Copy Markdown
Contributor

Details

Fixes #21469.
RedirectURIType was exposed in the API schema as RedirectUriTypeEnum (lowercase uri) instead of RedirectURITypeEnum, inconsistent with all other IAM-related enums in this codebase (SAMLNameIDPolicyEnum, SCIMAuthenticationModeEnum, LDAPAPIAccessMode).
The root cause is that drf-spectacular's postprocess_schema_enums uses inflection.camelize() which does not preserve acronyms. The established fix pattern in Authentik is ENUM_NAME_OVERRIDES in settings.py, already used for SAML, SCIM and LDAP enums.
Changes:

  • Added RedirectURITypeEnum to ENUM_NAME_OVERRIDES in settings.py
  • Updated schema.yml and regenerated the TypeScript client accordingly

Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema and clients have been updated (make gen)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make docs)

@saluc28
saluc28 requested review from a team as code owners May 4, 2026 17:34
@netlify

netlify Bot commented May 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 9651a2a
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69f8f9f2ad94cf0008cce542
😎 Deploy Preview https://deploy-preview-22037--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 2187c16
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69f8d8b4ad94cf0008c701bc
😎 Deploy Preview https://deploy-preview-22037--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

.options=${logoutMethodOptions}
.help=${msg(
"The logout method determines how the logout URI is called — back-channel (server-to-server) or front-channel (browser iframe).",
"The logout method determines how the logout URI is called — back-channel (server-to-server) or front-channel (browser iframe).",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this change was intended?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right, that wasn't intended. The regeneration process introduced a UTF-8 BOM in several files and corrupted a character in OAuth2ProviderFormForm.ts. Fixed in the latest commit, only the enum rename changes remain.

@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 9651a2a
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69f8f9f23c7dce000893f2a7
😎 Deploy Preview https://deploy-preview-22037--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dominic-r dominic-r changed the title fix(providers/oauth2): correct RedirectURITypeEnum capitalization in API schema providers/oauth2: override RedirectURITypeEnum capitalization for generated API May 4, 2026
@codecov

codecov Bot commented May 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.13%. Comparing base (88a545f) to head (9651a2a).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22037      +/-   ##
==========================================
- Coverage   93.13%   93.13%   -0.01%     
==========================================
  Files        1024     1024              
  Lines       59251    59278      +27     
  Branches      400      400              
==========================================
+ Hits        55186    55211      +25     
- Misses       4065     4067       +2     
Flag Coverage Δ
conformance 36.90% <ø> (+0.29%) ⬆️
e2e 42.09% <ø> (+<0.01%) ⬆️
integration 32.80% <ø> (-0.51%) ⬇️
rust 0.00% <ø> (ø)
unit 92.09% <ø> (-0.01%) ⬇️
unit-migrate 92.13% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BeryJu
BeryJu merged commit b04f8a6 into goauthentik:main May 5, 2026
108 checks passed
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.

API: acronym capitalization inconsistency in RedirectUriTypeEnum

3 participants