-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fixed APPolicy CRD #4640
Fixed APPolicy CRD #4640
Conversation
Not sure if you can change anything, but according to the NAP schema both ints and strings are valid values for those fields. Eg.
|
@schweits for some reason several fields apparently need to be set to integer. Applying an
Triggers:
Unless I'm missing something, the manifest snippet should be correct according to https://docs.nginx.com/nginx-app-protect-waf/declarative-policy/policy/#policy/graphql-profiles/defenseAttributes |
@fabriziofiorucci Right, integers should be valid, but according to the schema (and the doc you linked too), passing in a value like "1024000" should be valid too. But with the change here, wouldn't it reject strings no matter what? Edit: You should be able to do something like:
|
@schweits as discussed, I'll check, test and add the definitive version of the CRD yaml shortly. |
agree with @schweits on changing type to int; but not sure if "x-kubernetes-int-or-string: true" is a way to go either (I think there was a discussion long time ago with kic team, dont remember what we agreed on). @fabriziofiorucci also from your example of the manifest there are fields with the same type (int or string) set to "any". |
@galitskiy I provided @fabriziofiorucci with the CRD we're using in our internal testing repo, so that's where many of those changes came from. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4640 +/- ##
==========================================
- Coverage 51.93% 51.92% -0.01%
==========================================
Files 59 59
Lines 16972 16973 +1
==========================================
- Hits 8814 8813 -1
- Misses 7861 7862 +1
- Partials 297 298 +1 ☔ View full report in Codecov by Sentry. |
@fabriziofiorucci Also the definitions in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved pending comment resolution
@vepatel for some reason
this happens on a Ubuntu 20.04 VM. Any clue? |
@fabriziofiorucci its a local golang issue it seems, make sure you've installed go version i.e. 1.21.3
Now if it fails even after update, edit
i.e. basically remove https://github.com/nginxinc/kubernetes-ingress/blob/main/Makefile#L66 |
Hi @fabriziofiorucci |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed
Proposed changes
maskValueInLogs
to cookies for app-protectuseXmlResponsePage
toxml-profiles
for app-protectspec.policy.xml-profiles[0].defenseAttributes
blocking-settings.properties.evasions.items.properties.description.enum
Checklist
Before creating a PR, run through this checklist and mark each as complete.