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

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

GitHub user alopresto opened a pull request:

    https://github.com/apache/nifi/pull/2463

    NIFI-3367 Enforced minimum length of shared secret in TLS toolkit 
client/server mode

    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] 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.
    
    - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
    - [x] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?
    
    ### 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.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/alopresto/nifi NIFI-3367

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2463.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2463
    
----
commit 79a0aafe51a6d806ef3952650139ebbcd007e274
Author: Lori Buettner <lorraine.buettner@...>
Date:   2018-02-10T00:46:33Z

    NIFI-3367 Added token length check and unit test.

commit 5d9680a3333513bc9e28067eed45b07823f250c7
Author: Lori Buettner <lorraine.buettner@...>
Date:   2018-02-10T01:04:58Z

    NIFI-3367 Resolved failing unit tests.

----


> TLS Toolkit should enforce minimum length restriction on CA token
> -----------------------------------------------------------------
>
>                 Key: NIFI-3367
>                 URL: https://issues.apache.org/jira/browse/NIFI-3367
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Tools and Build
>    Affects Versions: 1.1.1
>            Reporter: Andy LoPresto
>            Priority: Major
>              Labels: security, tls-toolkit
>
> The TLS Toolkit uses a shared secret "token" when running in client/server 
> mode in order to perform pre-authentication when requesting a signed 
> certificate from the CA. There is a validation that this token is *required*, 
> but not that it is of a certain length. Because the HMAC construction is 
> available in the source code, the process could easily be brute-forced if the 
> token value is short. We should enforce a minimum length of 16 bytes 
> (regardless if read from {{config.json}} or provided via command line). 
> We may also want to add exponential rate-limiting on failed HMAC values for 
> the same requested public key DN in order to mitigate malicious requests. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to