[
https://issues.apache.org/jira/browse/AMQ-9244?focusedWorklogId=866830&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-866830
]
ASF GitHub Bot logged work on AMQ-9244:
---------------------------------------
Author: ASF GitHub Bot
Created on: 21/Jun/23 19:25
Start Date: 21/Jun/23 19:25
Worklog Time Spent: 10m
Work Description: jbertram commented on code in PR #1035:
URL: https://github.com/apache/activemq/pull/1035#discussion_r1237582673
##########
activemq-broker/src/main/java/org/apache/activemq/security/jwt/TokenUtils.java:
##########
@@ -0,0 +1,157 @@
+/**
+ * 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.activemq.security.jwt;
+
+import com.nimbusds.jose.JOSEObjectType;
+import com.nimbusds.jose.JWSHeader;
+import com.nimbusds.jose.crypto.RSASSASigner;
+import com.nimbusds.jose.shaded.json.JSONObject;
+import com.nimbusds.jwt.JWTClaimsSet;
+import com.nimbusds.jwt.SignedJWT;
+
+import java.io.InputStream;
+import java.security.KeyFactory;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.Base64;
+import java.util.List;
+
+/**
+ * Utilities for generating a JWT for testing
+ */
+public class TokenUtils {
Review Comment:
Nothing from this class is used anywhere. The JavaDoc says it's used for
testing, but there are no tests. This class seems unnecessary at this point.
Issue Time Tracking
-------------------
Worklog Id: (was: 866830)
Time Spent: 1h (was: 50m)
> Add JWT authentication plugin
> -----------------------------
>
> Key: AMQ-9244
> URL: https://issues.apache.org/jira/browse/AMQ-9244
> Project: ActiveMQ
> Issue Type: Task
> Components: Security/JAAS
> Reporter: Jean-Baptiste Onofré
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 5.19.0, 5.18.2
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)