-
Notifications
You must be signed in to change notification settings - Fork 8
feat: handle single key secret stores #812
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
Conversation
Signed-off-by: nishantmunjal7 <[email protected]>
📜 Docstring Coverage ReportRESULT: PASSED (minimum: 30.0%, actual: 75.5%) Detailed Coverage Report |
📦 Trivy Vulnerability Scan Results
Report Summary
Scan Result Details✅ No vulnerabilities found during the scan for |
📦 Trivy Secret Scan Results
Report Summary
Scan Result Details✅ No secrets found during the scan for |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
|
🛠 Full Test Coverage Report: https://k.atlan.dev/coverage/application-sdk/pr/812 |
|
🛠 Docs available at: https://k.atlan.dev/application-sdk/feat-single-key-stores |
inishchith
left a comment
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.
looks fine overall, bunch of nits.
post fixing those, can we add unit tests for the change?
📦 Example workflows test results
|
📦 Example workflows test results
|
📦 Example workflows test results
|
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.
Bug: Nested secret data fails to resolve.
The apply_secret_values method doesn't check secret_data.get("extra", {}) as a fallback when resolving values in the extra field, unlike resolve_credentials which has this nested lookup at line 221. This inconsistency means apply_secret_values can't resolve secret references that are stored in a nested extra structure within secret_data, potentially causing credential resolution failures when the two methods are used interchangeably.
application_sdk/services/secretstore.py#L397-L401
application-sdk/application_sdk/services/secretstore.py
Lines 397 to 401 in f4beb89
| # Apply the same substitution to the 'extra' dictionary if it exists | |
| if "extra" in result_data and isinstance(result_data["extra"], dict): | |
| for key, value in list(result_data["extra"].items()): | |
| if isinstance(value, str) and value in secret_data: |
Changelog
Additional context (e.g. screenshots, logs, links)
Checklist
Copyleft License Compliance
Note
Introduce mode-based secret retrieval with per-field single-key lookup, enhanced secret parsing, and comprehensive tests.
application_sdk/services/secretstore.py):MULTI_KEYvsSINGLE_KEYbased oncredentialSourceandsecret-pathusing new enumsCredentialSourceandSecretMode._fetch_single_key_secretsto fetch per-field secrets (includingextra), preserving falsy values and skipping empty/nulls._process_secret_datato delegate single-key handling to new_handle_single_key_secret(parses JSON dicts, otherwise returns{key: value}).get_credentials, merge forDIRECTor resolve viaresolve_credentialsfor others; improved error logging.tests/unit/common/test_credential_utils.py):_handle_single_key_secret,_fetch_single_key_secrets, andget_credentialsmode determination, extra fields, error handling, and falsy value preservation.Written by Cursor Bugbot for commit 8f83c04. This will update automatically on new commits. Configure here.