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

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

                Author: ASF GitHub Bot
            Created on: 16/Jul/19 11:31
            Start Date: 16/Jul/19 11:31
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on pull request #115: KNOX-1922 - 
Processing a DNSName only if the hostname starts with a letter
URL: https://github.com/apache/knox/pull/115
 
 
   ## What changes were proposed in this pull request?
   
   Checking if hostname starts with a letter before generating a `DNSName` with 
it.
   
   ## How was this patch tested?
   
   Running JUnit test with Oracle JDK u151 (I was able to reproduce this issue 
with that JDK):
   ```
   $ export 
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre/
   
   $ java -version
   java version "1.8.0_151"
   Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
   Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
   
   $ mvn clean -T1C verify -Prelease,package
   ...
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time: 27:04 min (Wall Clock)
   [INFO] Finished at: 2019-07-16T11:08:16+02:00
   [INFO] Final Memory: 380M/2163M
   [INFO] 
------------------------------------------------------------------------
   ```
   Started the Knox Gateway using the same JDK (u151); previously it did not 
start due to the `DNSName components must begin with a letter` issue):
   ```
   $ export 
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre/
   
   $ bin/gateway.sh start
   Starting Gateway succeeded with PID 13456.
   
   ps -ef | grep gateway
     502 13456     1   0  1:05PM ttys001    0:16.58 
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre//bin/java 
-Djava.library.path=/Users/smolnar/test/knoxGateway/ext/native    -jar 
/Users/smolnar/test/knoxGateway/bin/gateway.jar
   ```
   I was able to login to admin UI and edit the sandbox topology.
   ```
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


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

            Worklog Id:     (was: 277432)
            Time Spent: 10m
    Remaining Estimate: 0h

> Fix DNSName error in org.apache.knox.gateway.util.X509CertificateUtil
> ---------------------------------------------------------------------
>
>                 Key: KNOX-1922
>                 URL: https://issues.apache.org/jira/browse/KNOX-1922
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: KnoxCLI, Server
>    Affects Versions: 1.3.0
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Blocker
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> As part of KNOX-1912, there has been some modification that added DNSName 
> values for localhost even if the hostname evaluated to 127.0.0.1. However, 
> due to [RFC-1034,|https://www.ietf.org/rfc/rfc1034.txt] this is not allowed. 
> On the other hand, newer RFCs (e.g. RFC 2181, RFC 1123) are relaxing these 
> restrictions. Oracle claimed they fixed it in JDK 8 u212 
> ([https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8213952]) but it does 
> not seem to be the case.
>  As a result, neither the build finishes successfully nor the gateway starts 
> as expected due to the same DNSName issue ({{IOException: DNSName components 
> must begin with a letter}}).
> Recommended solution: only add the evaluated localhost address if it starts 
> with a letter.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to