Skip to content

Commit c44d194

Browse files
[AAP-50420] Add Default JWT Algorithms (ansible#820)
## Description <!-- Mandatory: Provide a clear, concise description of the changes and their purpose --> - What is being changed? Updates the default for `JWT_ALGORITHMS`. If not specified, we will use the default from `OpenIdConnectAuth.JWT_ALGORITHMS` - Why is this change needed? This change is needed to ensure a sane default set of JWT_ALGORITHMS is applied, if none are specified. - How does this change address the issue? This change addresses the issue, by ensuring we apply a default, instead of specifying None. - This PR is an optional alternative to ansible#821 ## Type of Change <!-- Mandatory: Check one or more boxes that apply --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update - [ ] Test update - [ ] Refactoring (no functional changes) - [ ] Development environment change - [ ] Configuration change ## Self-Review Checklist <!-- These items help ensure quality - they complement our automated CI checks --> - [x] I have performed a self-review of my code - [x] I have added relevant comments to complex code sections - [x] I have updated documentation where needed - [x] I have considered the security impact of these changes - [x] I have considered performance implications - [x] I have thought about error handling and edge cases - [x] I have tested the changes in my local environment ## Testing Instructions <!-- Optional for test-only changes. Mandatory for all other changes --> <!-- Must be detailed enough for reviewers to reproduce --> ### Prerequisites <!-- List any specific setup required --> ### Steps to Test 1. Create a Generic OIDC authenticator without specifying any algorithms 2. Ensure default algorithm is populated upon save. 3. ### Expected Results <!-- Describe what should happen after following the steps --> ## Additional Context <!-- Optional but helpful information --> ### Required Actions <!-- Check if changes require work in other areas --> <!-- Remove section if no external actions needed --> - [ ] Requires documentation updates <!-- API docs, feature docs, deployment guides --> - [ ] Requires downstream repository changes <!-- Specify repos: django-ansible-base, eda-server, etc. --> - [ ] Requires infrastructure/deployment changes <!-- CI/CD, installer updates, new services --> - [ ] Requires coordination with other teams <!-- UI team, platform services, infrastructure --> - [ ] Blocked by PR/MR: #XXX <!-- Reference blocking PRs/MRs with brief context --> ### Screenshots/Logs <!-- Add if relevant to demonstrate the changes --> --------- Co-authored-by: John Westcott IV <[email protected]>
1 parent 6b2efe3 commit c44d194

File tree

1 file changed

+1
-1
lines changed
  • ansible_base/authentication/authenticator_plugins

1 file changed

+1
-1
lines changed

ansible_base/authentication/authenticator_plugins/oidc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class OpenIdConnectConfiguration(BaseAuthenticatorConfiguration):
124124

125125
JWT_ALGORITHMS = ListField(
126126
help_text=_("The algorithm(s) for decoding JWT responses from the IDP."),
127-
default=None,
127+
default=OpenIdConnectAuth.JWT_ALGORITHMS,
128128
allow_null=True,
129129
validators=[JWTAlgorithmListFieldValidator()],
130130
ui_field_label=_('OIDC JWT Algorithm(s)'),

0 commit comments

Comments
 (0)