Skip to content

Conversation

@kcantrel
Copy link
Collaborator

Changed the way it obtains credentials for the FSxN file systems. Instead of one secret with all the credentials, it will assume one secret per file system. This required also having a way to pass an unknown number of credentials.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 30, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@kcantrel kcantrel requested a review from Copilot April 30, 2025 22:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the way credentials are obtained for FSxN file systems by allowing one secret per filesystem rather than a single secret for all credentials. Key changes include:

  • Refactored functions and variable naming (e.g. processFile renamed to readFile) to support multiple credentials.
  • Updated configuration and error handling logic to support either a secrets file (fsxnSecretARNsFile) or individual filesystem secret parameters.
  • Revised CloudFormation template and documentation to reflect the new configuration options and improve clarity.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
Monitoring/ingest_nas_audit_logs_into_cloudwatch/ingest_audit_log.py Updated credential retrieval logic and variable naming to support multi-secret usage.
Monitoring/ingest_nas_audit_logs_into_cloudwatch/cloudformation-template.yaml Modified parameter groups and descriptions for updated secret configuration.
Monitoring/ingest_nas_audit_logs_into_cloudwatch/README.md Corrected documentation typos and clarified instructions regarding new parameters.
Monitoring/ingest_nas_audit_logs_into_cloudwatch/README-MANUAL.md Updated runtime version and fixed documentation typos related to Lambda layer upload.
Comments suppressed due to low confidence (2)

Monitoring/ingest_nas_audit_logs_into_cloudwatch/ingest_audit_log.py:317

  • Consider using a context manager (with statement) to open the file so that it is automatically closed in case of an exception.
f = open(auditLogPath, 'r')

Monitoring/ingest_nas_audit_logs_into_cloudwatch/cloudformation-template.yaml:146

  • [nitpick] Consider using a boolean parameter for 'copyToS3' instead of a string to simplify type conversion in the Lambda function.
copyToS3: "false"

- An S3 bucket to store the "stats" file and optionally a copy of all the raw NAS audit log files. It will also
hold a Lambda layer file needed to be able to an add Lambda Layer from a CloudFormation script.
- You will need to download the [Lambda layer zip file](https://raw.githubusercontent.com/NetApp/FSx-ONTAP-samples-scripts/main/Monitoring/ingest_nas_audit_logs_into_cloudwatch/lambda_layer.zip)
from this repo and upload it to the S3 bucket. Be sure to perserve the name `lambda_layer.zip`.
Copy link

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

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

Typo detected: 'perserve' should be corrected to 'preserve'.

Suggested change
from this repo and upload it to the S3 bucket. Be sure to perserve the name `lambda_layer.zip`.
from this repo and upload it to the S3 bucket. Be sure to preserve the name `lambda_layer.zip`.

Copilot uses AI. Check for mistakes.
@kcantrel kcantrel merged commit 9b20b3e into main Apr 30, 2025
14 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.

2 participants