protected static void addSSLControllerService(final Element element, SecurityPropertiesSchema securityProperties) throws ConfigurationChangeException { try { final Element serviceElement = element.getOwnerDocument().createElement("controllerService"); addTextElement(serviceElement, "id", "SSL-Context-Service"); addTextElement(serviceElement, "name", "SSL-Context-Service"); addTextElement(serviceElement, "comment", ""); addTextElement(serviceElement, "class", "org.apache.nifi.ssl.StandardSSLContextService"); addTextElement(serviceElement, "enabled", "true"); Map<String, Object> attributes = new HashMap<>(); attributes.put("Keystore Filename", securityProperties.getKeystore()); attributes.put("Keystore Type", securityProperties.getKeystoreType()); attributes.put("Keystore Password", securityProperties.getKeyPassword()); attributes.put("Truststore Filename", securityProperties.getTruststore()); attributes.put("Truststore Type", securityProperties.getTruststoreType()); attributes.put("Truststore Password", securityProperties.getTruststorePassword()); attributes.put("SSL Protocol", securityProperties.getSslProtocol()); addConfiguration(serviceElement, attributes); element.appendChild(serviceElement); } catch (Exception e) { throw new ConfigurationChangeException("Failed to parse the config YAML while trying to create an SSL Controller Service", e); } }