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

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

                Author: ASF GitHub Bot
            Created on: 10/Jul/24 11:03
            Start Date: 10/Jul/24 11:03
    Worklog Time Spent: 10m 
      Work Description: moresandeep commented on code in PR #924:
URL: https://github.com/apache/knox/pull/924#discussion_r1672073246


##########
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenAuthorityService.java:
##########
@@ -83,6 +84,8 @@ public class DefaultTokenAuthorityService implements 
JWTokenAuthority, Service {
   // https://tools.ietf.org/html/rfc7518
   private static final Set<String> SUPPORTED_PKI_SIG_ALGS = new 
HashSet<>(Arrays.asList("RS256", "RS384", "RS512", "PS256", "PS384", "PS512"));
   private static final Set<String> SUPPORTED_HMAC_SIG_ALGS = new 
HashSet<>(Arrays.asList("HS256", "HS384", "HS512"));
+  /* cache JWKS endpoint for 2 hrs in case of outage */
+  private static final long OUTAGE_TTL = 2*60*60*1000;

Review Comment:
   This is a service so the configurations are gateway level. I will add it at 
gateway level in case one wants to configure it.





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

    Worklog Id:     (was: 925243)
    Time Spent: 1h 50m  (was: 1h 40m)

> Support multiple ways to verify JWT tokens
> ------------------------------------------
>
>                 Key: KNOX-3040
>                 URL: https://issues.apache.org/jira/browse/KNOX-3040
>             Project: Apache Knox
>          Issue Type: Bug
>            Reporter: Sandeep More
>            Assignee: Sandeep More
>            Priority: Major
>             Fix For: 2.1.0
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Currently we can only have one way to validate JWT token either 
> # Using JWKS endpoint 
> # Using PEM
> # Using the signing-key
> We should be able to support multiple verifications together. 
> This is an example configuration
> {code:java}
> <provider>
>             <role>federation</role>
>             <name>JWTProvider</name>
>             <enabled>true</enabled>
>             <param>
>                 <name>knox.token.use.cookie</name>
>                 <value>true</value>
>             </param>
>                       
>             <param>
>                 <name>knox.token.jwks.url</name>
>                 <value>https://my.idp.com/oauth/.wellknown</value>
>             </param>
>             <param>
>                 <name>knox.token.verification.pem</name>
>                 
> <value>MIIDaDCCAlCgAwIBAgIJAKFjn6W+gdAXMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNVBAYTAlVTMQ0wC...</value>
>             </param>
>             <param>
>                 <name>jwt.expected.issuer</name>
>                 <value>https://my.idp.com/</value>
>             </param>
>             <param>
>                 <name>knox.token.use.cookie</name>
>                 <value>true</value>
>             </param>
>         </provider>
> {code}



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

Reply via email to