[ 
https://issues.apache.org/jira/browse/KNOX-3112?focusedWorklogId=963952&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-963952
 ]

ASF GitHub Bot logged work on KNOX-3112:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Mar/25 03:05
            Start Date: 31/Mar/25 03:05
    Worklog Time Spent: 10m 
      Work Description: Copilot commented on code in PR #1011:
URL: https://github.com/apache/knox/pull/1011#discussion_r2020363304


##########
gateway-service-knoxtoken/src/main/java/org/apache/knox/gateway/service/knoxtoken/deploy/ClientCredentialsServiceDeploymentContributor.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * 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.knox.gateway.service.knoxtoken.deploy;
+
+import org.apache.knox.gateway.jersey.JerseyServiceDeploymentContributorBase;
+
+public class ClientCredentialsServiceDeploymentContributor extends 
JerseyServiceDeploymentContributorBase {
+
+    public static final String ROLE = "CLIENTID";
+
+    @Override
+    public String getRole() {
+        return ROLE;
+    }
+
+    @Override
+    public String getName() {
+        return "ClientCredentialsService";
+    }
+
+    @Override
+    protected String[] getPackages() {
+      return new String[]{ "org.apache.knox.gateway.service.knoxtoken" };
+    }
+
+    @Override
+    protected String[] getPatterns() {
+       return new String[]{ "clientid/api/**?**" };

Review Comment:
   The URL pattern 'clientid/api/**?**' appears to be incorrectly defined. 
Consider revising it to a more conventional pattern such as 'clientid/api/**' 
to ensure proper endpoint matching.
   ```suggestion
          return new String[]{ "clientid/api/**" };
   ```





Issue Time Tracking
-------------------

    Worklog Id:     (was: 963952)
    Time Spent: 20m  (was: 10m)

> Add a specialized use API for CLIENT_ID and SECRET based on KNOXTOKEN API
> -------------------------------------------------------------------------
>
>                 Key: KNOX-3112
>                 URL: https://issues.apache.org/jira/browse/KNOX-3112
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Server
>            Reporter: Larry McCay
>            Assignee: Larry McCay
>            Priority: Major
>             Fix For: 2.2.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Given the ability to support the OAuth client credentials flow with a 
> specialized use of the tokenid and passcode token from the KNOXTOKEN API, we 
> should add a corresponding API for acquiring the CLIENT_ID and CLIENT_SECRET 
> without requiring consumers to understand this specialized use. We will 
> codify the conventions being used for that into the new API extension of 
> KNOXTOKEN which will make CLIENTID's first class concepts rather than an 
> interpretation of KNOXTOKEN API responses.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to