From 6651479365911d9ecb018e9d5c3495abcb65986b 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 aeaf4ff14d5..761d1b2d112 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 fc17c50a372..6741bdadc6b 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 1369f806674..a7965d79834 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