-
Notifications
You must be signed in to change notification settings - Fork 146
Generate CRD for AuthenticationFilter with BasicAuth #4349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/authentication-filter-basic-auth
Are you sure you want to change the base?
Generate CRD for AuthenticationFilter with BasicAuth #4349
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/authentication-filter-basic-auth #4349 +/- ##
======================================================================
Coverage 86.08% 86.08%
======================================================================
Files 132 132
Lines 14342 14342
Branches 35 35
======================================================================
Hits 12346 12346
Misses 1792 1792
Partials 204 204 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
the target should be |
|
The linter seemed to have problems with the comments the AuthenticationFilterSpec and BasicAuth structs: a127e6b |
@shaun-nx I think I wrote about this on another PR, but the linter (fieldalignment) does not have a problem with comments. The linter automatically reorganizes fields within a struct to optimize it for the compiler. There is a bug that causes comments to be removed when it does this, so you have to manually add the comments back in. |
Thanks Saylor. We managed to fix it too. @tataruty pointed out the same thing. Will probably be one of those things that I need to see a few times before I remember haha. |
Proposed changes
This change adds a new GoLang API type to
apis/v1alpha1for theAuthenticationFilterThis change only adds the types required for Basic Auth to work, and does not include types specific to JWT Auth. These will be added in future work.
Closes #4309
Example manifest for basic auth
Example output from
kubectl describe authenticationfilters.gateway.nginx.org basic-authValidation
Performed manual checks on x-Kubernetes-Validations for CRD:
for type=Basic, spec.basic must be setFile used:
Result:
when spec.basic is set, type must be 'Basic'Files used:
typeis not definedtypeis set to `BlahResults:
statusCode must be 401 or 403Files used:
statusCodeis301.statusCodeis500Results:
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Release notes
If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.