FIX - Clean OpenMetadataWorkflowConfig in TestConnection Workflow#26762
FIX - Clean OpenMetadataWorkflowConfig in TestConnection Workflow#26762
Conversation
SM is already encrypting responses. This adds an extra layer of security by not returning unnecessary workflow info (openMetadataServerConnection with the ingestion-bot JWT token) in API responses. The token is only passed Server -> Pipeline Service Client during trigger, never Server -> user. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR prevents exposing openMetadataServerConnection (which can contain the ingestion-bot JWT) in Workflow API responses, ensuring the token is only used server-side when triggering the pipeline/automation runner.
Changes:
- Stop populating
openMetadataServerConnectionin decrypted Workflow responses (set tonull). - Update existing workflow creation IT to assert the connection is not returned.
- Add integration tests to ensure GET/LIST/PUT/VERSION Workflow endpoints do not expose
openMetadataServerConnection.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| openmetadata-service/src/main/java/org/openmetadata/service/resources/automations/WorkflowResource.java | Nullifies openMetadataServerConnection in API responses after decrypting workflow secrets. |
| openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/WorkflowResourceIT.java | Adds/updates IT assertions to validate workflows never return openMetadataServerConnection across endpoints. |
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/WorkflowResourceIT.java
Show resolved
Hide resolved
OpenMetadata Service New-Code Coverage✅ PASS. Required changed-line coverage:
Only changed executable lines under |
…ponses Covers line 617 - verifies decryptOrNullify nullifies openMetadataServerConnection to prevent ingestion-bot JWT token leakage in API responses. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review 👍 Approved with suggestions 0 resolved / 1 findingsFixes TestConnection workflow to clean sensitive OpenMetadataWorkflowConfig data and adds null guards for list responses with comprehensive unit tests. Consider extending the async delete endpoint to also nullify openMetadataServerConnection for consistency. 💡 Security: Async delete endpoint may still return openMetadataServerConnectionThe PR successfully nullifies This is a pre-existing gap (not introduced by this PR), but since the PR's goal is to comprehensively prevent JWT token exposure, it's worth addressing. Consider adding a test for this endpoint similar to the other security tests added, and ensuring it also goes through the nullification path. 🤖 Prompt for agentsOptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
...a-service/src/main/java/org/openmetadata/service/resources/automations/WorkflowResource.java
Show resolved
Hide resolved
|
@Gitar Thanks for the review! However, |
You're right — after looking at the code more carefully, |
|
🟡 Playwright Results — all passed (28 flaky)✅ 3403 passed · ❌ 0 failed · 🟡 28 flaky · ⏭️ 209 skipped
🟡 28 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
Changes have been cherry-picked to the 1.12.4 branch. |
…6762) * FIX - Clean OpenMetadataWorkflowConfig in TestConnection Workflow SM is already encrypting responses. This adds an extra layer of security by not returning unnecessary workflow info (openMetadataServerConnection with the ingestion-bot JWT token) in API responses. The token is only passed Server -> Pipeline Service Client during trigger, never Server -> user. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add unit test for WorkflowResource JWT token not exposed in responses Covers line 617 - verifies decryptOrNullify nullifies openMetadataServerConnection to prevent ingestion-bot JWT token leakage in API responses. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add null guards on list response before iterating Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 747e75e)
…6762) * FIX - Clean OpenMetadataWorkflowConfig in TestConnection Workflow SM is already encrypting responses. This adds an extra layer of security by not returning unnecessary workflow info (openMetadataServerConnection with the ingestion-bot JWT token) in API responses. The token is only passed Server -> Pipeline Service Client during trigger, never Server -> user. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add unit test for WorkflowResource JWT token not exposed in responses Covers line 617 - verifies decryptOrNullify nullifies openMetadataServerConnection to prevent ingestion-bot JWT token leakage in API responses. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add null guards on list response before iterating Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 747e75e)
…6762) * FIX - Clean OpenMetadataWorkflowConfig in TestConnection Workflow SM is already encrypting responses. This adds an extra layer of security by not returning unnecessary workflow info (openMetadataServerConnection with the ingestion-bot JWT token) in API responses. The token is only passed Server -> Pipeline Service Client during trigger, never Server -> user. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add unit test for WorkflowResource JWT token not exposed in responses Covers line 617 - verifies decryptOrNullify nullifies openMetadataServerConnection to prevent ingestion-bot JWT token leakage in API responses. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add null guards on list response before iterating Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 747e75e)



SM is already encrypting responses. This adds an extra layer of security by not returning unnecessary workflow info (openMetadataServerConnection with the ingestion-bot JWT token) in API responses.
The token is only passed Server -> Pipeline Service Client during trigger, never Server -> user.
Describe your changes:
Fixes
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>