You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2021/07/20 13:27:29 UTC

[GitHub] [knox] moresandeep commented on a change in pull request #471: KNOX-2637 - Added a new Knox CLI command to generate JWK secrets

moresandeep commented on a change in pull request #471:
URL: https://github.com/apache/knox/pull/471#discussion_r673119360



##########
File path: gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java
##########
@@ -63,34 +93,15 @@
 import org.jboss.shrinkwrap.api.exporter.ExplodedExporter;
 import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
 
-import javax.net.ssl.SSLException;
-import java.io.BufferedReader;
-import java.io.Console;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintStream;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.security.KeyStoreException;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.UUID;
+import com.nimbusds.jose.JOSEException;
+import com.nimbusds.jose.JWSAlgorithm;
+import com.nimbusds.jose.jwk.OctetSequenceKey;
+import com.nimbusds.jose.jwk.gen.OctetSequenceKeyGenerator;
 
 public class KnoxCLI extends Configured implements Tool {
 
+  private static final Collection<String> SUPPORTED_JWK_ALGORITHMS = Stream

Review comment:
       Wouldn't it be better to make it Set instead of Collection. It will be easier to follow the references later on in the code and if needed Iterable can be used.




-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org