You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "David Handermann (Jira)" <ji...@apache.org> on 2024/10/15 21:13:00 UTC

[jira] [Created] (NIFI-13874) Refactor KeyStore and SSLContext Creation for Tests

David Handermann created NIFI-13874:
---------------------------------------

             Summary: Refactor KeyStore and SSLContext Creation for Tests
                 Key: NIFI-13874
                 URL: https://issues.apache.org/jira/browse/NIFI-13874
             Project: Apache NiFi
          Issue Type: Improvement
            Reporter: David Handermann
            Assignee: David Handermann


A number of unit and integration tests create temporary Key Store and Trust Store files to evaluate the behavior of components with TLS enabled. The {{TemporaryKeyStoreBuilder}} class provides this capability for various tests, which depends on certificate building from {{nifi-security-cert-builder}}. The {{TemporaryKeyStoreBuilder}} persists generated Key Store and Trust Store files to disk, which is not always necessary. The {{nifi-security-utils}} module also has the {{SslContextFactory}} class for abstraction creation of {{SSLContext}} and related Manager objects.

With iterative refactoring of features like certificate generation and SSLContext loading to separate modules, the {{nifi-security-utils}} module should be removed, and necessary functionality should be refactored. For tests that do not need to read from files, a memory-backed Key Store is sufficient, and avoids unnecessary temporary files. The loading SSLContext and Manager objects, the {{nifi-security-ssl}} module provides a variety of Builder classes, without unnecessary dependencies.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)