[ 
https://issues.apache.org/jira/browse/NIFI-3032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15664903#comment-15664903
 ] 

ASF GitHub Bot commented on NIFI-3032:
--------------------------------------

Github user brosander commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1220#discussion_r87884181
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/main/java/org/apache/nifi/properties/NiFiPropertiesLoader.java
 ---
    @@ -158,9 +158,7 @@ private static String getDefaultProviderKey() {
         }
     
         private void initializeSensitivePropertyProviderFactory() {
    -        if (sensitivePropertyProviderFactory == null) {
    -            sensitivePropertyProviderFactory = new 
AESSensitivePropertyProviderFactory(keyHex);
    -        }
    +        sensitivePropertyProviderFactory = new 
AESSensitivePropertyProviderFactory(keyHex);
    --- End diff --
    
    @alopresto won't this still have race conditions if more than one thread 
does NiFiPropertiesLoader.withKey() at the same time?


> NiFiPropertiesLoader can cache stale key after migration
> --------------------------------------------------------
>
>                 Key: NIFI-3032
>                 URL: https://issues.apache.org/jira/browse/NIFI-3032
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.0.0
>            Reporter: Andy LoPresto
>            Assignee: Andy LoPresto
>            Priority: Blocker
>              Labels: encryption, security
>             Fix For: 1.1.0
>
>
> [~bryanrosan...@gmail.com] discovered an issue where the 
> {{NiFiPropertiesLoader}} can be initialized with a static 
> {{SensitivePropertyProviderFactory}} containing a specific {{key}}, and then 
> when {{NiFiPropertiesLoader.withKey()}} is called with a different key, the 
> factory is not refreshed. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to