det101 commented on PR #18659:
URL: 
https://github.com/apache/dolphinscheduler/pull/18659#issuecomment-6092116370

   @SbloodyS Thanks for the review. Addressed in 5454ea32be.
   
   `updateWorkflowInstance()` writes definition history through 
`saveTaskDefine()` / `saveWorkflowDefine()` even when `syncDefine=false`, and 
updates the current definitions when `syncDefine=true`. The instance and those 
definition snapshots are now handled separately:
   
   - Task `localParams` go through `mergeLocalParams()` before 
`saveTaskDefine()`. That method always encodes. The `encode=false` overload is 
removed, so a newly entered sensitive local value is not stored as plaintext in 
the definition log.
   - Instance `global_params` still use `merge()` against the instance 
plaintext and stay plaintext.
   - The copy passed to `workflowDefinition.set()` uses `mergeAndEncode()` 
against the workflow definition's stored ciphertext. An unchanged `******` 
keeps that ciphertext instead of copying the instance plaintext back into the 
definition.
   
   Service coverage is in 
`WorkflowInstanceServiceTest#testUpdateWorkflowInstanceEncryptsDefinitionSnapshotsForBothSyncDefine`,
 with encryption enabled and both `syncDefine=true` and `syncDefine=false`. It 
checks that new sensitive values are encoded on the definition snapshot, 
keep-original values stay the existing ciphertext, and instance globals remain 
plaintext.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to