-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50577/
-----------------------------------------------------------

Review request for Ambari, Dmytro Sen, Jonathan Hurley, Myroslav Papirkovskyy, 
Nate Cole, and Robert Nettleton.


Bugs: AMBARI-17908
    https://issues.apache.org/jira/browse/AMBARI-17908


Repository: ambari


Description
-------

Ensure the supplied hostname is a valid hostname when signing agent-side host 
certs via the following REST API call:

```
POST /certs/:HOSTNAME
```

This is a validity check to make sure only valid hostname are handled. 

The following industry accepted regular expression maybe use to validate 
hostnames: 
```
^(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-_]*[a-zA-Z0-9]).)*(?:[A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-_]*[A-Za-z0-9])$
```


Diffs
-----

  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 9655bf9 
  
ambari-server/src/main/java/org/apache/ambari/server/security/CertificateManager.java
 b698ef3 
  ambari-server/src/main/java/org/apache/ambari/server/utils/HostUtils.java 
PRE-CREATION 
  
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
 b5d0e02 
  
ambari-server/src/test/java/org/apache/ambari/server/security/CertificateManagerTest.java
 PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/utils/HostUtilsTest.java 
PRE-CREATION 

Diff: https://reviews.apache.org/r/50577/diff/


Testing
-------

Manually tested


# Local test results:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:26:42.515s
[INFO] Finished at: Thu Jul 28 13:22:10 EDT 2016
[INFO] Final Memory: 60M/1859M
[INFO] ------------------------------------------------------------------------

# Jenkins test results:  PENDING


Thanks,

Robert Levas

Reply via email to