From 916c75c2b4c0e39e01c7d30f213b18722306e858 Mon Sep 17 00:00:00 2001 From: Marco Fargetta Date: Tue, 27 Aug 2024 15:53:52 +0200 Subject: [PATCH] Move to v2 APIs --- .github/workflows/kra-oaep-test.yml | 6 +++--- .github/workflows/kra-standalone-test.yml | 2 +- .github/workflows/ocsp-standalone-test.yml | 2 +- base/tomcat-9.0/conf/Catalina/localhost/rewrite.config | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/kra-oaep-test.yml b/.github/workflows/kra-oaep-test.yml index 25662d39eaf..d1e334b5626 100644 --- a/.github/workflows/kra-oaep-test.yml +++ b/.github/workflows/kra-oaep-test.yml @@ -111,13 +111,13 @@ jobs: - name: Verify CAInfo run: | docker exec pki curl -k https://pki.example.com:8443/ca/v2/info | python -m json.tool > info - echo -n '{"ArchivalMechanism":"keywrap","EncryptionAlgorithm":"AES/CBC/PKCS5Padding","KeyWrapAlgorithm":"AES KeyWrap/Padding","RsaPublicKeyWrapAlgorithm":"RSA_OAEP","CaRsaPublicKeyWrapAlgorithm":"RSA_OAEP","Attributes":{"Attribute":[]}}' | python -m json.tool > expectedInfo + echo -n '{"ArchivalMechanism":"keywrap","EncryptionAlgorithm":"AES/CBC/PKCS5Padding","KeyWrapAlgorithm":"AES KeyWrap/Padding","RsaPublicKeyWrapAlgorithm":"RSA_OAEP","CaRsaPublicKeyWrapAlgorithm":"RSA_OAEP","Attributes":{"Attribute":[]}}' | python -m json.tool > expectedInfo diff expectedInfo info - name: Verify KRAInfo run: | - docker exec pki curl -k https://pki.example.com:8443/kra/rest/info > info - echo -n '{"ArchivalMechanism":"keywrap","RecoveryMechanism":"keywrap","EncryptionAlgorithm":"AES/CBC/PKCS5Padding","WrapAlgorithm":"AES KeyWrap/Padding","RsaPublicKeyWrapAlgorithm":"RSA_OAEP","Attributes":{"Attribute":[]}}' > expectedInfo + docker exec pki curl -k https://pki.example.com:8443/kra/rest/info | python -m json.tool > info + echo -n '{"ArchivalMechanism":"keywrap","RecoveryMechanism":"keywrap","EncryptionAlgorithm":"AES/CBC/PKCS5Padding","WrapAlgorithm":"AES KeyWrap/Padding","RsaPublicKeyWrapAlgorithm":"RSA_OAEP","Attributes":{"Attribute":[]}}' | python -m json.tool > expectedInfo diff expectedInfo info - name: Run PKI healthcheck diff --git a/.github/workflows/kra-standalone-test.yml b/.github/workflows/kra-standalone-test.yml index 4a58252dfb8..aafe78a4626 100644 --- a/.github/workflows/kra-standalone-test.yml +++ b/.github/workflows/kra-standalone-test.yml @@ -75,7 +75,7 @@ jobs: > >(tee stdout) 2> >(tee stderr >&2) || true # REST API should not return security domain info - echo "PKIException: Not Found" > expected + echo "ResourceNotFoundException: Security domain not available" > expected diff expected stderr - name: Check CA admin diff --git a/.github/workflows/ocsp-standalone-test.yml b/.github/workflows/ocsp-standalone-test.yml index 1f04271941e..e0ee4d5afe0 100644 --- a/.github/workflows/ocsp-standalone-test.yml +++ b/.github/workflows/ocsp-standalone-test.yml @@ -76,7 +76,7 @@ jobs: > >(tee stdout) 2> >(tee stderr >&2) || true # REST API should not return security domain info - echo "PKIException: Not Found" > expected + echo "ResourceNotFoundException: Security domain not available" > expected diff expected stderr - name: Check CA admin diff --git a/base/tomcat-9.0/conf/Catalina/localhost/rewrite.config b/base/tomcat-9.0/conf/Catalina/localhost/rewrite.config index 3d050acff56..56806628f8b 100644 --- a/base/tomcat-9.0/conf/Catalina/localhost/rewrite.config +++ b/base/tomcat-9.0/conf/Catalina/localhost/rewrite.config @@ -18,4 +18,4 @@ RewriteRule ^/acme/revoke-cert$ /acme/v1/revoke-cert RewriteRule ^/.well-known/est/(.*)$ /est/v1/$1 # REST APIs -RewriteRule ^/(pki|ca|tps|tks|ocsp|kra)/rest/(.*)$ /$1/v1/$2 +RewriteRule ^/(pki|ca|tps|tks|ocsp|kra)/rest/(.*)$ /$1/v2/$2