eric-maynard commented on code in PR #461:
URL: https://github.com/apache/polaris/pull/461#discussion_r1931080534
##########
quarkus/admin/src/main/java/org/apache/polaris/admintool/BootstrapCommand.java:
##########
@@ -38,20 +39,37 @@ public class BootstrapCommand extends BaseCommand {
List<String> realms;
@CommandLine.Option(
- names = {"-c", "--credential"},
- paramLabel = "<realm,clientId,clientSecret>",
+ names = {"-c", "--credentials"},
+ description = "Principal credentials to bootstrap. Must be a valid JSON
array e.g. " +
+ "[{\"realm\": \"my-realm\", \"principal\": \"root\", \"clientId\":
\"polaris\", \"clientSecret\": \"p4ssw0rd\"}]")
+ String credentials;
+
+ @CommandLine.Option(
+ names = {"-p", "--print-credentials"},
description =
- "Root principal credentials to bootstrap. Must be of the form
'realm,clientId,clientSecret'.")
- List<String> credentials;
+ "Print root credentials to stdout")
Review Comment:
It may not be obvious to all users that Polaris will generate client
ID/secret if they are not explicitly provided.
Oh, this is a good point. I'll add a note on this, though I'm not sure the
print-credentials flag is the right place for that.
Ultimately, I want to keep the behavior of the flags "simple", so having
print-credentials just "print credentials" with no qualifiers appeals to me.
Also, FWIW, it does not print out exactly the same clientId:clientSecret tuple
you pass in. See the note in `BootstrapCommandTest`.
##########
quarkus/admin/src/main/java/org/apache/polaris/admintool/BootstrapCommand.java:
##########
@@ -38,20 +39,37 @@ public class BootstrapCommand extends BaseCommand {
List<String> realms;
@CommandLine.Option(
- names = {"-c", "--credential"},
- paramLabel = "<realm,clientId,clientSecret>",
+ names = {"-c", "--credentials"},
+ description = "Principal credentials to bootstrap. Must be a valid JSON
array e.g. " +
+ "[{\"realm\": \"my-realm\", \"principal\": \"root\", \"clientId\":
\"polaris\", \"clientSecret\": \"p4ssw0rd\"}]")
+ String credentials;
+
+ @CommandLine.Option(
+ names = {"-p", "--print-credentials"},
description =
- "Root principal credentials to bootstrap. Must be of the form
'realm,clientId,clientSecret'.")
- List<String> credentials;
+ "Print root credentials to stdout")
Review Comment:
> It may not be obvious to all users that Polaris will generate client
ID/secret if they are not explicitly provided.
Oh, this is a good point. I'll add a note on this, though I'm not sure the
print-credentials flag is the right place for that.
Ultimately, I want to keep the behavior of the flags "simple", so having
print-credentials just "print credentials" with no qualifiers appeals to me.
Also, FWIW, it does not print out exactly the same clientId:clientSecret tuple
you pass in. See the note in `BootstrapCommandTest`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]