Merge "[OOM CERT-SERVICE-CLIENT] Add URI validator (RFC 3986)"
authorBogumil Zebek <bogumil.zebek@nokia.com>
Thu, 19 Nov 2020 12:36:42 +0000 (12:36 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 19 Nov 2020 12:36:42 +0000 (12:36 +0000)
22 files changed:
README.md
certService/pom.xml
certService/version.properties
certServiceClient/pom.xml
certServiceClient/src/main/java/org/onap/oom/certservice/client/configuration/factory/CsrConfigurationFactory.java
certServiceClient/src/test/java/org/onap/oom/certservice/client/configuration/factory/CsrConfigurationFactoryTest.java
certServiceClient/version.properties
certServiceK8sExternalProvider/README.md
certServiceK8sExternalProvider/deploy/_certificate_example_.yaml
certServiceK8sExternalProvider/deploy/_certificate_example_contains_not_supported_properties.yaml
certServiceK8sExternalProvider/pom.xml
certServiceK8sExternalProvider/src/cmpv2controller/logger/certificate_request_logger.go
certServiceK8sExternalProvider/src/cmpv2controller/logger/certificate_request_logger_test.go
certServiceK8sExternalProvider/src/cmpv2controller/logger/test_resource.go
certServiceK8sExternalProvider/src/cmpv2provisioner/cmpv2_provisioner.go
certServiceK8sExternalProvider/src/cmpv2provisioner/csr/csr.go
certServiceK8sExternalProvider/src/cmpv2provisioner/csr/csr_test.go
certServicePostProcessor/pom.xml
compose-resources/entityprofile_Custom_EndEntity-1356531849.xml
docs/sections/usage.rst
pom.xml
version.properties

index 04c3009..0f4531f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -7,10 +7,11 @@ More information about the project and all its functionalities you can find unde
     https://wiki.onap.org/display/DW/OOM+Certification+Service
     ``` 
   
-Project consists of three submodules:
+Project consists of four submodules:
 1. oom-certservice-api
 2. oom-certservice-client
 3. oom-certservice-post-processor
+4. oom-certservice-k8s-external-provider
 
 Detailed information about submodules can be found in ```README.md``` in their directories.
 
index 2c7b5d4..e3e9817 100644 (file)
     <parent>
         <groupId>org.onap.oom.platform.cert-service</groupId>
         <artifactId>oom-certservice</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.3.0-SNAPSHOT</version>
     </parent>
     <artifactId>oom-certservice-api</artifactId>
-    <version>2.2.0-SNAPSHOT</version>
+    <version>2.3.0-SNAPSHOT</version>
     <name>oom-certservice-api</name>
     <description>OOM Certification Service Api</description>
     <packaging>jar</packaging>
index 3ad2137..8d40756 100644 (file)
@@ -1,5 +1,5 @@
 major=2
-minor=2
+minor=3
 patch=0
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}
index 9201b81..a99732e 100644 (file)
     <parent>
         <artifactId>oom-certservice</artifactId>
         <groupId>org.onap.oom.platform.cert-service</groupId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.3.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>oom-certservice-client</artifactId>
-    <version>2.2.0-SNAPSHOT</version>
+    <version>2.3.0-SNAPSHOT</version>
     <name>oom-certservice-client</name>
     <description>OOM Certification Service Api Client</description>
     <packaging>jar</packaging>
index 3f87be5..d050a2a 100644 (file)
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
 public class CsrConfigurationFactory implements ConfigurationFactory<CsrConfiguration> {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(CsrConfigurationFactory.class);
-    private static final String SANS_DELIMITER = ":";
+    private static final String SANS_DELIMITER = ",";
 
     private final EnvsForCsr envsForCsr;
     private final ValidatorsFactory validatorsFactory;
index 238b979..cdcefe2 100644 (file)
@@ -41,8 +41,8 @@ import static org.onap.oom.certservice.client.api.ExitStatus.CSR_CONFIGURATION_E
 public class CsrConfigurationFactoryTest {
 
     private static final String COMMON_NAME_VALID = "onap.org";
-    private static final List<String> SANS_SPLITTED_VALID = List.of("test-name");
-    private static final String SANS_VALID = "test-name";
+    private static final List<String> SANS_SPLITTED_VALID = List.of("test-name", "test-name-1");
+    private static final String SANS_VALID = "test-name,test-name-1";
     private static final String COUNTRY_VALID = "US";
     private static final String LOCATION_VALID = "San-Francisco";
     private static final String ORGANIZATION_VALID = "Linux-Foundation";
index 3ad2137..8d40756 100644 (file)
@@ -1,5 +1,5 @@
 major=2
-minor=2
+minor=3
 patch=0
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}
index ee739a3..9e2daa5 100644 (file)
@@ -67,9 +67,6 @@ filtered out from the Certificate Signing Request.
    - streetAddresses
    - postalCodes
  - isCa
- - ipAddresses
- - uris
- - emails
  - duration
  - usages
  
index e19e635..e522690 100644 (file)
@@ -43,10 +43,16 @@ spec:
       - California
     organizationalUnits:
       - ONAP
-  # DNS SAN
+  # SANs
   dnsNames:
     - localhost
     - certissuer.onap.org
+  ipAddresses:
+    - "127.0.0.1"
+  uris:
+    - onap://cluster.local/
+  emailAddresses:
+    - onap@onap.org
   # The reference to the CMPv2 issuer
   issuerRef:
     group: certmanager.onap.org
index 3706843..aa33e98 100644 (file)
@@ -47,15 +47,15 @@ spec:
     postalCodes:  #***NOT SUPPORTED BY CERT SERVICE API***
       - 12-345
     serialNumber: "12345"  #***NOT SUPPORTED BY CERT SERVICE API***
-  # DNS SAN
+  # SANs
   dnsNames:
     - localhost
     - certissuer.onap.org
-  ipAddresses:  #***NOT SUPPORTED BY CERT SERVICE API***
+  ipAddresses:
     - "127.0.0.1"
-  uris:  #***NOT SUPPORTED BY CERT SERVICE API***
+  uris:
     - onap://cluster.local/
-  emailAddresses:  #***NOT SUPPORTED BY CERT SERVICE API***
+  emailAddresses:
     - onap@onap.org
   duration: 24h  #***OVERRIDDEN BY CMPV2 SERVER***
   renewBefore: 8h
index a34ffc3..22c4757 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <artifactId>oom-certservice</artifactId>
     <groupId>org.onap.oom.platform.cert-service</groupId>
-    <version>2.2.0-SNAPSHOT</version>
+    <version>2.3.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
   <properties>
     <version.mvn-clean-plugin>3.1.0</version.mvn-clean-plugin>
     <version.mvn-golang-wrapper-plugin>2.3.5</version.mvn-golang-wrapper-plugin>
+    <sonar.go.coverage.reportPaths>bin/coverage.out</sonar.go.coverage.reportPaths>
+    <sonar.exclusions>**/*_test.go, **/testdata/*</sonar.exclusions>
+    <sonar-go-plugin.version>1.1.1.2000</sonar-go-plugin.version>
   </properties>
 
+
+  <dependencies>
+    <dependency>
+      <groupId>org.sonarsource.go</groupId>
+      <artifactId>sonar-go-plugin</artifactId>
+      <version>${sonar-go-plugin.version}</version>
+    </dependency>
+  </dependencies>
+
   <build>
     <!--Changing standard Maven project source structure to make it Go compatible-->
     <sourceDirectory>${basedir}</sourceDirectory>
         <version>${version.mvn-golang-wrapper-plugin}</version>
         <extensions>true</extensions>
         <executions>
+          <execution>
+            <id>coverage</id>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <testFlags>
+                <flag>-coverprofile=bin/coverage.out</flag>
+              </testFlags>
+            </configuration>
+          </execution>
           <execution>
             <id>install</id>
             <goals>
index 649ce47..5eeaf2e 100644 (file)
@@ -50,6 +50,9 @@ func logSupportedProperties(log leveledlogger.Logger, csr *x509.CertificateReque
        logSupportedMultiValueProperty(log, csr.Subject.Province, "state")
        logSupportedMultiValueProperty(log, csr.Subject.Locality, "location")
        logSupportedMultiValueProperty(log, csr.DNSNames, "dns names")
+       logSupportedMultiValueProperty(log, csr.EmailAddresses, "email addresses")
+       logSupportedMultiValueProperty(log, mapIpAddressesToText(csr.IPAddresses), "ipAddresses")
+       logSupportedMultiValueProperty(log, mapUrisToText(csr.URIs), "uris")
 }
 
 func logSupportedMultiValueProperty(log leveledlogger.Logger, values []string, propertyName string) {
@@ -80,21 +83,6 @@ func extractUsages(usages []cmapi.KeyUsage) string {
 }
 
 func logPropertiesNotSupportedByCertService(log leveledlogger.Logger, request *cmapi.CertificateRequest, csr *x509.CertificateRequest) {
-
-       //IP addresses in SANs
-       if len(csr.IPAddresses) > 0 {
-               log.Warning(getNotSupportedMessage("ipAddresses", extractIPAddresses(csr.IPAddresses)))
-       }
-       //URIs in SANs
-       if len(csr.URIs) > 0 {
-               log.Warning(getNotSupportedMessage("uris", extractURIs(csr.URIs)))
-       }
-
-       //Email addresses in SANs
-       if len(csr.EmailAddresses) > 0 {
-               log.Warning(getNotSupportedMessage("emailAddresses", extractStringArray(csr.EmailAddresses)))
-       }
-
        if request.Spec.IsCA == true {
                log.Warning(getNotSupportedMessage("isCA", strconv.FormatBool(request.Spec.IsCA)))
        }
@@ -121,20 +109,20 @@ func extractStringArray(strArray []string) string {
        return values
 }
 
-func extractURIs(URIs []*url.URL) string {
-       values := ""
-       for _, uri := range URIs {
-               values = values + uri.String() + ", "
+func mapUrisToText(uris []*url.URL) []string {
+       urisAsText := make([]string, len(uris))
+       for i, ipAddress := range uris {
+               urisAsText[i] = ipAddress.String()
        }
-       return values
+       return urisAsText
 }
 
-func extractIPAddresses(addresses []net.IP) string {
-       values := ""
-       for _, ipAddress := range addresses {
-               values = values + ipAddress.String() + ", "
+func mapIpAddressesToText(addresses []net.IP) []string {
+       ipsAsText := make([]string, len(addresses))
+       for i, ipAddress := range addresses {
+               ipsAsText[i] = ipAddress.String()
        }
-       return values
+       return ipsAsText
 }
 
 func getSupportedMessage(property string, value string) string {
index 250fab8..0b50980 100644 (file)
@@ -40,7 +40,6 @@ import (
 var unsupportedProperties = []string{
        "* property 'duration'",
        "* property 'usages'",
-       "- property 'ipAddresses'",
        "- property 'isCA'",
        "- property 'subject.streetAddress'",
        "- property 'subject.postalCodes'",
@@ -53,7 +52,11 @@ var supportedProperties = []string{
        "+ property 'country'",
        "+ property 'state'",
        "+ property 'location'",
-       "+ property 'dns names'"}
+       "+ property 'dns names'",
+       "+ property 'ipAddresses'",
+       "+ property 'uris'",
+       "+ property 'email addresses'",
+       }
 
 const RESULT_LOG = "testdata/test_result.log"
 
index c0f6f95..dcb255e 100644 (file)
 package logger
 
 const csrWithoutSkippedProperties = (`-----BEGIN CERTIFICATE REQUEST-----
-MIIDETCCAfkCAQAwgYIxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9yb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esgf9YLHNlg5dOujJmEIP
+HKkks1uy5dNXMlKAZ3i1TSaVhoFap5jZiXmfKfRXb5ImL3e5146hr+1dqRnPA7rR
+4fjjz8B7HeO2TiWu2xgJnyuPHKOwalSOYhVljpEE2hjs064Vc2yovj2FcYdPbfc2
+gFQqkUSBrviuzxhK63fWtMGStv/kSc3cEylDzV45LLIUCVFKzKaqXiG8MCQjhtFI
+2ve5+9NJxPQ3SqBKUuRoTHYBC3YppY/QagepVlENeDomvku8iS2FSkkOxGspbhla
+7uR7K5JP5H9jLQbj
 -----END CERTIFICATE REQUEST-----`)
index e89eb1f..be15e83 100644 (file)
@@ -101,7 +101,7 @@ func (ca *CertServiceCA) Sign(
        if err != nil {
                return nil, nil, err
        }
-       log.Debug("Filtered out CSR PEM: ", "bytes", csrBytes)
+       log.Debug("Filtered out CSR PEM: ", "bytes", filteredCsrBytes)
 
        response, err := ca.certServiceClient.GetCertificates(filteredCsrBytes, privateKeyBytes)
        if err != nil {
index 1a86866..583d533 100644 (file)
@@ -45,6 +45,9 @@ func FilterFieldsFromCSR(csrBytes []byte, privateKeyBytes []byte) ([]byte, error
        filteredCsr, err := x509.CreateCertificateRequest(rand.Reader, &x509.CertificateRequest{
                Subject:  filteredSubject,
                DNSNames: csr.DNSNames,
+               IPAddresses: csr.IPAddresses,
+               URIs: csr.URIs,
+               EmailAddresses: csr.EmailAddresses,
        }, key)
        if err != nil {
                return nil, err
index 08fb553..ff9a799 100644 (file)
@@ -75,6 +75,9 @@ func assertNotFilteredFieldsNotChanged(t *testing.T, originalCsrBytes []byte, fi
        filteredCsr := parseCsrBytes(filteredCsrBytes)
 
        assert.Equal(t, originalCsr.DNSNames, filteredCsr.DNSNames)
+       assert.Equal(t, originalCsr.URIs, filteredCsr.URIs)
+       assert.Equal(t, originalCsr.EmailAddresses, filteredCsr.EmailAddresses)
+       assert.Equal(t, originalCsr.IPAddresses, filteredCsr.IPAddresses)
        assert.Equal(t, originalCsr.PublicKey, filteredCsr.PublicKey)
        assert.Equal(t, originalCsr.PublicKeyAlgorithm, filteredCsr.PublicKeyAlgorithm)
        assert.Equal(t, originalCsr.SignatureAlgorithm, filteredCsr.SignatureAlgorithm)
@@ -88,9 +91,6 @@ func assertNotFilteredFieldsNotChanged(t *testing.T, originalCsrBytes []byte, fi
 
 func assertFilteredFieldsEmpty(t *testing.T, csrBytes []byte) {
        csr := parseCsrBytes(csrBytes)
-       assert.Nil(t, csr.URIs)
-       assert.Nil(t, csr.EmailAddresses)
-       assert.Nil(t, csr.IPAddresses)
        assert.Nil(t, csr.Subject.PostalCode)
        assert.Equal(t, "", csr.Subject.SerialNumber)
        assert.Nil(t, csr.Subject.StreetAddress)
index 0e3e160..bd79d85 100644 (file)
@@ -5,12 +5,12 @@
     <parent>
         <artifactId>oom-certservice</artifactId>
         <groupId>org.onap.oom.platform.cert-service</groupId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.3.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>oom-certservice-post-processor</artifactId>
-    <version>2.2.0-SNAPSHOT</version>
+    <version>2.3.0-SNAPSHOT</version>
     <name>oom-certservice-post-processor</name>
     <description>An application which conducts certificate post-processing like: merging truststores, copying keystores.</description>
     <packaging>jar</packaging>
index 19d872f..ec51a80 100644 (file)
      <int>1</int>
     </void>
     <void method="add">
-     <int>0</int>
+     <int>3</int>
     </void>
     <void method="add">
      <int>3</int>
     </void>
     <void method="add">
-     <int>0</int>
+     <int>3</int>
     </void>
     <void method="add">
      <int>0</int>
     </void>
     <void method="add">
-     <int>0</int>
+     <int>3</int>
     </void>
     <void method="add">
      <int>0</int>
     <void method="add">
      <int>1802</int>
     </void>
+    <void method="add">
+     <int>1700</int>
+    </void>
+    <void method="add">
+     <int>1701</int>
+    </void>
+    <void method="add">
+     <int>1702</int>
+    </void>
+    <void method="add">
+     <int>1900</int>
+    </void>
+    <void method="add">
+     <int>1901</int>
+    </void>
+    <void method="add">
+     <int>1902</int>
+    </void>
+    <void method="add">
+     <int>2100</int>
+    </void>
+    <void method="add">
+     <int>2101</int>
+    </void>
+    <void method="add">
+     <int>2102</int>
+    </void>
    </object>
   </void>
   <void method="put">
   </void>
   <void method="put">
    <int>37</int>
-   <string>-1501801709</string>
+   <string>-29939301</string>
   </void>
   <void method="put">
    <int>20037</int>
    <int>30218</int>
    <boolean>true</boolean>
   </void>
+  <void method="put">
+   <int>17</int>
+   <string></string>
+  </void>
+  <void method="put">
+   <int>20017</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>10017</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>30017</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>117</int>
+   <string></string>
+  </void>
+  <void method="put">
+   <int>20117</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>10117</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>30117</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>217</int>
+   <string></string>
+  </void>
+  <void method="put">
+   <int>20217</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>10217</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>30217</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>19</int>
+   <string></string>
+  </void>
+  <void method="put">
+   <int>20019</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>10019</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>30019</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>119</int>
+   <string></string>
+  </void>
+  <void method="put">
+   <int>20119</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>10119</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>30119</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>219</int>
+   <string></string>
+  </void>
+  <void method="put">
+   <int>20219</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>10219</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>30219</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>21</int>
+   <string></string>
+  </void>
+  <void method="put">
+   <int>20021</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>10021</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>30021</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>121</int>
+   <string></string>
+  </void>
+  <void method="put">
+   <int>20121</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>10121</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>30121</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>221</int>
+   <string></string>
+  </void>
+  <void method="put">
+   <int>20221</int>
+   <boolean>false</boolean>
+  </void>
+  <void method="put">
+   <int>10221</int>
+   <boolean>true</boolean>
+  </void>
+  <void method="put">
+   <int>30221</int>
+   <boolean>true</boolean>
+  </void>
  </object>
 </java>
index e4a7544..4857099 100644 (file)
@@ -31,7 +31,7 @@ CertService client needs the following configuration parameters to work properly
   - LOCATION *(optional)* - Location for which certificate from CMPv2 server should be issued
   - STATE *(required)* - State for which certificate from CMPv2 server should be issued
   - COUNTRY *(required)* - Country for which certificate from CMPv2 server should be issued
-  - SANS *(optional)(SANS's should be separated by a colon e.g. test.onap.org:onap.com)* - Subject Alternative Names (SANs) for which certificate from CMPv2 server should be issued.
+  - SANS *(optional)(SANS's should be separated by a comma e.g. test.onap.org,onap.com)* - Subject Alternative Names (SANs) for which certificate from CMPv2 server should be issued.
 
 3. Parameters to establish secure communication to CertService:
 
@@ -71,7 +71,7 @@ To run CertService client as standalone docker container execute following steps
   LOCATION=San-Francisco
   STATE=California
   COUNTRY=US
-  SANS=test.onap.org:onap.com
+  SANS=test.onap.org,onap.com
 
   #TLS config envs
   KEYSTORE_PATH=/etc/onap/oom/certservice/certs/certServiceClient-keystore.jks
diff --git a/pom.xml b/pom.xml
index 179b771..69b9e68 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     </parent>
     <groupId>org.onap.oom.platform.cert-service</groupId>
     <artifactId>oom-certservice</artifactId>
-    <version>2.2.0-SNAPSHOT</version>
+    <version>2.3.0-SNAPSHOT</version>
     <name>oom-certservice</name>
     <description>OOM Certification Service</description>
     <packaging>pom</packaging>
index 3ad2137..8d40756 100644 (file)
@@ -1,5 +1,5 @@
 major=2
-minor=2
+minor=3
 patch=0
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}