NIFI-7012 Added logic to bypass sensitive property descriptor check o…#4017
Closed
alopresto wants to merge 5 commits intoapache:masterfrom
Closed
NIFI-7012 Added logic to bypass sensitive property descriptor check o…#4017alopresto wants to merge 5 commits intoapache:masterfrom
alopresto wants to merge 5 commits intoapache:masterfrom
Conversation
…n scriptable component PD during startup. Created ScriptableComponent interface in nifi-api to allow for detection of scriptable components. Added interface to scriptable processors (controller services still outstanding). Changed detection method to instanceof vs. explicit string comparison. Added utility method to detect scriptable components. Added null check before running validation trigger. Added logging for debugging. Extracted HashMapParameterReferenceManager to reusable test class. Deduplicated class definitions in StandardFlowSynchronizer. Fixed test failure in ExecuteGroovyScriptTest where preloads and script body were concatenated without space causing compilation errors. Enabled additional scriptable components. Changed scriptable detection to use inheritance throughout codebase rather than explicit classname allowlist. Added unit tests.
Contributor
|
Closing this PR as @alopresto mentioned in the Jira. |
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
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.
…n scriptable component PD during startup.
Created ScriptableComponent interface in nifi-api to allow for detection of scriptable components.
Added interface to scriptable processors (controller services still outstanding).
Changed detection method to instanceof vs. explicit string comparison.
Added utility method to detect scriptable components.
Added null check before running validation trigger.
Added logging for debugging.
Extracted HashMapParameterReferenceManager to reusable test class.
Deduplicated class definitions in StandardFlowSynchronizer.
Fixed test failure in ExecuteGroovyScriptTest where preloads and script body were concatenated without space causing compilation errors.
Enabled additional scriptable components.
Changed scriptable detection to use inheritance throughout codebase rather than explicit classname allowlist.
Added unit tests.
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
If a scriptable processor (
InvokeScriptedProcessor,ExecuteScript, orExecuteGroovyScript) created a property descriptor and marked it as sensitive, then assigned a sensitive parameter to this property, on startup the application would fail and shutdown because the property descriptor sensitive state was not serialized to theflow.xml.gzfile, as previously there was no such offering for a sensitive property descriptor that was not defined in the native processor. The startup now detects this scenario, prints a warning to the log, and treats the property descriptor as sensitive moving forward.In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically
master)?Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not
squashor use--forcewhen pushing to allow for clean monitoring of changes.For code changes:
mvn -Pcontrib-check clean installat the rootnififolder?LICENSEfile, including the mainLICENSEfile undernifi-assembly?NOTICEfile, including the mainNOTICEfile found undernifi-assembly?.displayNamein addition to .name (programmatic access) for each of the new properties?For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.