Skip to content

Conversation

kafeelhasan
Copy link
Contributor

@kafeelhasan kafeelhasan commented Sep 1, 2025

Proposed changes

Checklist

Before sharing this pull request, I completed the following checklist:

Footnotes

  1. Potentially sensitive information includes personally identify information (PII), authentication credentials, and live URLs. Refer to the style guide for guidance about placeholder content.

This commit updates the NAP user facing documentation with the following change:
Based on this issue : nginxinc/nalb-shared#1695, updated the Configure App Protect WAF with the following text - The File path is not optional and is automatically generated in the portal, defaulting to the path “/etc/app_protect/conf/” plus the policy Name with a “.json” extension
@kafeelhasan kafeelhasan requested a review from a team as a code owner September 1, 2025 09:21
Copy link

github-actions bot commented Sep 1, 2025

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@github-actions github-actions bot added documentation Improvements or additions to documentation product/nginxaas Issues related to NGINX as a Service for Azure labels Sep 1, 2025
@kafeelhasan
Copy link
Contributor Author

I have hereby read the F5 CLA and agree to its terms

@kafeelhasan
Copy link
Contributor Author

image

Copy link
Contributor

@mjang mjang left a comment

Choose a reason for hiding this comment

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

Hi @kafeelhasan , question:

First, context. We're helping users manage custom policies in a UI.

If I understand correctly, the default file path is /etc/app_protect/conf. If the default file path is OK for the user, why does the user have to enter anything?

Based on my reading of https://docs.nginx.com/nginx-app-protect-waf/v5/configuration-guide/configuration/#file-reference, it looks like the user can create their own file path. So if they want something other than /etc/app_protect/conf, then I think they have to enter that path in the File path text box.

@mjang
Copy link
Contributor

mjang commented Sep 2, 2025

We have two approvals. Will merge once tests pass.

@mjang mjang merged commit 41350a3 into nginx:main Sep 2, 2025
7 checks passed
- Enter the **Name** (as a filename), **File path**, your policy content, and then select **Save**.

- Be sure to append the filename with ".json".
- The **File path** is automatically generated with "/etc/app_protect/conf/" as the default policies folder.
Copy link
Contributor

Choose a reason for hiding this comment

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

So user must now specify literally the '.json' for the extension to the filename. Why don't we call the filed 'File name' instead of 'Name'? Can I assume we check if the extension is missing (or some other value), and fail fast?
For the file path, are we saying they should not specify '/etc/app_protect/conf/' (i.e., enter only a relative path)? I'm not sure what the 'as the default policies folder' is implying. This seems to imply we can change the default. I believe all custom policies MUST be somewhere under this folder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @russokj based on this discussion - https://github.com/nginxinc/nalb-shared/issues/1695
There is .json extension validation added to the file path, so if user doesn't give .json to the file path, it will ask to give that and save button will be disabled.
In the UI, it is mentioned as name, hence the same in the documentation.
Users need to set a complete file path either with default '/etc/app_protect/conf' or their own. - @happyhd can add more on this point.

Copy link

Choose a reason for hiding this comment

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

Oops, I was wrong, the filePath must be started with '/etc/app_protect/conf', so no custom file path setting is allowed. How about:

  • Enter the Name, File path, your policy content, and then select Save. The File path must be set with "/etc/app_protect/conf/" plus a file name with ".json" extension.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe they can set any filepath other than /etc/app_protect/conf/..., right? @happyhd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation product/nginxaas Issues related to NGINX as a Service for Azure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants