You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by kr...@apache.org on 2018/11/08 21:07:51 UTC
knox git commit: KNOX-1576 - Document the --master and --generate
parameter for the create-master command (Lars Francke via Kevin Risden)
Repository: knox
Updated Branches:
refs/heads/master 5b39ef925 -> 2b2eff282
KNOX-1576 - Document the --master and --generate parameter for the create-master command (Lars Francke via Kevin Risden)
Signed-off-by: Kevin Risden <kr...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/2b2eff28
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/2b2eff28
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/2b2eff28
Branch: refs/heads/master
Commit: 2b2eff282fe27d149c5b26c91d0b9e14b7ac58ea
Parents: 5b39ef9
Author: Kevin Risden <kr...@apache.org>
Authored: Thu Nov 8 15:34:19 2018 -0500
Committer: Kevin Risden <kr...@apache.org>
Committed: Thu Nov 8 15:34:24 2018 -0500
----------------------------------------------------------------------
.../org/apache/knox/gateway/util/KnoxCLI.java | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/knox/blob/2b2eff28/gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java b/gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java
index 68f9c16..9e66ecc 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java
@@ -185,7 +185,7 @@ public class KnoxCLI extends Configured implements Tool {
* <pre>
* % knoxcli version
* % knoxcli list-topologies
- * % knoxcli master-create keyName [--size size] [--generate]
+ * % knoxcli master-create keyName [--size size] [--master mastersecret] [--generate]
* % knoxcli create-alias alias [--cluster clustername] [--generate] [--value v]
* % knoxcli list-alias [--cluster clustername]
* % knoxcli delete=alias alias [--cluster clustername]
@@ -834,12 +834,18 @@ public class KnoxCLI extends Configured implements Tool {
}
public class MasterCreateCommand extends Command {
- public static final String USAGE = "create-master [--force]";
- public static final String DESC = "The create-master command persists the\n" +
- "master secret in a file located at:\n" +
- "{GATEWAY_HOME}/data/security/master. It\n" +
- "will prompt the user for the secret to persist.\n" +
- "Use --force to overwrite the master secret.";
+ public static final String USAGE = "create-master [--force] [--master mastersecret] [--generate]";
+ public static final String DESC = "The create-master command persists the master secret in a file located at:\n" +
+ "{GATEWAY_HOME}/data/security/master.\n" +
+ "It will prompt the user for the secret to persist.\n" +
+ "Use --force to overwrite the master secret.\n" +
+ "Use --master to pass in a master secret to persist.\n" +
+ "This can be used to persist the secret without any user interaction.\n" +
+ "Be careful as the secret might appear in shell histories or process listings.\n" +
+ "Instead of --master it is usually a better idea to use --generate instead!\n" +
+ "Use --generate to have Knox automatically generate a random secret.\n" +
+ "The generated secret will not be printed or otherwise exposed.\n" +
+ "Do not specify both --master and --generate at the same time.\n";
public MasterCreateCommand() {
}