-
Notifications
You must be signed in to change notification settings - Fork 1
Fix default credentials being used if secrets aren't resolved #31
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add resolveCredential method to SqlDataSource that detects unresolved workspace secrets patterns like 'secrets.ATHENA_USER' and '[secret]'. This prevents silent fallback to default credentials when secrets aren't properly resolved by Nextflow's secrets system. The method provides comprehensive error messages with troubleshooting guidance for common secrets configuration issues. Fixes issue where plugin would use default username 'sa' instead of failing fast when workspace secrets were not accessible. Signed-off-by: Edmund Miller <[email protected]>
Add test cases for: - Detection of 'secrets.PATTERN' unresolved secrets - Detection of '[secret]' placeholder patterns - Proper handling of null and empty credentials - Fallback constructor behavior with secrets - Comprehensive error message validation - Integration testing with ChannelSqlExtension Ensures robust validation of secrets detection functionality and provides regression protection for the secrets handling feature. Signed-off-by: Edmund Miller <[email protected]>
Add docs/secrets.md with detailed guidance on: - Configuring workspace secrets with database credentials - Setting up secrets in Seqera Platform - Local development with Nextflow secrets command - Troubleshooting common secrets configuration issues - Error pattern identification and resolution Update README.md to reference the new secrets documentation. Provides users with complete guidance for secure credential management in production deployments, especially for cloud databases like AWS Athena. Signed-off-by: Edmund Miller <[email protected]>
Reduce test redundancy by: - Using parameterized test for multiple secret patterns - Combining similar test scenarios - Removing excessive error message validation - Keeping only essential test coverage Maintains complete functionality validation while reducing test complexity and maintenance overhead. Signed-off-by: Edmund Miller <[email protected]>
Enhance the credential input test to cover all original scenarios: - Valid credentials should be accepted as-is - Null/empty inputs should default to 'sa' - Invalid secret patterns should throw exceptions Uses Spock's parameterized testing to maintain complete test coverage while keeping the test code concise and maintainable. Signed-off-by: Edmund Miller <[email protected]>
Add @requires annotation to skip AWS Athena test when required environment variables are not available, preventing test failures in environments without AWS credentials configured. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Edmund Miller <[email protected]>
Add changelog entry documenting secrets detection fixes and documentation improvements for the 0.7.1 release. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Edmund Miller <[email protected]>
bentsherman
approved these changes
Aug 21, 2025
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.
LGTM. Are you able to merge on your own?
Yep! I'll make a release 🤞🏻 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes silent fallback to default credentials when workspace secrets aren't resolved.
This pull request adds robust support for using secrets as database credentials in nf-sqldb plugin configurations, with improved error handling and documentation.
Added some documentation and some tests for it as well!