summaryrefslogtreecommitdiffstats
path: root/sms-service
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2018-04-26 17:31:07 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2018-04-26 17:31:12 -0700
commit56a620d02f2b39ce64d07007902b53544d235a59 (patch)
tree62c162f0d19314c61274fe0d709320aaefcffa55 /sms-service
parent30dae56d353d324e97e13a47891c30f384a66be9 (diff)
Adding cert files to support https
Adding cert files generated by AAF CA Incorporating them into the docker build as well Issue-ID: AAF-265 Change-Id: I1ee1e031bf058a0325fe2c6fe8eed5e3948d70e7 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'sms-service')
-rwxr-xr-xsms-service/bin/build_quorum_image.sh10
-rwxr-xr-xsms-service/bin/build_sms_image.sh12
-rw-r--r--sms-service/bin/quorumdockerfile2
-rw-r--r--sms-service/bin/smsdockerfile3
-rw-r--r--sms-service/src/quorumclient/config.json2
-rw-r--r--sms-service/src/quorumclient/quorumclient.go24
-rw-r--r--sms-service/src/sms/auth/aaf-sms.api.simpledemo.onap.org.pem59
-rw-r--r--sms-service/src/sms/auth/aaf-sms.api.simpledemo.onap.org.pr32
-rw-r--r--sms-service/src/sms/auth/aaf_root_ca.cer31
-rw-r--r--sms-service/src/sms/smsconfig.json.template6
-rw-r--r--sms-service/src/sms/test/loop_test.sh28
11 files changed, 176 insertions, 33 deletions
diff --git a/sms-service/bin/build_quorum_image.sh b/sms-service/bin/build_quorum_image.sh
index 4691067..b26accf 100755
--- a/sms-service/bin/build_quorum_image.sh
+++ b/sms-service/bin/build_quorum_image.sh
@@ -27,8 +27,13 @@ function generate_binary {
cp ../target/quorumclient .
}
-function remove_binary {
+function copy_certificates {
+ cp ../src/sms/auth/aaf_root_ca.cer .
+}
+
+function cleanup {
rm quorumclient
+ rm aaf_root_ca.cer
}
function build_image {
@@ -51,6 +56,7 @@ function push_image {
}
generate_binary
+copy_certificates
build_image
push_image
-remove_binary \ No newline at end of file
+cleanup \ No newline at end of file
diff --git a/sms-service/bin/build_sms_image.sh b/sms-service/bin/build_sms_image.sh
index a89e64e..cd3663f 100755
--- a/sms-service/bin/build_sms_image.sh
+++ b/sms-service/bin/build_sms_image.sh
@@ -27,8 +27,15 @@ function generate_binary {
cp ../target/sms .
}
-function remove_binary {
+function copy_certificates {
+ cp ../src/sms/auth/aaf-sms.api.simpledemo.onap.org.pem .
+ cp ../src/sms/auth/aaf-sms.api.simpledemo.onap.org.pr .
+}
+
+function cleanup {
rm sms
+ rm aaf-sms.api.simpledemo.onap.org.pem
+ rm af-sms.api.simpledemo.onap.org.pr
}
function build_image {
@@ -51,6 +58,7 @@ function push_image {
}
generate_binary
+copy_certificates
build_image
push_image
-remove_binary \ No newline at end of file
+cleanup \ No newline at end of file
diff --git a/sms-service/bin/quorumdockerfile b/sms-service/bin/quorumdockerfile
index fa4a159..3b787d7 100644
--- a/sms-service/bin/quorumdockerfile
+++ b/sms-service/bin/quorumdockerfile
@@ -5,7 +5,9 @@ LABEL version=2.0.0
LABEL maintainer="Girish Havaldar <hg0071052@techmahindra.com>"
RUN mkdir -p /quorumclient/auth
+ADD aaf_root_ca.cer /quorumclient/cert/aaf_root_ca.cer
ADD quorumclient /quorumclient/bin/quorumclient
RUN chmod +x /quorumclient/bin/quorumclient
+WORKDIR /quorumclient
ENTRYPOINT ["/quorumclient/bin/quorumclient"]
diff --git a/sms-service/bin/smsdockerfile b/sms-service/bin/smsdockerfile
index 629fcd5..50704b2 100644
--- a/sms-service/bin/smsdockerfile
+++ b/sms-service/bin/smsdockerfile
@@ -7,7 +7,10 @@ LABEL maintainer="vamshi krishna <vn00480215@techmahindra.com>"
EXPOSE 10443
RUN mkdir -p /sms/auth
+ADD aaf-sms.api.simpledemo.onap.org.pem /sms/cert/aaf-sms.api.simpledemo.onap.org.pem
+ADD aaf-sms.api.simpledemo.onap.org.pr /sms/cert/aaf-sms.api.simpledemo.onap.org.pr
ADD sms /sms/bin/sms
RUN chmod +x /sms/bin/sms
+WORKDIR /sms
ENTRYPOINT ["/sms/bin/sms"]
diff --git a/sms-service/src/quorumclient/config.json b/sms-service/src/quorumclient/config.json
index a096968..53cbf41 100644
--- a/sms-service/src/quorumclient/config.json
+++ b/sms-service/src/quorumclient/config.json
@@ -1,6 +1,6 @@
{
"url":"https://aaf-sms:10443",
- "cafile": "auth/selfsignedca.pem",
+ "cafile": "cert/aaf_root_ca.cer",
"clientcert":"client.cert",
"clientkey":"client.key",
"timeout":"10s"
diff --git a/sms-service/src/quorumclient/quorumclient.go b/sms-service/src/quorumclient/quorumclient.go
index 51dfc9c..9db6da8 100644
--- a/sms-service/src/quorumclient/quorumclient.go
+++ b/sms-service/src/quorumclient/quorumclient.go
@@ -64,14 +64,14 @@ func loadPGPKeys(prKeyPath string, pbKeyPath string) (string, string, error) {
//calls necessary initialization endpoints on the
//SMS webservice
func main() {
- folderName := os.Getenv("HOSTNAME")
+ folderName := filepath.Join("auth", os.Getenv("HOSTNAME"))
//Make sure to create the folder. It is not guaranteed to exist
os.MkdirAll(folderName, 0700)
- idFilePath := filepath.Join("auth", folderName, "id")
- pbKeyPath := filepath.Join("auth", folderName, "pbkey")
- prKeyPath := filepath.Join("auth", folderName, "prkey")
- shardPath := filepath.Join("auth", folderName, "shard")
+ idFilePath := filepath.Join(folderName, "id")
+ pbKeyPath := filepath.Join(folderName, "pbkey")
+ prKeyPath := filepath.Join(folderName, "prkey")
+ shardPath := filepath.Join(folderName, "shard")
smslogger.Init("quorum.log")
smslogger.WriteInfo("Starting Log for Quorum Client")
@@ -138,11 +138,14 @@ func main() {
caCertPool := x509.NewCertPool()
caCertPool.AppendCertsFromPEM(caCert)
- // Load the client certificate files
- //cert, err := tls.LoadX509KeyPair(cfg.ClientCert, cfg.ClientKey)
- //if err != nil {
- // log.Fatalf("Error while loading key pair %v ", err)
- //}
+ /*
+ Support Client certificates once we have auto generated certs
+ Load the client certificate files
+ cert, err := tls.LoadX509KeyPair(cfg.ClientCert, cfg.ClientKey)
+ if err != nil {
+ log.Fatalf("Error while loading key pair %v ", err)
+ }
+ */
transport.TLSClientConfig = &tls.Config{
MinVersion: tls.VersionTLS12,
@@ -171,7 +174,6 @@ func main() {
Seal bool `json:"sealstatus"`
}
err = json.NewDecoder(response.Body).Decode(&data)
-
sealed := data.Seal
// Unseal the vault if sealed
diff --git a/sms-service/src/sms/auth/aaf-sms.api.simpledemo.onap.org.pem b/sms-service/src/sms/auth/aaf-sms.api.simpledemo.onap.org.pem
new file mode 100644
index 0000000..a8ae076
--- /dev/null
+++ b/sms-service/src/sms/auth/aaf-sms.api.simpledemo.onap.org.pem
@@ -0,0 +1,59 @@
+Bag Attributes
+ localKeyID: F5 51 07 8F 6A B5 88 A5 C1 63 25 5E B8 0B 85 EB 6C BD 36 08
+ friendlyName: aaf-sms@aaf-sms.onap.org
+subject=/C=US/O=ONAP/OU=aaf-sms@aaf-sms.onap.org/OU=OSAAF/CN=aaf-sms.api.simpledemo.onap.org
+issuer=/C=US/O=ONAP/OU=OSAAF/CN=intermediateCA_1
+-----BEGIN CERTIFICATE-----
+MIIENjCCAx6gAwIBAgIBHDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQGEwJVUzEN
+MAsGA1UECgwET05BUDEOMAwGA1UECwwFT1NBQUYxGTAXBgNVBAMMEGludGVybWVk
+aWF0ZUNBXzEwHhcNMTgwNDI1MTEwOTI1WhcNMTkwNDIwMTEwOTI1WjB5MQswCQYD
+VQQGEwJVUzENMAsGA1UECgwET05BUDEhMB8GA1UECwwYYWFmLXNtc0BhYWYtc21z
+Lm9uYXAub3JnMQ4wDAYDVQQLDAVPU0FBRjEoMCYGA1UEAwwfYWFmLXNtcy5hcGku
+c2ltcGxlZGVtby5vbmFwLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBALA5rFblvq/bhtiP7n9SWzG+hmvoVD3zLyMpn2LrWhGvUBBZNU1RL7tPAU++
+HQpuf7klmrBAIAVZniKCGKHctOwXv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p8f49HX1UzwFoeEg
+RnVwNqgDWT66yGV6mbNl6FpE/U81RpCRY1ZJDeVTxbqIaG/UPV4hpQ+BEVBDF+cb
+rGsvsNYYpWx5srIQ7WtGKIlaDFbfWPwnHDHegzr8ypAS3KNWULE+QXCbHWtB+b0Y
+WhP/2F6Jjb+ByvJqQoE+nHEYBeUOZUUZC4IuQFNJ5Wy5P0CNXdheiWhdrBmG02Gy
+KMi0FJx6BEoWM2xcdl6bn5j9mhF4TX7zgepNWlgTra4Z8Oz8iqbQk33/s2OKM4ic
+6ZezUYhNp+MuUt4Se+ufNcGV65jnUKeROtWzNLwP+xwglEFlG8aNiAORthd7QJuT
+Ey2cX7H7f38ENQ5YCriUk1nVLO9F66l/rNRzYZgQzRI3IvDW8vyM2TLW2mcZNsaf
+qjFMcCDweV2FRb8eTbmWzzB2/xTVpGzVJqzwgE+U7UtJx5CZS3wPkvXuEgvcg1tY
+m1r4NGYFvLM=
+-----END CERTIFICATE----- \ No newline at end of file
diff --git a/sms-service/src/sms/auth/aaf-sms.api.simpledemo.onap.org.pr b/sms-service/src/sms/auth/aaf-sms.api.simpledemo.onap.org.pr
new file mode 100644
index 0000000..e2204ae
--- /dev/null
+++ b/sms-service/src/sms/auth/aaf-sms.api.simpledemo.onap.org.pr
@@ -0,0 +1,32 @@
+Bag Attributes
+ localKeyID: F5 51 07 8F 6A B5 88 A5 C1 63 25 5E B8 0B 85 EB 6C BD 36 08
+ friendlyName: aaf-sms@aaf-sms.onap.org
+Key Attributes: <No Attributes>
+-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCwOaxW5b6v24bY
+j+5/UlsxvoZr6FQ98y8jKZ9i61oRr1AQWTVNUS+7TwFPvh0Kbn+5JZqwQCAFWZ4i
+ghih3LTsF78vhpm3zgmYUiwkd9b5ofJUuiZntE4oCm+rC7atcmoRzWlnVl7/EX4i
+dlmrrAr/B1LhkjlqY/1pbZ6OG73LWf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/hAoGBAKuA
+6lBFbcKxUHcB1DGOxJaUaiiKfKcFcqKjYxg8K9zPy5KN0nQN0OwZ68/KI2DalmpQ
+W/NE0Y2JA6pkna7KlSCQJW+6O4SudIbN5Lj/BFnOyHe1QI71XruYRE/DsAvcJ+zl
+ir6+Pok+U9Ydm8i9XCCjkcJWVzJ/khGLa2u78QFpAoGAKwlTP1rQGLMz0uUW8bx9
+EAHUf0IkXgs+qVCvg6gWE96q7l+UncLf4842Rl77uZfJr76yBhwo3ezCA+DQDqmg
+JhktLPnaeHJcuTiYI/bXXlNCf56SsY88TxP1UGkbSmYryLAO/fM9nAHH7qj7DWqW
+Ng8ecGGlcYcjmKxtWYolR+U=
+-----END PRIVATE KEY----- \ No newline at end of file
diff --git a/sms-service/src/sms/auth/aaf_root_ca.cer b/sms-service/src/sms/auth/aaf_root_ca.cer
new file mode 100644
index 0000000..e9a50d7
--- /dev/null
+++ b/sms-service/src/sms/auth/aaf_root_ca.cer
@@ -0,0 +1,31 @@
+-----BEGIN CERTIFICATE-----
+MIIFPjCCAyagAwIBAgIJAJ6u7cCnzrWdMA0GCSqGSIb3DQEBCwUAMCwxDjAMBgNV
+BAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVUzAeFw0xODA0MDUx
+NDE1MjhaFw0zODAzMzExNDE1MjhaMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQK
+DARPTkFQMQswCQYDVQQGEwJVUzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
+ggIBAMA5pkgRs7NhGG4ew5JouhyYakgYUyFaG121+/h8qbSdt0hVQv56+EA41Yq7
+XGie7RYDQK9NmAFF3gruE+6X7wvJiChp+Cyd7sFMnb65uWhxEdxWTM2BJFrgfzUn
+H8ZCxgaCo3XH4PzlKRy2LQQJEJECwl/RZmRCXijMt5e9h8XoZY/fKkKcZZUsWNCM
+pTo266wjvA9MXLmdgReRj0+vrCjrNqy+htwJDztoiHWiYPqT6o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+CyjzKN1u0JKm/2x/ORqxkTONG8p3uDwoIOyimUcTtTMv42bfYD88RKakqSFXE9G+
+Z0LlaKABqfjK49o/tsAp+c5LoNlYllKhnetO3QAdraHwdmC36BhoghzR1jpX751A
+cZn2VH3Q4XKyp01cJNCJIrua+A+bx6zh3RyW6zIIkbRCbET+UD+4mr8WIcSE3mtR
+ZVlnhUDO4z9//WKMVzwS9Rh8/kuszrGFI1KQozXCHLrce3YP6RYZfOed79LXaRwX
+dYY=
+-----END CERTIFICATE-----
diff --git a/sms-service/src/sms/smsconfig.json.template b/sms-service/src/sms/smsconfig.json.template
index 7eb4916..b74bdff 100644
--- a/sms-service/src/sms/smsconfig.json.template
+++ b/sms-service/src/sms/smsconfig.json.template
@@ -1,7 +1,7 @@
{
- "cafile": "auth/selfsignedca.pem",
- "servercert": "auth/server.cert",
- "serverkey": "auth/server.key",
+ "cafile": "auth/aaf_root_ca.cer",
+ "servercert": "auth/aaf-sms.api.simpledemo.onap.org.pem",
+ "serverkey": "auth/aaf-sms.api.simpledemo.onap.org.pr",
"smsdbaddress": "http://localhost:8200",
"vaulttoken": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
diff --git a/sms-service/src/sms/test/loop_test.sh b/sms-service/src/sms/test/loop_test.sh
index 0af328e..a48c9b1 100644
--- a/sms-service/src/sms/test/loop_test.sh
+++ b/sms-service/src/sms/test/loop_test.sh
@@ -3,57 +3,57 @@ RED='\033[0;31m'
NC='\033[0m'
URL=$1
PORT=$2
-for i in `seq 1 2`;
+for i in `seq 1 2`;
do
echo -e "${RED}----------------BEGIN GET STATUS----------------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X GET \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X GET \
https://${URL}:${PORT}/v1/sms/quorum/status
echo -e "${RED}----------------BEGIN CREATE SECRET DOMAIN------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X POST \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X POST \
-d @test/test_create_domain.json https://${URL}:${PORT}/v1/sms/domain
echo -e "${RED}----------------BEGIN CREATE SECRET 1-----------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X POST \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X POST \
-d @test/test_create_secret1.json https://${URL}:${PORT}/v1/sms/domain/curltestdomain/secret
echo -e "${RED}----------------BEGIN CREATE SECRET 2-----------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X POST \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X POST \
-d @test/test_create_secret2.json https://${URL}:${PORT}/v1/sms/domain/curltestdomain/secret
echo -e "${RED}----------------BEGIN CREATE SECRET 3-----------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X POST \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X POST \
-d @test/test_create_secret3.json https://${URL}:${PORT}/v1/sms/domain/curltestdomain/secret
echo -e "${RED}----------------BEGIN LIST SECRET---------------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X GET \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X GET \
https://${URL}:${PORT}/v1/sms/domain/curltestdomain/secret
echo -e "${RED}----------------BEGIN GET SECRET 1--------------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X GET \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X GET \
https://${URL}:${PORT}/v1/sms/domain/curltestdomain/secret/curltestsecret1
echo -e "${RED}----------------BEGIN GET SECRET 2--------------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X GET \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X GET \
https://${URL}:${PORT}/v1/sms/domain/curltestdomain/secret/curltestsecret2
echo -e "${RED}----------------BEGIN GET SECRET 3--------------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X GET \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X GET \
https://${URL}:${PORT}/v1/sms/domain/curltestdomain/secret/curltestsecret3
echo -e "${RED}----------------BEGIN DELETE SECRET 1-----------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X DELETE \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X DELETE \
https://${URL}:${PORT}/v1/sms/domain/curltestdomain/secret/curltestsecret1
echo -e "${RED}----------------BEGIN DELETE SECRET 2-----------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X DELETE \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X DELETE \
https://${URL}:${PORT}/v1/sms/domain/curltestdomain/secret/curltestsecret2
echo -e "${RED}----------------BEGIN DELETE SECRET 3-----------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X DELETE \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X DELETE \
https://${URL}:${PORT}/v1/sms/domain/curltestdomain/secret/curltestsecret3
echo -e "${RED}----------------BEGIN DELETE SECRET DOMAIN------${NC}"
- curl -i -w "\n" -H "Accept: application/json" --cacert auth/selfsignedca.pem -X DELETE \
+ curl -i -w "\n" -H "Accept: application/json" --cacert auth/aaf_root_ca.cer -X DELETE \
https://${URL}:${PORT}/v1/sms/domain/curltestdomain
done