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

    https://github.com/apache/nifi/pull/695#discussion_r73270563
  
    --- Diff: 
nifi-toolkit/nifi-toolkit-tls/src/main/java/org/apache/nifi/toolkit/tls/service/BaseCertificateAuthorityCommandLine.java
 ---
    @@ -0,0 +1,87 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.nifi.toolkit.tls.service;
    +
    +import org.apache.commons.cli.CommandLine;
    +import org.apache.nifi.toolkit.tls.commandLine.BaseCommandLine;
    +import org.apache.nifi.toolkit.tls.commandLine.CommandLineParseException;
    +import org.apache.nifi.toolkit.tls.commandLine.ExitCode;
    +import org.apache.nifi.toolkit.tls.configuration.TlsConfig;
    +import org.apache.nifi.util.StringUtils;
    +
    +import java.io.File;
    +
    +public class BaseCertificateAuthorityCommandLine extends BaseCommandLine {
    +    public static final String TOKEN_ARG = "token";
    +    public static final String CONFIG_JSON_ARG = "configJson";
    +    public static final String USE_CONFIG_JSON_ARG = "useConfigJson";
    +    public static final String PORT_ARG = "PORT";
    +
    +    public static final String DEFAULT_CONFIG_JSON = new 
File("config.json").getAbsolutePath();
    +
    +    private String token;
    +    private String configJson;
    +    private boolean onlyUseConfigJson;
    +    private int port;
    +    private String dn;
    +
    +    public BaseCertificateAuthorityCommandLine(String header) {
    +        super(header);
    +        addOptionWithArg("t", TOKEN_ARG, "The token to use to prevent MITM 
(required and must be same as one used by CA)");
    +        addOptionWithArg("f", CONFIG_JSON_ARG, "The place to write 
configuration info", DEFAULT_CONFIG_JSON);
    +        addOptionNoArg("F", USE_CONFIG_JSON_ARG, "Flag specifying that all 
configuration is read from " + CONFIG_JSON_ARG + " to facilitate automated use 
(otherwise "
    +                + CONFIG_JSON_ARG + " will only be written to.");
    +        addOptionWithArg("p", PORT_ARG, "The port to use to communicate 
with the Certificate Authority", TlsConfig.DEFAULT_PORT);
    +        addOptionWithArg("D", DN_ARG, "The dn to use for the certificate", 
TlsConfig.calcDefaultDn(TlsConfig.DEFAULT_HOSTNAME));
    --- End diff --
    
    Also same message for both client and server, will change to abstract 
method here and override


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to