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

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

                Author: ASF GitHub Bot
            Created on: 26/Feb/19 23:05
            Start Date: 26/Feb/19 23:05
    Worklog Time Spent: 10m 
      Work Description: rlevas commented on pull request #61: KNOX-1793 - 
DefaultKeystoreService should not validate the signing key on initialization
URL: https://github.com/apache/knox/pull/61#discussion_r260528949
 
 

 ##########
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenAuthorityService.java
 ##########
 @@ -184,7 +191,7 @@ public boolean verifyToken(JWT token, RSAPublicKey 
publicKey)
     PublicKey key;
     try {
       if (publicKey == null) {
-        key = 
ks.getSigningKeystore().getCertificate(getSigningKeyAlias(signingKeyAlias)).getPublicKey();
+        key = 
ks.getSigningKeystore().getCertificate(getSigningKeyAlias(null)).getPublicKey();
 
 Review comment:
   In the original code, `signingKeyAlias` was set to 
`config.getSigningKeyAlias()`. 
   
   In the new code `getSigningKeyAlias(String signingKeystoreAlias)` is set to 
return `signingKeystoreAlias` if `signingKeystoreAlias` is not null or 
`config.getSigningKeyAlias()` if `signingKeystoreAlias` is null.  
   
   This is the same thing.  I don't particularly like the code, but I was 
trying not to change too much.  Since nothing is broken, I left it.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 204842)
    Time Spent: 40m  (was: 0.5h)

> DefaultKeystoreService should not validate the signing key on initialization
> ----------------------------------------------------------------------------
>
>                 Key: KNOX-1793
>                 URL: https://issues.apache.org/jira/browse/KNOX-1793
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.3.0
>            Reporter: Robert Levas
>            Assignee: Robert Levas
>            Priority: Major
>             Fix For: 1.3.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The {{org.apache.knox.gateway.services.security.impl.DefaultKeystoreService}} 
> implementation should not validate the _signing_ key on initialization.  This 
> should be a validation task for users of the signing key.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to