From 0a59e76bf80de13bbeb98f2459f1fbf5793c2910 Mon Sep 17 00:00:00 2001 From: sgayangi Date: Tue, 11 Jun 2024 09:57:24 +0530 Subject: [PATCH 01/12] Update policies supported for APK --- .../specifications/ccAddHeader_v2.json | 35 +++++++++++++++++++ .../specifications/ccMirrorRequest_v1.json | 26 ++++++++++++++ .../specifications/ccRedirectRequest_v1.json | 34 ++++++++++++++++++ .../specifications/ccRemove_Header_v1.json | 27 ++++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 modules/distribution/resources/operation_policies/specifications/ccAddHeader_v2.json create mode 100644 modules/distribution/resources/operation_policies/specifications/ccMirrorRequest_v1.json create mode 100644 modules/distribution/resources/operation_policies/specifications/ccRedirectRequest_v1.json create mode 100644 modules/distribution/resources/operation_policies/specifications/ccRemove_Header_v1.json diff --git a/modules/distribution/resources/operation_policies/specifications/ccAddHeader_v2.json b/modules/distribution/resources/operation_policies/specifications/ccAddHeader_v2.json new file mode 100644 index 0000000000..adedd5d020 --- /dev/null +++ b/modules/distribution/resources/operation_policies/specifications/ccAddHeader_v2.json @@ -0,0 +1,35 @@ +{ + "category": "Mediation", + "version": "v2", + "displayName": "Add Header", + "name": "ccAddHeader", + "description": "This policy allows you to add a new header to the request", + "policyAttributes": [ + { + "name": "headerName", + "displayName": "Header Name", + "description": "Name of the header to be added", + "validationRegex": "^([a-zA-Z_\\:][a-zA-Z\\d_\\-\\ ]*)$", + "type": "String", + "required": true + }, + { + "name": "headerValue", + "displayName": "Header Value", + "description": "Value of the header", + "validationRegex": "^.+$", + "type": "String", + "required": true + } + ], + "applicableFlows": [ + "request", + "response" + ], + "supportedGateways": [ + "ChoreoConnect" + ], + "supportedApiTypes": [ + "HTTP" + ] +} \ No newline at end of file diff --git a/modules/distribution/resources/operation_policies/specifications/ccMirrorRequest_v1.json b/modules/distribution/resources/operation_policies/specifications/ccMirrorRequest_v1.json new file mode 100644 index 0000000000..dc8464af41 --- /dev/null +++ b/modules/distribution/resources/operation_policies/specifications/ccMirrorRequest_v1.json @@ -0,0 +1,26 @@ +{ + "category": "Mediation", + "name": "ccMirrorRequest", + "version": "v1", + "displayName": "Mirror Request", + "description": "This policy allows you to mirror a request to various URLs", + "policyAttributes": [ + { + "name": "url", + "displayName": "URL", + "description": "URL to mirror the request to", + "validationRegex": "^(([\\w+]+\\:\\/\\/)?([\\w\\d-]+\\.)*[\\w-]+([\\.\\:]\\w+)*([\\/\\?\\=\\&\\#\\.]?[\\w-]+)*\\/?)$", + "type": "String", + "required": true + } + ], + "applicableFlows": [ + "request" + ], + "supportedGateways": [ + "ChoreoConnect" + ], + "supportedApiTypes": [ + "HTTP" + ] +} \ No newline at end of file diff --git a/modules/distribution/resources/operation_policies/specifications/ccRedirectRequest_v1.json b/modules/distribution/resources/operation_policies/specifications/ccRedirectRequest_v1.json new file mode 100644 index 0000000000..cb6227aab6 --- /dev/null +++ b/modules/distribution/resources/operation_policies/specifications/ccRedirectRequest_v1.json @@ -0,0 +1,34 @@ +{ + "category": "Mediation", + "name": "ccRedirectRequest", + "version": "v1", + "displayName": "Redirect Request", + "description": "This policy allows you to redirect a request", + "policyAttributes": [ + { + "name": "url", + "displayName": "URL", + "description": "URL to redirect the request to", + "validationRegex": "^(([\\w+]+\\:\\/\\/)?([\\w\\d-]+\\.)*[\\w-]+([\\.\\:]\\w+)*([\\/\\?\\=\\&\\#\\.]?[\\w-]+)*\\/?)$", + "type": "String", + "required": true + }, + { + "name": "statusCode", + "displayName": "Status Code", + "description": "Status code to display upon redirecting the request. Must be one of: 301, 302, 303, 307 or 308", + "validationRegex": "^(301|302|303|307|308)$", + "type": "String", + "required": true + } + ], + "applicableFlows": [ + "request" + ], + "supportedGateways": [ + "ChoreoConnect" + ], + "supportedApiTypes": [ + "HTTP" + ] +} \ No newline at end of file diff --git a/modules/distribution/resources/operation_policies/specifications/ccRemove_Header_v1.json b/modules/distribution/resources/operation_policies/specifications/ccRemove_Header_v1.json new file mode 100644 index 0000000000..8573aa5e93 --- /dev/null +++ b/modules/distribution/resources/operation_policies/specifications/ccRemove_Header_v1.json @@ -0,0 +1,27 @@ +{ + "category": "Mediation", + "name": "ccRemoveHeader", + "version": "v2", + "displayName": "Remove Header", + "description": "This policy allows you to remove a header from the request", + "policyAttributes": [ + { + "name": "headerName", + "displayName": "Header Name", + "description": "Name of the header to be removed", + "validationRegex": "^([a-zA-Z_\\:][a-zA-Z\\d_\\-\\ ]*)$", + "type": "String", + "required": true + } + ], + "applicableFlows": [ + "request", + "response" + ], + "supportedGateways": [ + "ChoreoConnect" + ], + "supportedApiTypes": [ + "HTTP" + ] +} \ No newline at end of file From ae48727c36258ea44e43070d5c2fceb900374ac5 Mon Sep 17 00:00:00 2001 From: Savindu Dimal Date: Tue, 18 Jun 2024 14:32:27 +0530 Subject: [PATCH 02/12] Remove unused synapse API --- .../synapse-configs/default/api/_OpenService_.xml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 modules/distribution/product/src/main/conf/synapse-configs/default/api/_OpenService_.xml diff --git a/modules/distribution/product/src/main/conf/synapse-configs/default/api/_OpenService_.xml b/modules/distribution/product/src/main/conf/synapse-configs/default/api/_OpenService_.xml deleted file mode 100644 index 191e86bb73..0000000000 --- a/modules/distribution/product/src/main/conf/synapse-configs/default/api/_OpenService_.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file From 27e7f31f03879c4aadce7bb1965ec636c4869a6f Mon Sep 17 00:00:00 2001 From: sgayangi Date: Tue, 2 Jul 2024 09:42:45 +0530 Subject: [PATCH 03/12] Rename policies from cc to apk --- .../{ccAddHeader_v2.json => apkAddHeader_v2.json} | 2 +- ...torService_v1.json => apkCallInterceptorService_v1.json} | 2 +- .../{ccMirrorRequest_v1.json => apkMirrorRequest_v1.json} | 2 +- ...ccRedirectRequest_v1.json => apkRedirectRequest_v1.json} | 6 +++--- .../{ccRemove_Header_v1.json => apkRemove_Header_v1.json} | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename modules/distribution/resources/operation_policies/specifications/{ccAddHeader_v2.json => apkAddHeader_v2.json} (96%) rename modules/distribution/resources/operation_policies/specifications/{ccCallInterceptorService_v1.json => apkCallInterceptorService_v1.json} (96%) rename modules/distribution/resources/operation_policies/specifications/{ccMirrorRequest_v1.json => apkMirrorRequest_v1.json} (95%) rename modules/distribution/resources/operation_policies/specifications/{ccRedirectRequest_v1.json => apkRedirectRequest_v1.json} (85%) rename modules/distribution/resources/operation_policies/specifications/{ccRemove_Header_v1.json => apkRemove_Header_v1.json} (95%) diff --git a/modules/distribution/resources/operation_policies/specifications/ccAddHeader_v2.json b/modules/distribution/resources/operation_policies/specifications/apkAddHeader_v2.json similarity index 96% rename from modules/distribution/resources/operation_policies/specifications/ccAddHeader_v2.json rename to modules/distribution/resources/operation_policies/specifications/apkAddHeader_v2.json index adedd5d020..3ac81ed485 100644 --- a/modules/distribution/resources/operation_policies/specifications/ccAddHeader_v2.json +++ b/modules/distribution/resources/operation_policies/specifications/apkAddHeader_v2.json @@ -2,7 +2,7 @@ "category": "Mediation", "version": "v2", "displayName": "Add Header", - "name": "ccAddHeader", + "name": "apkAddHeader", "description": "This policy allows you to add a new header to the request", "policyAttributes": [ { diff --git a/modules/distribution/resources/operation_policies/specifications/ccCallInterceptorService_v1.json b/modules/distribution/resources/operation_policies/specifications/apkCallInterceptorService_v1.json similarity index 96% rename from modules/distribution/resources/operation_policies/specifications/ccCallInterceptorService_v1.json rename to modules/distribution/resources/operation_policies/specifications/apkCallInterceptorService_v1.json index fa72a75a6f..6ab62fe076 100644 --- a/modules/distribution/resources/operation_policies/specifications/ccCallInterceptorService_v1.json +++ b/modules/distribution/resources/operation_policies/specifications/apkCallInterceptorService_v1.json @@ -1,6 +1,6 @@ { "category": "Mediation", - "name": "ccCallInterceptorService", + "name": "apkCallInterceptorService", "version": "v1", "displayName": "Call Interceptor Service", "description": "This policy allows you to call an interceptor service for a request message", diff --git a/modules/distribution/resources/operation_policies/specifications/ccMirrorRequest_v1.json b/modules/distribution/resources/operation_policies/specifications/apkMirrorRequest_v1.json similarity index 95% rename from modules/distribution/resources/operation_policies/specifications/ccMirrorRequest_v1.json rename to modules/distribution/resources/operation_policies/specifications/apkMirrorRequest_v1.json index dc8464af41..cb3171b251 100644 --- a/modules/distribution/resources/operation_policies/specifications/ccMirrorRequest_v1.json +++ b/modules/distribution/resources/operation_policies/specifications/apkMirrorRequest_v1.json @@ -1,6 +1,6 @@ { "category": "Mediation", - "name": "ccMirrorRequest", + "name": "apkMirrorRequest", "version": "v1", "displayName": "Mirror Request", "description": "This policy allows you to mirror a request to various URLs", diff --git a/modules/distribution/resources/operation_policies/specifications/ccRedirectRequest_v1.json b/modules/distribution/resources/operation_policies/specifications/apkRedirectRequest_v1.json similarity index 85% rename from modules/distribution/resources/operation_policies/specifications/ccRedirectRequest_v1.json rename to modules/distribution/resources/operation_policies/specifications/apkRedirectRequest_v1.json index cb6227aab6..ecca51062d 100644 --- a/modules/distribution/resources/operation_policies/specifications/ccRedirectRequest_v1.json +++ b/modules/distribution/resources/operation_policies/specifications/apkRedirectRequest_v1.json @@ -1,6 +1,6 @@ { "category": "Mediation", - "name": "ccRedirectRequest", + "name": "apkRedirectRequest", "version": "v1", "displayName": "Redirect Request", "description": "This policy allows you to redirect a request", @@ -16,8 +16,8 @@ { "name": "statusCode", "displayName": "Status Code", - "description": "Status code to display upon redirecting the request. Must be one of: 301, 302, 303, 307 or 308", - "validationRegex": "^(301|302|303|307|308)$", + "description": "Status code to display upon redirecting the request. Must be either 301 or 302", + "validationRegex": "^(301|302)$", "type": "String", "required": true } diff --git a/modules/distribution/resources/operation_policies/specifications/ccRemove_Header_v1.json b/modules/distribution/resources/operation_policies/specifications/apkRemove_Header_v1.json similarity index 95% rename from modules/distribution/resources/operation_policies/specifications/ccRemove_Header_v1.json rename to modules/distribution/resources/operation_policies/specifications/apkRemove_Header_v1.json index 8573aa5e93..7f1bd8ef7a 100644 --- a/modules/distribution/resources/operation_policies/specifications/ccRemove_Header_v1.json +++ b/modules/distribution/resources/operation_policies/specifications/apkRemove_Header_v1.json @@ -1,6 +1,6 @@ { "category": "Mediation", - "name": "ccRemoveHeader", + "name": "apkRemoveHeader", "version": "v2", "displayName": "Remove Header", "description": "This policy allows you to remove a header from the request", From 5cab2f6091fd714f7428ecf0be8beef2192ec7d6 Mon Sep 17 00:00:00 2001 From: sgayangi Date: Tue, 23 Jul 2024 10:49:33 +0530 Subject: [PATCH 04/12] Add changes from code review --- .../{apkAddHeader_v2.json => apkAddHeader_v1.json} | 2 +- .../specifications/apkRedirectRequest_v1.json | 2 +- .../operation_policies/specifications/apkRemove_Header_v1.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename modules/distribution/resources/operation_policies/specifications/{apkAddHeader_v2.json => apkAddHeader_v1.json} (97%) diff --git a/modules/distribution/resources/operation_policies/specifications/apkAddHeader_v2.json b/modules/distribution/resources/operation_policies/specifications/apkAddHeader_v1.json similarity index 97% rename from modules/distribution/resources/operation_policies/specifications/apkAddHeader_v2.json rename to modules/distribution/resources/operation_policies/specifications/apkAddHeader_v1.json index 3ac81ed485..2312664d12 100644 --- a/modules/distribution/resources/operation_policies/specifications/apkAddHeader_v2.json +++ b/modules/distribution/resources/operation_policies/specifications/apkAddHeader_v1.json @@ -1,6 +1,6 @@ { "category": "Mediation", - "version": "v2", + "version": "v1", "displayName": "Add Header", "name": "apkAddHeader", "description": "This policy allows you to add a new header to the request", diff --git a/modules/distribution/resources/operation_policies/specifications/apkRedirectRequest_v1.json b/modules/distribution/resources/operation_policies/specifications/apkRedirectRequest_v1.json index ecca51062d..71cc1e991c 100644 --- a/modules/distribution/resources/operation_policies/specifications/apkRedirectRequest_v1.json +++ b/modules/distribution/resources/operation_policies/specifications/apkRedirectRequest_v1.json @@ -18,7 +18,7 @@ "displayName": "Status Code", "description": "Status code to display upon redirecting the request. Must be either 301 or 302", "validationRegex": "^(301|302)$", - "type": "String", + "type": "Integer", "required": true } ], diff --git a/modules/distribution/resources/operation_policies/specifications/apkRemove_Header_v1.json b/modules/distribution/resources/operation_policies/specifications/apkRemove_Header_v1.json index 7f1bd8ef7a..357ec8adba 100644 --- a/modules/distribution/resources/operation_policies/specifications/apkRemove_Header_v1.json +++ b/modules/distribution/resources/operation_policies/specifications/apkRemove_Header_v1.json @@ -1,7 +1,7 @@ { "category": "Mediation", "name": "apkRemoveHeader", - "version": "v2", + "version": "v1", "displayName": "Remove Header", "description": "This policy allows you to remove a header from the request", "policyAttributes": [ From a382b4910cc0c8594988c134a8106438cd4a79e3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 26 Jul 2024 02:24:25 +0000 Subject: [PATCH 05/12] [maven-release-plugin] prepare release v4.4.0-m1 --- modules/distribution/pom.xml | 2 +- modules/distribution/product/pom.xml | 2 +- modules/features/pom.xml | 2 +- .../org.wso2.am.multitenancy.dashboard.ui.feature/pom.xml | 2 +- .../features/product/org.wso2.am.security.feature/pom.xml | 2 +- modules/features/product/org.wso2.am.styles.feature/pom.xml | 2 +- .../pom.xml | 2 +- modules/features/product/pom.xml | 2 +- modules/integration/pom.xml | 2 +- modules/integration/tests-common/admin-clients/pom.xml | 2 +- .../tests-common/backend-service/jaxrs-app/pom.xml | 2 +- .../tests-common/backend-service/monitor-app/pom.xml | 2 +- modules/integration/tests-common/backend-service/pom.xml | 2 +- modules/integration/tests-common/clients/admin/pom.xml | 2 +- modules/integration/tests-common/clients/gateway/pom.xml | 2 +- .../integration/tests-common/clients/internal-api/pom.xml | 2 +- modules/integration/tests-common/clients/pom.xml | 2 +- modules/integration/tests-common/clients/publisher/pom.xml | 2 +- .../tests-common/clients/service-catalog/pom.xml | 2 +- modules/integration/tests-common/clients/store/pom.xml | 2 +- .../extenstions/org.wso2.am.thirdparty.km/pom.xml | 2 +- modules/integration/tests-common/extenstions/pom.xml | 2 +- .../integration/tests-common/framework-extensions/pom.xml | 2 +- .../tests-common/integration-test-extensions/pom.xml | 4 ++-- .../integration/tests-common/integration-test-utils/pom.xml | 2 +- modules/integration/tests-common/pom.xml | 2 +- modules/integration/tests-common/ui-pages/pom.xml | 2 +- modules/integration/tests-integration/pom.xml | 2 +- modules/integration/tests-integration/tests-backend/pom.xml | 2 +- .../integration/tests-integration/tests-benchmark/pom.xml | 4 ++-- modules/integration/tests-integration/tests-restart/pom.xml | 2 +- modules/local-authenticators/pom.xml | 2 +- modules/oauth2-grant-types/pom.xml | 2 +- modules/org.wso2.am.multitenancy.dashboard.ui/pom.xml | 2 +- modules/p2-profile/pom.xml | 2 +- modules/p2-profile/product/pom.xml | 2 +- modules/styles/pom.xml | 2 +- modules/styles/product/pom.xml | 2 +- modules/styles/service/pom.xml | 2 +- pom.xml | 6 +++--- 40 files changed, 44 insertions(+), 44 deletions(-) diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index 3c39ef6e4d..cbc8ff0e75 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../../pom.xml diff --git a/modules/distribution/product/pom.xml b/modules/distribution/product/pom.xml index c1b4fd83b2..b8dbf280fa 100644 --- a/modules/distribution/product/pom.xml +++ b/modules/distribution/product/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-distribution-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/features/pom.xml b/modules/features/pom.xml index af2091b5c8..97c13f2978 100644 --- a/modules/features/pom.xml +++ b/modules/features/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../../pom.xml diff --git a/modules/features/product/org.wso2.am.multitenancy.dashboard.ui.feature/pom.xml b/modules/features/product/org.wso2.am.multitenancy.dashboard.ui.feature/pom.xml index bae2993e0b..ebb625004a 100644 --- a/modules/features/product/org.wso2.am.multitenancy.dashboard.ui.feature/pom.xml +++ b/modules/features/product/org.wso2.am.multitenancy.dashboard.ui.feature/pom.xml @@ -3,7 +3,7 @@ am-features org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml 4.0.0 diff --git a/modules/features/product/org.wso2.am.security.feature/pom.xml b/modules/features/product/org.wso2.am.security.feature/pom.xml index 76f9c5e451..9af7b0d7dc 100644 --- a/modules/features/product/org.wso2.am.security.feature/pom.xml +++ b/modules/features/product/org.wso2.am.security.feature/pom.xml @@ -20,7 +20,7 @@ am-features org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml 4.0.0 diff --git a/modules/features/product/org.wso2.am.styles.feature/pom.xml b/modules/features/product/org.wso2.am.styles.feature/pom.xml index 2f628368bb..96034384ff 100644 --- a/modules/features/product/org.wso2.am.styles.feature/pom.xml +++ b/modules/features/product/org.wso2.am.styles.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-features - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/features/product/org.wso2.carbon.identity.local.auth.api.endpoint.feature/pom.xml b/modules/features/product/org.wso2.carbon.identity.local.auth.api.endpoint.feature/pom.xml index cce125b551..733720dc55 100644 --- a/modules/features/product/org.wso2.carbon.identity.local.auth.api.endpoint.feature/pom.xml +++ b/modules/features/product/org.wso2.carbon.identity.local.auth.api.endpoint.feature/pom.xml @@ -21,7 +21,7 @@ am-features org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml 4.0.0 diff --git a/modules/features/product/pom.xml b/modules/features/product/pom.xml index 8dbd54be16..ba65ca75e6 100644 --- a/modules/features/product/pom.xml +++ b/modules/features/product/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-features-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/pom.xml b/modules/integration/pom.xml index 3549d478cb..85c1071737 100644 --- a/modules/integration/pom.xml +++ b/modules/integration/pom.xml @@ -4,7 +4,7 @@ org.wso2.am am-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../../pom.xml diff --git a/modules/integration/tests-common/admin-clients/pom.xml b/modules/integration/tests-common/admin-clients/pom.xml index 9557a3fcda..8605ac9fda 100644 --- a/modules/integration/tests-common/admin-clients/pom.xml +++ b/modules/integration/tests-common/admin-clients/pom.xml @@ -21,7 +21,7 @@ under the License. tests-common org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/tests-common/backend-service/jaxrs-app/pom.xml b/modules/integration/tests-common/backend-service/jaxrs-app/pom.xml index 6252ef18d1..d56b7532c6 100644 --- a/modules/integration/tests-common/backend-service/jaxrs-app/pom.xml +++ b/modules/integration/tests-common/backend-service/jaxrs-app/pom.xml @@ -18,7 +18,7 @@ under the License. test-artifacts org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/tests-common/backend-service/monitor-app/pom.xml b/modules/integration/tests-common/backend-service/monitor-app/pom.xml index 19cf82600f..4efa96558f 100644 --- a/modules/integration/tests-common/backend-service/monitor-app/pom.xml +++ b/modules/integration/tests-common/backend-service/monitor-app/pom.xml @@ -18,7 +18,7 @@ under the License. test-artifacts org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/tests-common/backend-service/pom.xml b/modules/integration/tests-common/backend-service/pom.xml index b3010d8f1a..8732b9ac48 100644 --- a/modules/integration/tests-common/backend-service/pom.xml +++ b/modules/integration/tests-common/backend-service/pom.xml @@ -18,7 +18,7 @@ under the License. tests-common org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/tests-common/clients/admin/pom.xml b/modules/integration/tests-common/clients/admin/pom.xml index 6381cf095b..d370bc88b2 100644 --- a/modules/integration/tests-common/clients/admin/pom.xml +++ b/modules/integration/tests-common/clients/admin/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-SNAPSHOT + 4.4.0-m1 4.0.0 diff --git a/modules/integration/tests-common/clients/gateway/pom.xml b/modules/integration/tests-common/clients/gateway/pom.xml index 9acbd2bdf4..fd37740fda 100644 --- a/modules/integration/tests-common/clients/gateway/pom.xml +++ b/modules/integration/tests-common/clients/gateway/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-SNAPSHOT + 4.4.0-m1 4.0.0 diff --git a/modules/integration/tests-common/clients/internal-api/pom.xml b/modules/integration/tests-common/clients/internal-api/pom.xml index fe86d2755b..476115f575 100644 --- a/modules/integration/tests-common/clients/internal-api/pom.xml +++ b/modules/integration/tests-common/clients/internal-api/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-SNAPSHOT + 4.4.0-m1 4.0.0 diff --git a/modules/integration/tests-common/clients/pom.xml b/modules/integration/tests-common/clients/pom.xml index 9ebed340bb..f9fa7fd846 100644 --- a/modules/integration/tests-common/clients/pom.xml +++ b/modules/integration/tests-common/clients/pom.xml @@ -16,7 +16,7 @@ tests-common org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/tests-common/clients/publisher/pom.xml b/modules/integration/tests-common/clients/publisher/pom.xml index 7e42845d72..906b7323b3 100644 --- a/modules/integration/tests-common/clients/publisher/pom.xml +++ b/modules/integration/tests-common/clients/publisher/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-SNAPSHOT + 4.4.0-m1 4.0.0 diff --git a/modules/integration/tests-common/clients/service-catalog/pom.xml b/modules/integration/tests-common/clients/service-catalog/pom.xml index efcc283a8a..e9ff294fba 100644 --- a/modules/integration/tests-common/clients/service-catalog/pom.xml +++ b/modules/integration/tests-common/clients/service-catalog/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-SNAPSHOT + 4.4.0-m1 4.0.0 diff --git a/modules/integration/tests-common/clients/store/pom.xml b/modules/integration/tests-common/clients/store/pom.xml index ae71f4b5d6..bad910d008 100644 --- a/modules/integration/tests-common/clients/store/pom.xml +++ b/modules/integration/tests-common/clients/store/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-SNAPSHOT + 4.4.0-m1 4.0.0 diff --git a/modules/integration/tests-common/extenstions/org.wso2.am.thirdparty.km/pom.xml b/modules/integration/tests-common/extenstions/org.wso2.am.thirdparty.km/pom.xml index 7caa34f5a9..0ec43f62a5 100644 --- a/modules/integration/tests-common/extenstions/org.wso2.am.thirdparty.km/pom.xml +++ b/modules/integration/tests-common/extenstions/org.wso2.am.thirdparty.km/pom.xml @@ -3,7 +3,7 @@ org.wso2.am extenstions - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml 4.0.0 diff --git a/modules/integration/tests-common/extenstions/pom.xml b/modules/integration/tests-common/extenstions/pom.xml index fef01d2cb2..62595d2530 100644 --- a/modules/integration/tests-common/extenstions/pom.xml +++ b/modules/integration/tests-common/extenstions/pom.xml @@ -3,7 +3,7 @@ tests-common org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml 4.0.0 diff --git a/modules/integration/tests-common/framework-extensions/pom.xml b/modules/integration/tests-common/framework-extensions/pom.xml index 912f25ad0d..8232adf350 100644 --- a/modules/integration/tests-common/framework-extensions/pom.xml +++ b/modules/integration/tests-common/framework-extensions/pom.xml @@ -23,7 +23,7 @@ tests-common org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/tests-common/integration-test-extensions/pom.xml b/modules/integration/tests-common/integration-test-extensions/pom.xml index 7348c990e1..2079d7b622 100644 --- a/modules/integration/tests-common/integration-test-extensions/pom.xml +++ b/modules/integration/tests-common/integration-test-extensions/pom.xml @@ -18,7 +18,7 @@ under the License. tests-common org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml @@ -35,7 +35,7 @@ under the License. org.wso2.am org.wso2.am.framework.extensions - 4.4.0-SNAPSHOT + 4.4.0-m1 org.wso2.am diff --git a/modules/integration/tests-common/integration-test-utils/pom.xml b/modules/integration/tests-common/integration-test-utils/pom.xml index 9181fae5e2..507e9245e8 100644 --- a/modules/integration/tests-common/integration-test-utils/pom.xml +++ b/modules/integration/tests-common/integration-test-utils/pom.xml @@ -20,7 +20,7 @@ under the License. tests-common org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/tests-common/pom.xml b/modules/integration/tests-common/pom.xml index 79f3228604..06f1de9808 100644 --- a/modules/integration/tests-common/pom.xml +++ b/modules/integration/tests-common/pom.xml @@ -20,7 +20,7 @@ under the License. integration org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/tests-common/ui-pages/pom.xml b/modules/integration/tests-common/ui-pages/pom.xml index 8889d235a8..5fdc414a68 100644 --- a/modules/integration/tests-common/ui-pages/pom.xml +++ b/modules/integration/tests-common/ui-pages/pom.xml @@ -20,7 +20,7 @@ under the License. tests-common org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/tests-integration/pom.xml b/modules/integration/tests-integration/pom.xml index fc2d3c33af..ef1b9592a8 100644 --- a/modules/integration/tests-integration/pom.xml +++ b/modules/integration/tests-integration/pom.xml @@ -21,7 +21,7 @@ under the License. integration org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/tests-integration/tests-backend/pom.xml b/modules/integration/tests-integration/tests-backend/pom.xml index f57134d22b..e6eb6f4e0a 100644 --- a/modules/integration/tests-integration/tests-backend/pom.xml +++ b/modules/integration/tests-integration/tests-backend/pom.xml @@ -20,7 +20,7 @@ under the License. org.wso2.carbon.am.integration.test org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/integration/tests-integration/tests-benchmark/pom.xml b/modules/integration/tests-integration/tests-benchmark/pom.xml index e4123f0781..2d5a84ae85 100644 --- a/modules/integration/tests-integration/tests-benchmark/pom.xml +++ b/modules/integration/tests-integration/tests-benchmark/pom.xml @@ -20,7 +20,7 @@ under the License. org.wso2.carbon.am.integration.test org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml @@ -447,7 +447,7 @@ under the License. org.wso2.am org.wso2.carbon.am.integration.backend.test - 4.4.0-SNAPSHOT + 4.4.0-m1 test-jar test diff --git a/modules/integration/tests-integration/tests-restart/pom.xml b/modules/integration/tests-integration/tests-restart/pom.xml index d7d94e2b34..1a06adb869 100644 --- a/modules/integration/tests-integration/tests-restart/pom.xml +++ b/modules/integration/tests-integration/tests-restart/pom.xml @@ -20,7 +20,7 @@ under the License. org.wso2.carbon.am.integration.test org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/local-authenticators/pom.xml b/modules/local-authenticators/pom.xml index 5b155274b0..5a314389cd 100644 --- a/modules/local-authenticators/pom.xml +++ b/modules/local-authenticators/pom.xml @@ -19,7 +19,7 @@ org.wso2.am am-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../../pom.xml 4.0.0 diff --git a/modules/oauth2-grant-types/pom.xml b/modules/oauth2-grant-types/pom.xml index 42c39ee2e8..cc636cad0d 100644 --- a/modules/oauth2-grant-types/pom.xml +++ b/modules/oauth2-grant-types/pom.xml @@ -19,7 +19,7 @@ org.wso2.am am-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../../pom.xml diff --git a/modules/org.wso2.am.multitenancy.dashboard.ui/pom.xml b/modules/org.wso2.am.multitenancy.dashboard.ui/pom.xml index ada72e4328..78fffe1fe2 100644 --- a/modules/org.wso2.am.multitenancy.dashboard.ui/pom.xml +++ b/modules/org.wso2.am.multitenancy.dashboard.ui/pom.xml @@ -3,7 +3,7 @@ am-parent org.wso2.am - 4.4.0-SNAPSHOT + 4.4.0-m1 ../../pom.xml 4.0.0 diff --git a/modules/p2-profile/pom.xml b/modules/p2-profile/pom.xml index cbb4846572..9e5aed1bab 100644 --- a/modules/p2-profile/pom.xml +++ b/modules/p2-profile/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../../pom.xml diff --git a/modules/p2-profile/product/pom.xml b/modules/p2-profile/product/pom.xml index 31ec5e95a9..32ebcfc41e 100644 --- a/modules/p2-profile/product/pom.xml +++ b/modules/p2-profile/product/pom.xml @@ -20,7 +20,7 @@ org.wso2.am am-p2-profile-gen-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/styles/pom.xml b/modules/styles/pom.xml index 5e079a71c3..df58d792de 100644 --- a/modules/styles/pom.xml +++ b/modules/styles/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../../pom.xml diff --git a/modules/styles/product/pom.xml b/modules/styles/product/pom.xml index 52a46b9d2c..4a63a0e7f1 100644 --- a/modules/styles/product/pom.xml +++ b/modules/styles/product/pom.xml @@ -23,7 +23,7 @@ org.wso2.am am-styles-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/modules/styles/service/pom.xml b/modules/styles/service/pom.xml index fe05ebd98d..d353a2b341 100644 --- a/modules/styles/service/pom.xml +++ b/modules/styles/service/pom.xml @@ -20,7 +20,7 @@ org.wso2.am am-styles-parent - 4.4.0-SNAPSHOT + 4.4.0-m1 ../pom.xml diff --git a/pom.xml b/pom.xml index 9328d2fa0f..c2f55815ce 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.am am-parent pom - 4.4.0-SNAPSHOT + 4.4.0-m1 WSO2 API Manager - Aggregator Module https://wso2.com/products/api-manager WSO2 API Manager @@ -57,7 +57,7 @@ https://github.com/wso2/product-apim.git scm:git:https://github.com/wso2/product-apim.git scm:git:https://github.com/wso2/product-apim.git - HEAD + v4.4.0-m1 @@ -1302,7 +1302,7 @@ 4.9.26 - 4.4.0-SNAPSHOT + 4.4.0-m1 1.1.23 From 6c91213538696dbe7fbb66a503491dcbb33ee3cf Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 26 Jul 2024 02:24:27 +0000 Subject: [PATCH 06/12] [maven-release-plugin] prepare for next development iteration --- modules/distribution/pom.xml | 2 +- modules/distribution/product/pom.xml | 2 +- modules/features/pom.xml | 2 +- .../org.wso2.am.multitenancy.dashboard.ui.feature/pom.xml | 2 +- .../features/product/org.wso2.am.security.feature/pom.xml | 2 +- modules/features/product/org.wso2.am.styles.feature/pom.xml | 2 +- .../pom.xml | 2 +- modules/features/product/pom.xml | 2 +- modules/integration/pom.xml | 2 +- modules/integration/tests-common/admin-clients/pom.xml | 2 +- .../tests-common/backend-service/jaxrs-app/pom.xml | 2 +- .../tests-common/backend-service/monitor-app/pom.xml | 2 +- modules/integration/tests-common/backend-service/pom.xml | 2 +- modules/integration/tests-common/clients/admin/pom.xml | 2 +- modules/integration/tests-common/clients/gateway/pom.xml | 2 +- .../integration/tests-common/clients/internal-api/pom.xml | 2 +- modules/integration/tests-common/clients/pom.xml | 2 +- modules/integration/tests-common/clients/publisher/pom.xml | 2 +- .../tests-common/clients/service-catalog/pom.xml | 2 +- modules/integration/tests-common/clients/store/pom.xml | 2 +- .../extenstions/org.wso2.am.thirdparty.km/pom.xml | 2 +- modules/integration/tests-common/extenstions/pom.xml | 2 +- .../integration/tests-common/framework-extensions/pom.xml | 2 +- .../tests-common/integration-test-extensions/pom.xml | 4 ++-- .../integration/tests-common/integration-test-utils/pom.xml | 2 +- modules/integration/tests-common/pom.xml | 2 +- modules/integration/tests-common/ui-pages/pom.xml | 2 +- modules/integration/tests-integration/pom.xml | 2 +- modules/integration/tests-integration/tests-backend/pom.xml | 2 +- .../integration/tests-integration/tests-benchmark/pom.xml | 4 ++-- modules/integration/tests-integration/tests-restart/pom.xml | 2 +- modules/local-authenticators/pom.xml | 2 +- modules/oauth2-grant-types/pom.xml | 2 +- modules/org.wso2.am.multitenancy.dashboard.ui/pom.xml | 2 +- modules/p2-profile/pom.xml | 2 +- modules/p2-profile/product/pom.xml | 2 +- modules/styles/pom.xml | 2 +- modules/styles/product/pom.xml | 2 +- modules/styles/service/pom.xml | 2 +- pom.xml | 6 +++--- 40 files changed, 44 insertions(+), 44 deletions(-) diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index cbc8ff0e75..3c39ef6e4d 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../../pom.xml diff --git a/modules/distribution/product/pom.xml b/modules/distribution/product/pom.xml index b8dbf280fa..c1b4fd83b2 100644 --- a/modules/distribution/product/pom.xml +++ b/modules/distribution/product/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-distribution-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/features/pom.xml b/modules/features/pom.xml index 97c13f2978..af2091b5c8 100644 --- a/modules/features/pom.xml +++ b/modules/features/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../../pom.xml diff --git a/modules/features/product/org.wso2.am.multitenancy.dashboard.ui.feature/pom.xml b/modules/features/product/org.wso2.am.multitenancy.dashboard.ui.feature/pom.xml index ebb625004a..bae2993e0b 100644 --- a/modules/features/product/org.wso2.am.multitenancy.dashboard.ui.feature/pom.xml +++ b/modules/features/product/org.wso2.am.multitenancy.dashboard.ui.feature/pom.xml @@ -3,7 +3,7 @@ am-features org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml 4.0.0 diff --git a/modules/features/product/org.wso2.am.security.feature/pom.xml b/modules/features/product/org.wso2.am.security.feature/pom.xml index 9af7b0d7dc..76f9c5e451 100644 --- a/modules/features/product/org.wso2.am.security.feature/pom.xml +++ b/modules/features/product/org.wso2.am.security.feature/pom.xml @@ -20,7 +20,7 @@ am-features org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml 4.0.0 diff --git a/modules/features/product/org.wso2.am.styles.feature/pom.xml b/modules/features/product/org.wso2.am.styles.feature/pom.xml index 96034384ff..2f628368bb 100644 --- a/modules/features/product/org.wso2.am.styles.feature/pom.xml +++ b/modules/features/product/org.wso2.am.styles.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-features - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/features/product/org.wso2.carbon.identity.local.auth.api.endpoint.feature/pom.xml b/modules/features/product/org.wso2.carbon.identity.local.auth.api.endpoint.feature/pom.xml index 733720dc55..cce125b551 100644 --- a/modules/features/product/org.wso2.carbon.identity.local.auth.api.endpoint.feature/pom.xml +++ b/modules/features/product/org.wso2.carbon.identity.local.auth.api.endpoint.feature/pom.xml @@ -21,7 +21,7 @@ am-features org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml 4.0.0 diff --git a/modules/features/product/pom.xml b/modules/features/product/pom.xml index ba65ca75e6..8dbd54be16 100644 --- a/modules/features/product/pom.xml +++ b/modules/features/product/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-features-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/pom.xml b/modules/integration/pom.xml index 85c1071737..3549d478cb 100644 --- a/modules/integration/pom.xml +++ b/modules/integration/pom.xml @@ -4,7 +4,7 @@ org.wso2.am am-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../../pom.xml diff --git a/modules/integration/tests-common/admin-clients/pom.xml b/modules/integration/tests-common/admin-clients/pom.xml index 8605ac9fda..9557a3fcda 100644 --- a/modules/integration/tests-common/admin-clients/pom.xml +++ b/modules/integration/tests-common/admin-clients/pom.xml @@ -21,7 +21,7 @@ under the License. tests-common org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/tests-common/backend-service/jaxrs-app/pom.xml b/modules/integration/tests-common/backend-service/jaxrs-app/pom.xml index d56b7532c6..6252ef18d1 100644 --- a/modules/integration/tests-common/backend-service/jaxrs-app/pom.xml +++ b/modules/integration/tests-common/backend-service/jaxrs-app/pom.xml @@ -18,7 +18,7 @@ under the License. test-artifacts org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/tests-common/backend-service/monitor-app/pom.xml b/modules/integration/tests-common/backend-service/monitor-app/pom.xml index 4efa96558f..19cf82600f 100644 --- a/modules/integration/tests-common/backend-service/monitor-app/pom.xml +++ b/modules/integration/tests-common/backend-service/monitor-app/pom.xml @@ -18,7 +18,7 @@ under the License. test-artifacts org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/tests-common/backend-service/pom.xml b/modules/integration/tests-common/backend-service/pom.xml index 8732b9ac48..b3010d8f1a 100644 --- a/modules/integration/tests-common/backend-service/pom.xml +++ b/modules/integration/tests-common/backend-service/pom.xml @@ -18,7 +18,7 @@ under the License. tests-common org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/tests-common/clients/admin/pom.xml b/modules/integration/tests-common/clients/admin/pom.xml index d370bc88b2..6381cf095b 100644 --- a/modules/integration/tests-common/clients/admin/pom.xml +++ b/modules/integration/tests-common/clients/admin/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-m1 + 4.4.0-SNAPSHOT 4.0.0 diff --git a/modules/integration/tests-common/clients/gateway/pom.xml b/modules/integration/tests-common/clients/gateway/pom.xml index fd37740fda..9acbd2bdf4 100644 --- a/modules/integration/tests-common/clients/gateway/pom.xml +++ b/modules/integration/tests-common/clients/gateway/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-m1 + 4.4.0-SNAPSHOT 4.0.0 diff --git a/modules/integration/tests-common/clients/internal-api/pom.xml b/modules/integration/tests-common/clients/internal-api/pom.xml index 476115f575..fe86d2755b 100644 --- a/modules/integration/tests-common/clients/internal-api/pom.xml +++ b/modules/integration/tests-common/clients/internal-api/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-m1 + 4.4.0-SNAPSHOT 4.0.0 diff --git a/modules/integration/tests-common/clients/pom.xml b/modules/integration/tests-common/clients/pom.xml index f9fa7fd846..9ebed340bb 100644 --- a/modules/integration/tests-common/clients/pom.xml +++ b/modules/integration/tests-common/clients/pom.xml @@ -16,7 +16,7 @@ tests-common org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/tests-common/clients/publisher/pom.xml b/modules/integration/tests-common/clients/publisher/pom.xml index 906b7323b3..7e42845d72 100644 --- a/modules/integration/tests-common/clients/publisher/pom.xml +++ b/modules/integration/tests-common/clients/publisher/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-m1 + 4.4.0-SNAPSHOT 4.0.0 diff --git a/modules/integration/tests-common/clients/service-catalog/pom.xml b/modules/integration/tests-common/clients/service-catalog/pom.xml index e9ff294fba..efcc283a8a 100644 --- a/modules/integration/tests-common/clients/service-catalog/pom.xml +++ b/modules/integration/tests-common/clients/service-catalog/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-m1 + 4.4.0-SNAPSHOT 4.0.0 diff --git a/modules/integration/tests-common/clients/store/pom.xml b/modules/integration/tests-common/clients/store/pom.xml index bad910d008..ae71f4b5d6 100644 --- a/modules/integration/tests-common/clients/store/pom.xml +++ b/modules/integration/tests-common/clients/store/pom.xml @@ -18,7 +18,7 @@ org.wso2.am org.wso2.am.integration.clients - 4.4.0-m1 + 4.4.0-SNAPSHOT 4.0.0 diff --git a/modules/integration/tests-common/extenstions/org.wso2.am.thirdparty.km/pom.xml b/modules/integration/tests-common/extenstions/org.wso2.am.thirdparty.km/pom.xml index 0ec43f62a5..7caa34f5a9 100644 --- a/modules/integration/tests-common/extenstions/org.wso2.am.thirdparty.km/pom.xml +++ b/modules/integration/tests-common/extenstions/org.wso2.am.thirdparty.km/pom.xml @@ -3,7 +3,7 @@ org.wso2.am extenstions - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml 4.0.0 diff --git a/modules/integration/tests-common/extenstions/pom.xml b/modules/integration/tests-common/extenstions/pom.xml index 62595d2530..fef01d2cb2 100644 --- a/modules/integration/tests-common/extenstions/pom.xml +++ b/modules/integration/tests-common/extenstions/pom.xml @@ -3,7 +3,7 @@ tests-common org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml 4.0.0 diff --git a/modules/integration/tests-common/framework-extensions/pom.xml b/modules/integration/tests-common/framework-extensions/pom.xml index 8232adf350..912f25ad0d 100644 --- a/modules/integration/tests-common/framework-extensions/pom.xml +++ b/modules/integration/tests-common/framework-extensions/pom.xml @@ -23,7 +23,7 @@ tests-common org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/tests-common/integration-test-extensions/pom.xml b/modules/integration/tests-common/integration-test-extensions/pom.xml index 2079d7b622..7348c990e1 100644 --- a/modules/integration/tests-common/integration-test-extensions/pom.xml +++ b/modules/integration/tests-common/integration-test-extensions/pom.xml @@ -18,7 +18,7 @@ under the License. tests-common org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml @@ -35,7 +35,7 @@ under the License. org.wso2.am org.wso2.am.framework.extensions - 4.4.0-m1 + 4.4.0-SNAPSHOT org.wso2.am diff --git a/modules/integration/tests-common/integration-test-utils/pom.xml b/modules/integration/tests-common/integration-test-utils/pom.xml index 507e9245e8..9181fae5e2 100644 --- a/modules/integration/tests-common/integration-test-utils/pom.xml +++ b/modules/integration/tests-common/integration-test-utils/pom.xml @@ -20,7 +20,7 @@ under the License. tests-common org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/tests-common/pom.xml b/modules/integration/tests-common/pom.xml index 06f1de9808..79f3228604 100644 --- a/modules/integration/tests-common/pom.xml +++ b/modules/integration/tests-common/pom.xml @@ -20,7 +20,7 @@ under the License. integration org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/tests-common/ui-pages/pom.xml b/modules/integration/tests-common/ui-pages/pom.xml index 5fdc414a68..8889d235a8 100644 --- a/modules/integration/tests-common/ui-pages/pom.xml +++ b/modules/integration/tests-common/ui-pages/pom.xml @@ -20,7 +20,7 @@ under the License. tests-common org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/tests-integration/pom.xml b/modules/integration/tests-integration/pom.xml index ef1b9592a8..fc2d3c33af 100644 --- a/modules/integration/tests-integration/pom.xml +++ b/modules/integration/tests-integration/pom.xml @@ -21,7 +21,7 @@ under the License. integration org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/tests-integration/tests-backend/pom.xml b/modules/integration/tests-integration/tests-backend/pom.xml index e6eb6f4e0a..f57134d22b 100644 --- a/modules/integration/tests-integration/tests-backend/pom.xml +++ b/modules/integration/tests-integration/tests-backend/pom.xml @@ -20,7 +20,7 @@ under the License. org.wso2.carbon.am.integration.test org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/integration/tests-integration/tests-benchmark/pom.xml b/modules/integration/tests-integration/tests-benchmark/pom.xml index 2d5a84ae85..e4123f0781 100644 --- a/modules/integration/tests-integration/tests-benchmark/pom.xml +++ b/modules/integration/tests-integration/tests-benchmark/pom.xml @@ -20,7 +20,7 @@ under the License. org.wso2.carbon.am.integration.test org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml @@ -447,7 +447,7 @@ under the License. org.wso2.am org.wso2.carbon.am.integration.backend.test - 4.4.0-m1 + 4.4.0-SNAPSHOT test-jar test diff --git a/modules/integration/tests-integration/tests-restart/pom.xml b/modules/integration/tests-integration/tests-restart/pom.xml index 1a06adb869..d7d94e2b34 100644 --- a/modules/integration/tests-integration/tests-restart/pom.xml +++ b/modules/integration/tests-integration/tests-restart/pom.xml @@ -20,7 +20,7 @@ under the License. org.wso2.carbon.am.integration.test org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/local-authenticators/pom.xml b/modules/local-authenticators/pom.xml index 5a314389cd..5b155274b0 100644 --- a/modules/local-authenticators/pom.xml +++ b/modules/local-authenticators/pom.xml @@ -19,7 +19,7 @@ org.wso2.am am-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/oauth2-grant-types/pom.xml b/modules/oauth2-grant-types/pom.xml index cc636cad0d..42c39ee2e8 100644 --- a/modules/oauth2-grant-types/pom.xml +++ b/modules/oauth2-grant-types/pom.xml @@ -19,7 +19,7 @@ org.wso2.am am-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../../pom.xml diff --git a/modules/org.wso2.am.multitenancy.dashboard.ui/pom.xml b/modules/org.wso2.am.multitenancy.dashboard.ui/pom.xml index 78fffe1fe2..ada72e4328 100644 --- a/modules/org.wso2.am.multitenancy.dashboard.ui/pom.xml +++ b/modules/org.wso2.am.multitenancy.dashboard.ui/pom.xml @@ -3,7 +3,7 @@ am-parent org.wso2.am - 4.4.0-m1 + 4.4.0-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/p2-profile/pom.xml b/modules/p2-profile/pom.xml index 9e5aed1bab..cbb4846572 100644 --- a/modules/p2-profile/pom.xml +++ b/modules/p2-profile/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../../pom.xml diff --git a/modules/p2-profile/product/pom.xml b/modules/p2-profile/product/pom.xml index 32ebcfc41e..31ec5e95a9 100644 --- a/modules/p2-profile/product/pom.xml +++ b/modules/p2-profile/product/pom.xml @@ -20,7 +20,7 @@ org.wso2.am am-p2-profile-gen-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/styles/pom.xml b/modules/styles/pom.xml index df58d792de..5e079a71c3 100644 --- a/modules/styles/pom.xml +++ b/modules/styles/pom.xml @@ -22,7 +22,7 @@ org.wso2.am am-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../../pom.xml diff --git a/modules/styles/product/pom.xml b/modules/styles/product/pom.xml index 4a63a0e7f1..52a46b9d2c 100644 --- a/modules/styles/product/pom.xml +++ b/modules/styles/product/pom.xml @@ -23,7 +23,7 @@ org.wso2.am am-styles-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/modules/styles/service/pom.xml b/modules/styles/service/pom.xml index d353a2b341..fe05ebd98d 100644 --- a/modules/styles/service/pom.xml +++ b/modules/styles/service/pom.xml @@ -20,7 +20,7 @@ org.wso2.am am-styles-parent - 4.4.0-m1 + 4.4.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index c2f55815ce..9328d2fa0f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.am am-parent pom - 4.4.0-m1 + 4.4.0-SNAPSHOT WSO2 API Manager - Aggregator Module https://wso2.com/products/api-manager WSO2 API Manager @@ -57,7 +57,7 @@ https://github.com/wso2/product-apim.git scm:git:https://github.com/wso2/product-apim.git scm:git:https://github.com/wso2/product-apim.git - v4.4.0-m1 + HEAD @@ -1302,7 +1302,7 @@ 4.9.26 - 4.4.0-m1 + 4.4.0-SNAPSHOT 1.1.23 From 2d070f7fbfeab71f15f1044a3f7b7728ebd8d1c0 Mon Sep 17 00:00:00 2001 From: Savindu Dimal <55122994+SavinduDimal@users.noreply.github.com> Date: Tue, 30 Jul 2024 09:37:52 +0530 Subject: [PATCH 07/12] Revert "Remove Unused Synapse API" --- .../synapse-configs/default/api/_OpenService_.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 modules/distribution/product/src/main/conf/synapse-configs/default/api/_OpenService_.xml diff --git a/modules/distribution/product/src/main/conf/synapse-configs/default/api/_OpenService_.xml b/modules/distribution/product/src/main/conf/synapse-configs/default/api/_OpenService_.xml new file mode 100644 index 0000000000..191e86bb73 --- /dev/null +++ b/modules/distribution/product/src/main/conf/synapse-configs/default/api/_OpenService_.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file From 3a92ed2a9917fd056f6e71532a08d636145e0421 Mon Sep 17 00:00:00 2001 From: rusirijayodaillesinghe Date: Thu, 20 Jun 2024 10:24:03 +0530 Subject: [PATCH 08/12] Modify integration tests --- .../publisher-api.yaml.sha256 | 2 +- .../clients/publisher/api/openapi.yaml | 12 ++++ .../publisher/docs/ClientCertMetadataDTO.md | 1 + .../publisher/docs/ClientCertificatesApi.md | 12 ++-- .../api/v1/ClientCertificatesApi.java | 56 +++++++++++++------ .../api/v1/dto/ClientCertMetadataDTO.java | 33 ++++++++++- .../src/main/resources/publisher-api.yaml | 9 +++ .../test/impl/RestAPIPublisherImpl.java | 5 +- .../utils/base/APIMIntegrationConstants.java | 5 ++ .../tests/api/APICreationTestCase.java | 2 +- ...SSLCertificateChainValidationTestCase.java | 4 +- .../api/lifecycle/APISecurityTestCase.java | 8 +-- .../APIProductCreationTestCase.java | 2 +- 13 files changed, 116 insertions(+), 35 deletions(-) diff --git a/modules/integration/tests-common/clients/publisher/.openapi-generator/publisher-api.yaml.sha256 b/modules/integration/tests-common/clients/publisher/.openapi-generator/publisher-api.yaml.sha256 index 0e346abaa5..001627b42a 100644 --- a/modules/integration/tests-common/clients/publisher/.openapi-generator/publisher-api.yaml.sha256 +++ b/modules/integration/tests-common/clients/publisher/.openapi-generator/publisher-api.yaml.sha256 @@ -1 +1 @@ -51e2f49c8ea45de5a84d917d28a455ab2094d705fe7c9a8f4a6aaa1fdfc80b7f \ No newline at end of file +44e1db981270b033c54cda9c9d6c3e111c1cf6c1ec1529f7d72d47a4564f3ffa \ No newline at end of file diff --git a/modules/integration/tests-common/clients/publisher/api/openapi.yaml b/modules/integration/tests-common/clients/publisher/api/openapi.yaml index 27ba9924cf..af590a66fc 100644 --- a/modules/integration/tests-common/clients/publisher/api/openapi.yaml +++ b/modules/integration/tests-common/clients/publisher/api/openapi.yaml @@ -8375,6 +8375,9 @@ paths: tier: description: api tier to which the certificate should be applied. type: string + keyType: + description: key type to which the certificate should be applied. + type: string required: - alias - certificate @@ -8657,6 +8660,9 @@ paths: tier: description: The tier of the certificate type: string + keyType: + description: The key type of the certificate + type: string responses: "200": content: @@ -19796,9 +19802,11 @@ components: certificates: - tier: Gold alias: wso2carbon + keyType: PRODUCTION apiId: 64eca60b-2e55-4c38-8603-e9e6bad7d809 - tier: Gold alias: wso2carbon + keyType: PRODUCTION apiId: 64eca60b-2e55-4c38-8603-e9e6bad7d809 count: 1 properties: @@ -19818,6 +19826,7 @@ components: example: tier: Gold alias: wso2carbon + keyType: PRODUCTION apiId: 64eca60b-2e55-4c38-8603-e9e6bad7d809 properties: alias: @@ -19829,6 +19838,9 @@ components: tier: example: Gold type: string + keyType: + default: PRODUCTION + type: string title: Client certificate meta data type: object LifecycleState: diff --git a/modules/integration/tests-common/clients/publisher/docs/ClientCertMetadataDTO.md b/modules/integration/tests-common/clients/publisher/docs/ClientCertMetadataDTO.md index 08e52569cb..27278434cb 100644 --- a/modules/integration/tests-common/clients/publisher/docs/ClientCertMetadataDTO.md +++ b/modules/integration/tests-common/clients/publisher/docs/ClientCertMetadataDTO.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **alias** | **String** | | [optional] **apiId** | **String** | | [optional] **tier** | **String** | | [optional] +**keyType** | **String** | | [optional] diff --git a/modules/integration/tests-common/clients/publisher/docs/ClientCertificatesApi.md b/modules/integration/tests-common/clients/publisher/docs/ClientCertificatesApi.md index 374508b471..df7e327206 100644 --- a/modules/integration/tests-common/clients/publisher/docs/ClientCertificatesApi.md +++ b/modules/integration/tests-common/clients/publisher/docs/ClientCertificatesApi.md @@ -14,7 +14,7 @@ Method | HTTP request | Description # **addAPIClientCertificate** -> ClientCertMetadataDTO addAPIClientCertificate(apiId, certificate, alias, tier) +> ClientCertMetadataDTO addAPIClientCertificate(apiId, certificate, alias, tier, keyType) Upload a New Certificate @@ -44,8 +44,9 @@ public class Example { File certificate = new File("/path/to/file"); // File | The certificate that needs to be uploaded. String alias = "alias_example"; // String | Alias for the certificate String tier = "tier_example"; // String | api tier to which the certificate should be applied. + String keyType = "keyType_example"; // String | key type to which the certificate should be applied. try { - ClientCertMetadataDTO result = apiInstance.addAPIClientCertificate(apiId, certificate, alias, tier); + ClientCertMetadataDTO result = apiInstance.addAPIClientCertificate(apiId, certificate, alias, tier, keyType); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ClientCertificatesApi#addAPIClientCertificate"); @@ -66,6 +67,7 @@ Name | Type | Description | Notes **certificate** | **File**| The certificate that needs to be uploaded. | **alias** | **String**| Alias for the certificate | **tier** | **String**| api tier to which the certificate should be applied. | + **keyType** | **String**| key type to which the certificate should be applied. | [optional] ### Return type @@ -378,7 +380,7 @@ Name | Type | Description | Notes # **updateAPIClientCertificateByAlias** -> ClientCertMetadataDTO updateAPIClientCertificateByAlias(alias, apiId, certificate, tier) +> ClientCertMetadataDTO updateAPIClientCertificateByAlias(alias, apiId, certificate, tier, keyType) Update a Certificate @@ -408,8 +410,9 @@ public class Example { String apiId = "apiId_example"; // String | **API ID** consisting of the **UUID** of the API. File certificate = new File("/path/to/file"); // File | The certificate that needs to be uploaded. String tier = "tier_example"; // String | The tier of the certificate + String keyType = "keyType_example"; // String | The key type of the certificate try { - ClientCertMetadataDTO result = apiInstance.updateAPIClientCertificateByAlias(alias, apiId, certificate, tier); + ClientCertMetadataDTO result = apiInstance.updateAPIClientCertificateByAlias(alias, apiId, certificate, tier, keyType); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ClientCertificatesApi#updateAPIClientCertificateByAlias"); @@ -430,6 +433,7 @@ Name | Type | Description | Notes **apiId** | **String**| **API ID** consisting of the **UUID** of the API. | **certificate** | **File**| The certificate that needs to be uploaded. | [optional] **tier** | **String**| The tier of the certificate | [optional] + **keyType** | **String**| The key type of the certificate | [optional] ### Return type diff --git a/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java b/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java index 6d4ba0be43..06c2297277 100644 --- a/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java +++ b/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java @@ -64,6 +64,7 @@ public void setApiClient(ApiClient apiClient) { * @param certificate The certificate that needs to be uploaded. (required) * @param alias Alias for the certificate (required) * @param tier api tier to which the certificate should be applied. (required) + * @param keyType key type to which the certificate should be applied. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -75,7 +76,7 @@ public void setApiClient(ApiClient apiClient) { 500 Internal Server Error. - */ - public okhttp3.Call addAPIClientCertificateCall(String apiId, File certificate, String alias, String tier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addAPIClientCertificateCall(String apiId, File certificate, String alias, String tier, String keyType, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -99,6 +100,10 @@ public okhttp3.Call addAPIClientCertificateCall(String apiId, File certificate, localVarFormParams.put("tier", tier); } + if (keyType != null) { + localVarFormParams.put("keyType", keyType); + } + final String[] localVarAccepts = { "application/json" }; @@ -118,7 +123,7 @@ public okhttp3.Call addAPIClientCertificateCall(String apiId, File certificate, } @SuppressWarnings("rawtypes") - private okhttp3.Call addAPIClientCertificateValidateBeforeCall(String apiId, File certificate, String alias, String tier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call addAPIClientCertificateValidateBeforeCall(String apiId, File certificate, String alias, String tier, String keyType, final ApiCallback _callback) throws ApiException { // verify the required parameter 'apiId' is set if (apiId == null) { @@ -141,7 +146,7 @@ private okhttp3.Call addAPIClientCertificateValidateBeforeCall(String apiId, Fil } - okhttp3.Call localVarCall = addAPIClientCertificateCall(apiId, certificate, alias, tier, _callback); + okhttp3.Call localVarCall = addAPIClientCertificateCall(apiId, certificate, alias, tier, keyType, _callback); return localVarCall; } @@ -153,6 +158,7 @@ private okhttp3.Call addAPIClientCertificateValidateBeforeCall(String apiId, Fil * @param certificate The certificate that needs to be uploaded. (required) * @param alias Alias for the certificate (required) * @param tier api tier to which the certificate should be applied. (required) + * @param keyType key type to which the certificate should be applied. (optional) * @return ClientCertMetadataDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -163,8 +169,8 @@ private okhttp3.Call addAPIClientCertificateValidateBeforeCall(String apiId, Fil 500 Internal Server Error. - */ - public ClientCertMetadataDTO addAPIClientCertificate(String apiId, File certificate, String alias, String tier) throws ApiException { - ApiResponse localVarResp = addAPIClientCertificateWithHttpInfo(apiId, certificate, alias, tier); + public ClientCertMetadataDTO addAPIClientCertificate(String apiId, File certificate, String alias, String tier, String keyType) throws ApiException { + ApiResponse localVarResp = addAPIClientCertificateWithHttpInfo(apiId, certificate, alias, tier, keyType); return localVarResp.getData(); } @@ -175,6 +181,7 @@ public ClientCertMetadataDTO addAPIClientCertificate(String apiId, File certific * @param certificate The certificate that needs to be uploaded. (required) * @param alias Alias for the certificate (required) * @param tier api tier to which the certificate should be applied. (required) + * @param keyType key type to which the certificate should be applied. (optional) * @return ApiResponse<ClientCertMetadataDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -185,8 +192,8 @@ public ClientCertMetadataDTO addAPIClientCertificate(String apiId, File certific 500 Internal Server Error. - */ - public ApiResponse addAPIClientCertificateWithHttpInfo(String apiId, File certificate, String alias, String tier) throws ApiException { - okhttp3.Call localVarCall = addAPIClientCertificateValidateBeforeCall(apiId, certificate, alias, tier, null); + public ApiResponse addAPIClientCertificateWithHttpInfo(String apiId, File certificate, String alias, String tier, String keyType) throws ApiException { + okhttp3.Call localVarCall = addAPIClientCertificateValidateBeforeCall(apiId, certificate, alias, tier, keyType, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -198,6 +205,7 @@ public ApiResponse addAPIClientCertificateWithHttpInfo(St * @param certificate The certificate that needs to be uploaded. (required) * @param alias Alias for the certificate (required) * @param tier api tier to which the certificate should be applied. (required) + * @param keyType key type to which the certificate should be applied. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -209,9 +217,9 @@ public ApiResponse addAPIClientCertificateWithHttpInfo(St 500 Internal Server Error. - */ - public okhttp3.Call addAPIClientCertificateAsync(String apiId, File certificate, String alias, String tier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addAPIClientCertificateAsync(String apiId, File certificate, String alias, String tier, String keyType, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = addAPIClientCertificateValidateBeforeCall(apiId, certificate, alias, tier, _callback); + okhttp3.Call localVarCall = addAPIClientCertificateValidateBeforeCall(apiId, certificate, alias, tier, keyType, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -756,6 +764,7 @@ public okhttp3.Call getAPIClientCertificatesAsync(String apiId, Integer limit, I * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param certificate The certificate that needs to be uploaded. (optional) * @param tier The tier of the certificate (optional) + * @param keyType The key type of the certificate (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -768,7 +777,8 @@ public okhttp3.Call getAPIClientCertificatesAsync(String apiId, Integer limit, I 500 Internal Server Error. - */ - public okhttp3.Call updateAPIClientCertificateByAliasCall(String alias, String apiId, File certificate, String tier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAPIClientCertificateByAliasCall(String alias, String apiId, File certificate, String tier, + String keyType, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -789,6 +799,10 @@ public okhttp3.Call updateAPIClientCertificateByAliasCall(String alias, String a localVarFormParams.put("tier", tier); } + if (keyType != null) { + localVarFormParams.put("keyType", keyType); + } + final String[] localVarAccepts = { "application/json" }; @@ -808,7 +822,8 @@ public okhttp3.Call updateAPIClientCertificateByAliasCall(String alias, String a } @SuppressWarnings("rawtypes") - private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String alias, String apiId, File certificate, String tier, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String alias, String apiId, + File certificate, String tier, String keyType, final ApiCallback _callback) throws ApiException { // verify the required parameter 'alias' is set if (alias == null) { @@ -821,7 +836,7 @@ private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String } - okhttp3.Call localVarCall = updateAPIClientCertificateByAliasCall(alias, apiId, certificate, tier, _callback); + okhttp3.Call localVarCall = updateAPIClientCertificateByAliasCall(alias, apiId, certificate, tier, keyType, _callback); return localVarCall; } @@ -833,6 +848,7 @@ private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param certificate The certificate that needs to be uploaded. (optional) * @param tier The tier of the certificate (optional) + * @param keyType The key type of the certificate (optional) * @return ClientCertMetadataDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -844,8 +860,8 @@ private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String 500 Internal Server Error. - */ - public ClientCertMetadataDTO updateAPIClientCertificateByAlias(String alias, String apiId, File certificate, String tier) throws ApiException { - ApiResponse localVarResp = updateAPIClientCertificateByAliasWithHttpInfo(alias, apiId, certificate, tier); + public ClientCertMetadataDTO updateAPIClientCertificateByAlias(String alias, String apiId, File certificate, String tier, String keyType) throws ApiException { + ApiResponse localVarResp = updateAPIClientCertificateByAliasWithHttpInfo(alias, apiId, certificate, tier, keyType); return localVarResp.getData(); } @@ -856,6 +872,7 @@ public ClientCertMetadataDTO updateAPIClientCertificateByAlias(String alias, Str * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param certificate The certificate that needs to be uploaded. (optional) * @param tier The tier of the certificate (optional) + * @param keyType The key type of the certificate (optional) * @return ApiResponse<ClientCertMetadataDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -867,8 +884,8 @@ public ClientCertMetadataDTO updateAPIClientCertificateByAlias(String alias, Str 500 Internal Server Error. - */ - public ApiResponse updateAPIClientCertificateByAliasWithHttpInfo(String alias, String apiId, File certificate, String tier) throws ApiException { - okhttp3.Call localVarCall = updateAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, certificate, tier, null); + public ApiResponse updateAPIClientCertificateByAliasWithHttpInfo(String alias, String apiId, File certificate, String tier, String keyType) throws ApiException { + okhttp3.Call localVarCall = updateAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, certificate, tier, keyType, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -880,6 +897,7 @@ public ApiResponse updateAPIClientCertificateByAliasWithH * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param certificate The certificate that needs to be uploaded. (optional) * @param tier The tier of the certificate (optional) + * @param keyType The key type of the certificate (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -892,9 +910,11 @@ public ApiResponse updateAPIClientCertificateByAliasWithH 500 Internal Server Error. - */ - public okhttp3.Call updateAPIClientCertificateByAliasAsync(String alias, String apiId, File certificate, String tier, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAPIClientCertificateByAliasAsync(String alias, String apiId, File certificate, + String tier, String keyType, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = updateAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, certificate, tier, _callback); + okhttp3.Call localVarCall = updateAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, certificate, tier, + keyType, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/dto/ClientCertMetadataDTO.java b/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/dto/ClientCertMetadataDTO.java index d1b52c43a5..7af28c0c83 100644 --- a/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/dto/ClientCertMetadataDTO.java +++ b/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/dto/ClientCertMetadataDTO.java @@ -42,6 +42,10 @@ public class ClientCertMetadataDTO { @SerializedName(SERIALIZED_NAME_TIER) private String tier; + public static final String SERIALIZED_NAME_KEY_TYPE = "keyType"; + @SerializedName(SERIALIZED_NAME_KEY_TYPE) + private String keyType = "PRODUCTION"; + public ClientCertMetadataDTO alias(String alias) { @@ -112,6 +116,29 @@ public void setTier(String tier) { } + public ClientCertMetadataDTO keyType(String keyType) { + + this.keyType = keyType; + return this; + } + + /** + * Get keyType + * @return keyType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getKeyType() { + return keyType; + } + + + public void setKeyType(String keyType) { + this.keyType = keyType; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -123,12 +150,13 @@ public boolean equals(Object o) { ClientCertMetadataDTO clientCertMetadata = (ClientCertMetadataDTO) o; return Objects.equals(this.alias, clientCertMetadata.alias) && Objects.equals(this.apiId, clientCertMetadata.apiId) && - Objects.equals(this.tier, clientCertMetadata.tier); + Objects.equals(this.tier, clientCertMetadata.tier) && + Objects.equals(this.keyType, clientCertMetadata.keyType); } @Override public int hashCode() { - return Objects.hash(alias, apiId, tier); + return Objects.hash(alias, apiId, tier, keyType); } @@ -139,6 +167,7 @@ public String toString() { sb.append(" alias: ").append(toIndentedString(alias)).append("\n"); sb.append(" apiId: ").append(toIndentedString(apiId)).append("\n"); sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); + sb.append(" keyType: ").append(toIndentedString(keyType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/modules/integration/tests-common/clients/publisher/src/main/resources/publisher-api.yaml b/modules/integration/tests-common/clients/publisher/src/main/resources/publisher-api.yaml index 70f7d708ea..4d5ebabc2d 100644 --- a/modules/integration/tests-common/clients/publisher/src/main/resources/publisher-api.yaml +++ b/modules/integration/tests-common/clients/publisher/src/main/resources/publisher-api.yaml @@ -4671,6 +4671,9 @@ paths: tier: type: string description: api tier to which the certificate should be applied. + keyType: + type: string + description: key type to which the certificate should be applied. required: true responses: 200: @@ -4783,6 +4786,9 @@ paths: tier: type: string description: The tier of the certificate + keyType: + type: string + description: The key type of the certificate responses: 200: description: | @@ -11282,6 +11288,9 @@ components: tier: type: string example: Gold + keyType: + type: string + default: PRODUCTION description: Meta data of certificate LifecycleState: title: Lifecycle State diff --git a/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/impl/RestAPIPublisherImpl.java b/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/impl/RestAPIPublisherImpl.java index 1beec99354..0410667ba8 100644 --- a/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/impl/RestAPIPublisherImpl.java +++ b/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/impl/RestAPIPublisherImpl.java @@ -1419,14 +1419,15 @@ public APIDTO addAPI(APICreationRequestBean apiCreationRequestBean) throws ApiEx * * @param certificate certificate * @param alias alis + * @param keyType key type (whether PRODUCTION or SANDBOX) * @return * @throws ApiException if an error occurred while uploading the certificate. */ - public HttpResponse uploadCertificate(File certificate, String alias, String apiId, String tier) + public HttpResponse uploadCertificate(File certificate, String alias, String apiId, String tier, String keyType) throws ApiException { ClientCertMetadataDTO certificateDTO = clientCertificatesApi.addAPIClientCertificate(apiId, certificate, - alias, tier); + alias, tier, keyType); HttpResponse response = null; if (StringUtils.isNotEmpty(certificateDTO.getAlias())) { response = new HttpResponse("Successfully uploaded the certificate", 200); diff --git a/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/utils/base/APIMIntegrationConstants.java b/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/utils/base/APIMIntegrationConstants.java index a1f561ddbf..08cbe90238 100644 --- a/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/utils/base/APIMIntegrationConstants.java +++ b/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/utils/base/APIMIntegrationConstants.java @@ -127,6 +127,11 @@ public static class API_TIER { } + public static class KEY_TYPE { + public static final String PRODUCTION = "PRODUCTION"; + public static final String SANDBOX = "SANDBOX"; + } + public static class GRANT_TYPE { public static final String PASSWORD = "password"; public static final String CLIENT_CREDENTIAL = "client_credentials"; diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/APICreationTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/APICreationTestCase.java index ea416f595e..5b99f2d598 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/APICreationTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/APICreationTestCase.java @@ -83,7 +83,7 @@ public void testCreateAndDeployApiWithMutualSSLEnabled() throws Exception { String certificate = getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + File.separator + "example.crt"; restAPIPublisher.uploadCertificate(new File(certificate), "example", apiId, - APIMIntegrationConstants.API_TIER.UNLIMITED); + APIMIntegrationConstants.API_TIER.UNLIMITED, APIMIntegrationConstants.KEY_TYPE.SANDBOX); // Verify deployment of API with Mutual SSL enabled String revisionUUID = createAPIRevisionAndDeployUsingRest(apiId, restAPIPublisher); diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityMutualSSLCertificateChainValidationTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityMutualSSLCertificateChainValidationTestCase.java index 41bc01cd91..cf94a3f203 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityMutualSSLCertificateChainValidationTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityMutualSSLCertificateChainValidationTestCase.java @@ -117,7 +117,7 @@ public void initialize() throws APIManagerIntegrationTestException, IOException, String rootCertPath = getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + File.separator + "cert_chain_root.cer"; restAPIPublisher.uploadCertificate(new File(rootCertPath), "cert_chain_root", apiId1, - APIMIntegrationConstants.API_TIER.UNLIMITED); + APIMIntegrationConstants.API_TIER.UNLIMITED, APIMIntegrationConstants.KEY_TYPE.SANDBOX); createAPIRevisionAndDeployUsingRest(apiId1, restAPIPublisher); APIRequest apiRequest2 = new APIRequest(intermediateCertAPI, intermediateCertAPI, new URL(apiEndPointUrl)); @@ -139,7 +139,7 @@ public void initialize() throws APIManagerIntegrationTestException, IOException, String intermediateCertPath = getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + File.separator + "cert_chain_intermediate.cer"; restAPIPublisher.uploadCertificate(new File(intermediateCertPath), "cert_chain_intermediate", apiId2, - APIMIntegrationConstants.API_TIER.UNLIMITED); + APIMIntegrationConstants.API_TIER.UNLIMITED, APIMIntegrationConstants.KEY_TYPE.SANDBOX); createAPIRevisionAndDeployUsingRest(apiId2, restAPIPublisher); waitForAPIDeploymentSync(user.getUserName(), rootCertAPI, API_VERSION_1_0_0, diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityTestCase.java index 1f1f3e9fcc..01469d9dfd 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityTestCase.java @@ -189,7 +189,7 @@ public void initialize() String certOne = getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + File.separator + "example.crt"; restAPIPublisher.uploadCertificate(new File(certOne), "example", apiId1, - APIMIntegrationConstants.API_TIER.UNLIMITED); + APIMIntegrationConstants.API_TIER.UNLIMITED, APIMIntegrationConstants.KEY_TYPE.SANDBOX); APIRequest apiRequest2 = new APIRequest(mutualSSLWithOAuthAPI, mutualSSLWithOAuthAPIContext, new URL(apiEndPointUrl)); @@ -217,7 +217,7 @@ public void initialize() String certTwo = getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + File.separator + "example.crt"; restAPIPublisher.uploadCertificate(new File(certTwo), "abcde", apiId2, - APIMIntegrationConstants.API_TIER.UNLIMITED); + APIMIntegrationConstants.API_TIER.UNLIMITED, APIMIntegrationConstants.KEY_TYPE.SANDBOX); APIRequest apiRequest3 = new APIRequest(mutualSSLandOauthMandatoryAPI, mutualSSLandOAuthMandatoryAPIContext, @@ -245,8 +245,8 @@ public void initialize() apiId3 = response3.getData(); String certThree = getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + File.separator + "example.crt"; - restAPIPublisher - .uploadCertificate(new File(certThree), "abcdef", apiId3, APIMIntegrationConstants.API_TIER.UNLIMITED); + restAPIPublisher.uploadCertificate(new File(certThree), "abcdef", apiId3, + APIMIntegrationConstants.API_TIER.UNLIMITED, APIMIntegrationConstants.KEY_TYPE.SANDBOX); // Create Revision and Deploy to Gateway // Add an API Secured with APIKey only diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/apiproduct/APIProductCreationTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/apiproduct/APIProductCreationTestCase.java index 09f520f769..4d00b19ce8 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/apiproduct/APIProductCreationTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/apiproduct/APIProductCreationTestCase.java @@ -735,7 +735,7 @@ public void testCreateAndDeployApiProductWithMutualSSLEnabled() throws Exception String certificate = getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + File.separator + "example.crt"; restAPIPublisher.uploadCertificate(new File(certificate), "example", apiProductDTO.getId(), - APIMIntegrationConstants.API_TIER.UNLIMITED); + APIMIntegrationConstants.API_TIER.UNLIMITED, APIMIntegrationConstants.KEY_TYPE.SANDBOX); // Step 4: Verify deployment of APIProduct with Mutual SSL enabled String revisionUUID = createAPIProductRevisionAndDeployUsingRest(apiProductDTO.getId(), restAPIPublisher); From 9500392aba5ebb51acebf3145d3888156770b4f4 Mon Sep 17 00:00:00 2001 From: rusirijayodaillesinghe Date: Wed, 26 Jun 2024 11:57:39 +0530 Subject: [PATCH 09/12] Modify velocity template --- .../resources/api_templates/velocity_template.xml | 7 +------ .../publisher/api/v1/ClientCertificatesApi.java | 12 ++++-------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/modules/distribution/resources/api_templates/velocity_template.xml b/modules/distribution/resources/api_templates/velocity_template.xml index f681cb2ebd..e5f9e67969 100644 --- a/modules/distribution/resources/api_templates/velocity_template.xml +++ b/modules/distribution/resources/api_templates/velocity_template.xml @@ -292,17 +292,14 @@ $in_sequences.get("$resource.getUriTemplate()").get($uri) ## AWS Lambda: end #else - #if( $apiIsOauthProtected || $apiIsApiKeyProtected || $apiIsBasicAuthProtected ) - #end #if( ($environmentType == 'sandbox') || ($environmentType =='hybrid' && ! $endpoint_config.get("production_endpoints")) ) #draw_endpoint( "sandbox" $endpoint_config ) #else #draw_endpoint( "production" $endpoint_config ) #end - #if( $apiIsOauthProtected || $apiIsApiKeyProtected || $apiIsBasicAuthProtected ) #if( $environmentType !='hybrid' ) @@ -335,7 +332,6 @@ $in_sequences.get("$resource.getUriTemplate()").get($uri) #end - #end #end @@ -348,7 +344,6 @@ $out_sequences.get("$resource.getUriTemplate()").get($uri) #if( $responseCacheEnabled ) #end - #if( $apiIsOauthProtected || $apiIsApiKeyProtected || $apiIsBasicAuthProtected ) #if($endpointSecurityProd.clientId && ($endpointSecurityProd.type == "oauth" || $endpointSecurityProd.type == "OAUTH")) @@ -361,7 +356,7 @@ $out_sequences.get("$resource.getUriTemplate()").get($uri) #end - #end + diff --git a/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java b/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java index 06c2297277..02b62748fb 100644 --- a/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java +++ b/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java @@ -777,8 +777,7 @@ public okhttp3.Call getAPIClientCertificatesAsync(String apiId, Integer limit, I 500 Internal Server Error. - */ - public okhttp3.Call updateAPIClientCertificateByAliasCall(String alias, String apiId, File certificate, String tier, - String keyType, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAPIClientCertificateByAliasCall(String alias, String apiId, File certificate, String tier, String keyType, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -822,8 +821,7 @@ public okhttp3.Call updateAPIClientCertificateByAliasCall(String alias, String a } @SuppressWarnings("rawtypes") - private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String alias, String apiId, - File certificate, String tier, String keyType, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String alias, String apiId, File certificate, String tier, String keyType, final ApiCallback _callback) throws ApiException { // verify the required parameter 'alias' is set if (alias == null) { @@ -910,11 +908,9 @@ public ApiResponse updateAPIClientCertificateByAliasWithH 500 Internal Server Error. - */ - public okhttp3.Call updateAPIClientCertificateByAliasAsync(String alias, String apiId, File certificate, - String tier, String keyType, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAPIClientCertificateByAliasAsync(String alias, String apiId, File certificate, String tier, String keyType, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = updateAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, certificate, tier, - keyType, _callback); + okhttp3.Call localVarCall = updateAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, certificate, tier, keyType, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; From 935ba77d50dc766b16a89970ed1751f5756b4f28 Mon Sep 17 00:00:00 2001 From: rusirijayodaillesinghe Date: Fri, 28 Jun 2024 14:19:38 +0530 Subject: [PATCH 10/12] Add integration test for MLTS only scenario --- .../api/lifecycle/APISecurityTestCase.java | 50 +++++++++++++++++-- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityTestCase.java index 01469d9dfd..ec3793a745 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityTestCase.java @@ -110,7 +110,8 @@ public class APISecurityTestCase extends APIManagerLifecycleBaseTest { private final String API_VERSION_1_0_0 = "1.0.0"; private final String APPLICATION_NAME = "AccessibilityOfDeprecatedOldAPIAndPublishedCopyAPITestCase"; private String accessToken; - private final String API_END_POINT_POSTFIX_URL = "jaxrs_basic/services/customers/customerservice/"; + private final String API_END_POINT_POSTFIX_URL1 = "jaxrs_basic/services/customers/customerservice/"; + private final String API_END_POINT_POSTFIX_URL2 = "jaxrs_basic/services/customers/customerservice2/"; private String apiEndPointUrl; private String applicationId; private String consumerKey; @@ -156,9 +157,11 @@ public void initialize() UserStoreException { super.init(userMode); createUser(); - apiEndPointUrl = backEndServerUrl.getWebAppURLHttp() + API_END_POINT_POSTFIX_URL; + String apiSandboxEndPointUrl = backEndServerUrl.getWebAppURLHttp() + API_END_POINT_POSTFIX_URL2; + apiEndPointUrl = backEndServerUrl.getWebAppURLHttp() + API_END_POINT_POSTFIX_URL1; - APIRequest apiRequest1 = new APIRequest(mutualSSLOnlyAPIName, mutualSSLOnlyAPIContext, new URL(apiEndPointUrl)); + APIRequest apiRequest1 = new APIRequest(mutualSSLOnlyAPIName, mutualSSLOnlyAPIContext, + new URL(apiEndPointUrl), new URL(apiSandboxEndPointUrl)); apiRequest1.setVersion(API_VERSION_1_0_0); apiRequest1.setTiersCollection(APIMIntegrationConstants.API_TIER.UNLIMITED); apiRequest1.setTier(APIMIntegrationConstants.API_TIER.UNLIMITED); @@ -186,10 +189,16 @@ public void initialize() HttpResponse response1 = restAPIPublisher.addAPI(apiRequest1); apiId1 = response1.getData(); - String certOne = getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + String certOneSandbox = getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + + File.separator + "abcde.crt"; + + String certOneProduction = getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + File.separator + "example.crt"; - restAPIPublisher.uploadCertificate(new File(certOne), "example", apiId1, + + restAPIPublisher.uploadCertificate(new File(certOneSandbox), "example_sand", apiId1, APIMIntegrationConstants.API_TIER.UNLIMITED, APIMIntegrationConstants.KEY_TYPE.SANDBOX); + restAPIPublisher.uploadCertificate(new File(certOneProduction), "example_prod", apiId1, + APIMIntegrationConstants.API_TIER.UNLIMITED, APIMIntegrationConstants.KEY_TYPE.PRODUCTION); APIRequest apiRequest2 = new APIRequest(mutualSSLWithOAuthAPI, mutualSSLWithOAuthAPIContext, new URL(apiEndPointUrl)); @@ -531,6 +540,37 @@ public void testAPIInvocationWithMutualSSLOnlyAPINegative() Assert.assertEquals(defaultResponse.getResponseCode(), HttpStatus.SC_UNAUTHORIZED); } + @Test(description = "Invoke mutual SSL only API with supported certificate", dependsOnMethods = + "testAPIInvocationWithMutualSSLOnlyAPINegative") + public void testAPIInvocationWithMutualSSLOnlyAPI() + throws IOException, XPathExpressionException, + NoSuchAlgorithmException, KeyStoreException, KeyManagementException, UnrecoverableKeyException { + Map requestHeaders = new HashMap<>(); + requestHeaders.put("accept", "text/xml"); + //(production) example.crt ->test.jks + //(sandbox) abcde.crt -> new-keystore.jks + HttpResponse response1 = HTTPSClientUtils.doMutulSSLGet( + getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + + File.separator + "new-keystore.jks", + getAPIInvocationURLHttps(mutualSSLOnlyAPIName, API_VERSION_1_0_0) + API_END_POINT_METHOD, + requestHeaders); + HttpResponse defaultResponse1 = HTTPSClientUtils.doMutulSSLGet( + getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + + File.separator + "new-keystore.jks", + getAPIInvocationURLHttps(mutualSSLOnlyAPIName) + API_END_POINT_METHOD, + requestHeaders); + + HttpResponse response2 = HTTPSClientUtils.doMutulSSLGet( + getAMResourceLocation() + File.separator + "lifecycletest" + File.separator + "mutualssl" + + File.separator + "test.jks", + getAPIInvocationURLHttps(mutualSSLOnlyAPIName, API_VERSION_1_0_0) + API_END_POINT_METHOD, + requestHeaders); + Assert.assertEquals(response1.getResponseCode(), HttpStatus.SC_OK); + Assert.assertEquals(defaultResponse1.getResponseCode(), HttpStatus.SC_OK); + Assert.assertNotEquals(response2.getResponseCode(), HttpStatus.SC_OK); + } + + @Test(description = "This method test to validate how application security mandatory and mutual ssl optional api " + "behaviour in success scenario", dependsOnMethods = "testCreateAndPublishAPIWithOAuth2") From 6a5200b99bb7027e1f9e8983526c3cb5128ec7fb Mon Sep 17 00:00:00 2001 From: rusirijayodaillesinghe Date: Fri, 5 Jul 2024 15:21:04 +0530 Subject: [PATCH 11/12] Modify integration tests based on the change to facilitate having the same alias for production and sandbox key types --- .../publisher-api.yaml.sha256 | 2 +- .../clients/publisher/api/openapi.yaml | 672 ++++++++- .../publisher/docs/ClientCertMetadataDTO.md | 1 - .../publisher/docs/ClientCertificatesApi.md | 470 ++++++- .../api/v1/ClientCertificatesApi.java | 1241 ++++++++++++++--- .../api/v1/dto/ClientCertMetadataDTO.java | 33 +- .../src/main/resources/publisher-api.yaml | 348 ++++- .../test/impl/RestAPIPublisherImpl.java | 4 +- 8 files changed, 2511 insertions(+), 260 deletions(-) diff --git a/modules/integration/tests-common/clients/publisher/.openapi-generator/publisher-api.yaml.sha256 b/modules/integration/tests-common/clients/publisher/.openapi-generator/publisher-api.yaml.sha256 index 001627b42a..c5df44d193 100644 --- a/modules/integration/tests-common/clients/publisher/.openapi-generator/publisher-api.yaml.sha256 +++ b/modules/integration/tests-common/clients/publisher/.openapi-generator/publisher-api.yaml.sha256 @@ -1 +1 @@ -44e1db981270b033c54cda9c9d6c3e111c1cf6c1ec1529f7d72d47a4564f3ffa \ No newline at end of file +f22432a7f6a2e79f6244e9360787b60d17a9169f9e91d69368ce8fd2a139ba5d \ No newline at end of file diff --git a/modules/integration/tests-common/clients/publisher/api/openapi.yaml b/modules/integration/tests-common/clients/publisher/api/openapi.yaml index af590a66fc..2dfe0b6820 100644 --- a/modules/integration/tests-common/clients/publisher/api/openapi.yaml +++ b/modules/integration/tests-common/clients/publisher/api/openapi.yaml @@ -8375,8 +8375,595 @@ paths: tier: description: api tier to which the certificate should be applied. type: string - keyType: - description: key type to which the certificate should be applied. + required: + - alias + - certificate + - tier + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ClientCertMetadata' + description: | + OK. + The Certificate added successfully. + headers: + Location: + description: | + The URL of the newly created resource. + explode: false + schema: + type: string + style: simple + Content-Type: + description: | + The content type of the body. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + example: + code: 400 + message: Bad Request + description: Invalid request or validation error + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Bad Request. Invalid request or validation error. + "500": + content: + application/json: + example: + code: 500 + message: Internal Server Error + description: The server encountered an internal error. Please contact + administrator. + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Internal Server Error. + security: + - OAuth2Security: + - apim:api_create + - apim:api_manage + - apim:client_certificates_add + - apim:client_certificates_manage + summary: Upload a New Certificate + tags: + - Client Certificates + x-code-samples: + - lang: Curl + source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + -H "Content-Type: multipart/form-data" -F certificate=@test.crt -F alias=wso2carbon + -F apiId=fea749dd-d548-4a8b-b308-34903b39a34b -F tier=Gold "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certificates"' + x-contentType: multipart/form-data + x-accepts: application/json + /apis/{apiId}/client-certificates/{alias}: + delete: + description: | + This operation can be used to delete an uploaded certificate. + operationId: deleteAPIClientCertificateByAlias + parameters: + - description: | + The alias of the certificate that should be deleted. + explode: false + in: path + name: alias + required: true + schema: + type: string + style: simple + - description: | + **API ID** consisting of the **UUID** of the API. + explode: false + in: path + name: apiId + required: true + schema: + type: string + style: simple + responses: + "200": + content: {} + description: | + OK. + The Certificate deleted successfully. + headers: + Content-Type: + description: | + The content type of the body. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + example: + code: 400 + message: Bad Request + description: Invalid request or validation error + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Bad Request. Invalid request or validation error. + "404": + content: + application/json: + example: + code: 404 + message: Not Found + description: The specified resource does not exist + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Not Found. The specified resource does not exist. + "500": + content: + application/json: + example: + code: 500 + message: Internal Server Error + description: The server encountered an internal error. Please contact + administrator. + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Internal Server Error. + security: + - OAuth2Security: + - apim:api_create + - apim:api_manage + - apim:client_certificates_update + summary: Delete a Certificate + tags: + - Client Certificates + x-code-samples: + - lang: Curl + source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certificates/wso2carbon"' + x-accepts: application/json + get: + description: | + This operation can be used to get the information about a certificate. + operationId: getAPIClientCertificateByAlias + parameters: + - explode: false + in: path + name: alias + required: true + schema: + type: string + style: simple + - description: | + **API ID** consisting of the **UUID** of the API. + explode: false + in: path + name: apiId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CertificateInfo' + description: | + OK. + headers: + Content-Type: + description: | + The content type of the body. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + example: + code: 400 + message: Bad Request + description: Invalid request or validation error + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Bad Request. Invalid request or validation error. + "404": + content: + application/json: + example: + code: 404 + message: Not Found + description: The specified resource does not exist + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Not Found. The specified resource does not exist. + "500": + content: + application/json: + example: + code: 500 + message: Internal Server Error + description: The server encountered an internal error. Please contact + administrator. + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Internal Server Error. + security: + - OAuth2Security: + - apim:api_view + - apim:api_manage + - apim:client_certificates_view + - apim:client_certificates_manage + summary: Get the Certificate Information + tags: + - Client Certificates + x-code-samples: + - lang: Curl + source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certificates/wso2carbon"' + x-accepts: application/json + put: + description: | + This operation can be used to update an uploaded certificate. + operationId: updateAPIClientCertificateByAlias + parameters: + - description: Alias for the certificate + explode: false + in: path + name: alias + required: true + schema: + maxLength: 30 + minLength: 1 + type: string + style: simple + - description: | + **API ID** consisting of the **UUID** of the API. + explode: false + in: path + name: apiId + required: true + schema: + type: string + style: simple + requestBody: + content: + multipart/form-data: + schema: + properties: + certificate: + description: The certificate that needs to be uploaded. + format: binary + type: string + tier: + description: The tier of the certificate + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ClientCertMetadata' + description: | + OK. + The Certificate updated successfully. + headers: + Location: + description: | + The URL of the newly created resource. + explode: false + schema: + type: string + style: simple + Content-Type: + description: | + The content type of the body. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + example: + code: 400 + message: Bad Request + description: Invalid request or validation error + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Bad Request. Invalid request or validation error. + "404": + content: + application/json: + example: + code: 404 + message: Not Found + description: The specified resource does not exist + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Not Found. The specified resource does not exist. + "500": + content: + application/json: + example: + code: 500 + message: Internal Server Error + description: The server encountered an internal error. Please contact + administrator. + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Internal Server Error. + security: + - OAuth2Security: + - apim:api_create + - apim:api_manage + - apim:client_certificates_update + - apim:client_certificates_manage + summary: Update a Certificate + tags: + - Client Certificates + x-code-samples: + - lang: Curl + source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + -H "Content-Type: multipart/form-data" -F certificate=@test.crt -F alias=wso2carbon + -F apiId=fea749dd-d548-4a8b-b308-34903b39a34b -F tier=Gold "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certificates/wso2carbon"' + x-contentType: multipart/form-data + x-accepts: application/json + /apis/{apiId}/client-certificates/{alias}/content: + get: + description: | + This operation can be used to download a certificate which matches the given alias. + operationId: getAPIClientCertificateContentByAlias + parameters: + - description: | + **API ID** consisting of the **UUID** of the API. + explode: false + in: path + name: apiId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: alias + required: true + schema: + type: string + style: simple + responses: + "200": + content: {} + description: | + OK. + headers: + Content-Type: + description: | + The content type of the body. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + example: + code: 400 + message: Bad Request + description: Invalid request or validation error + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Bad Request. Invalid request or validation error. + "404": + content: + application/json: + example: + code: 404 + message: Not Found + description: The specified resource does not exist + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Not Found. The specified resource does not exist. + "500": + content: + application/json: + example: + code: 500 + message: Internal Server Error + description: The server encountered an internal error. Please contact + administrator. + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Internal Server Error. + security: + - OAuth2Security: + - apim:api_view + - apim:api_manage + - apim:client_certificates_view + - apim:client_certificates_manage + summary: Download a Certificate + tags: + - Client Certificates + x-code-samples: + - lang: Curl + source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certificates/wso2carbon/content"' + x-accepts: application/json + /apis/{apiId}/client-certs/{keyType}: + get: + description: | + This operation can be used to retrieve and search the uploaded client certificates of a given key type. + operationId: getAPIClientCertificatesByKeyType + parameters: + - description: Key type for the certificate + explode: false + in: path + name: keyType + required: true + schema: + type: string + style: simple + - description: | + Maximum size of resource array to return. + explode: true + in: query + name: limit + required: false + schema: + default: 25 + type: integer + style: form + - description: | + Starting point within the complete list of items qualified. + explode: true + in: query + name: offset + required: false + schema: + default: 0 + type: integer + style: form + - description: Alias for the client certificate + explode: true + in: query + name: alias + required: false + schema: + type: string + style: form + - description: | + **API ID** consisting of the **UUID** of the API. + explode: false + in: path + name: apiId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ClientCertificates' + description: | + OK. Successful response with the list of matching certificate information in the body. + headers: + Content-Type: + description: | + The content type of the body. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + example: + code: 400 + message: Bad Request + description: Invalid request or validation error + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Bad Request. Invalid request or validation error. + "500": + content: + application/json: + example: + code: 500 + message: Internal Server Error + description: The server encountered an internal error. Please contact + administrator. + moreInfo: "" + error: [] + schema: + $ref: '#/components/schemas/Error' + description: Internal Server Error. + security: + - OAuth2Security: + - apim:api_view + - apim:api_manage + - apim:client_certificates_view + - apim:client_certificates_manage + summary: Retrieve/ Search Uploaded Client Certificates of a given key type + tags: + - Client Certificates + x-code-samples: + - lang: Curl + source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certs/PRODUCTION?alias=wso2carbon"' + x-accepts: application/json + post: + description: | + This operation can be used to upload a new certificate for an endpoint of the given type. + operationId: addAPIClientCertificateOfGivenKeyType + parameters: + - description: Key type for the certificate + explode: false + in: path + name: keyType + required: true + schema: + type: string + style: simple + - description: | + **API ID** consisting of the **UUID** of the API. + explode: false + in: path + name: apiId + required: true + schema: + type: string + style: simple + requestBody: + content: + multipart/form-data: + schema: + properties: + certificate: + description: The certificate that needs to be uploaded. + format: binary + type: string + alias: + description: Alias for the certificate + maxLength: 30 + minLength: 1 + type: string + tier: + description: API tier to which the certificate should be applied. type: string required: - alias @@ -8438,22 +9025,30 @@ paths: - apim:api_manage - apim:client_certificates_add - apim:client_certificates_manage - summary: Upload a New Certificate + summary: Upload a New Certificate of the given key type tags: - Client Certificates x-code-samples: - lang: Curl source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -H "Content-Type: multipart/form-data" -F certificate=@test.crt -F alias=wso2carbon - -F apiId=fea749dd-d548-4a8b-b308-34903b39a34b -F tier=Gold "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certificates"' + -F tier=Gold "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certs/PRODUCTION"' x-contentType: multipart/form-data x-accepts: application/json - /apis/{apiId}/client-certificates/{alias}: + /apis/{apiId}/client-certs/{keyType}/{alias}: delete: description: | - This operation can be used to delete an uploaded certificate. - operationId: deleteAPIClientCertificateByAlias + This operation can be used to delete an uploaded certificate of a given key type. + operationId: deleteAPIClientCertificateByKeyTypeAndAlias parameters: + - description: Key type for the certificate + explode: false + in: path + name: keyType + required: true + schema: + type: string + style: simple - description: | The alias of the certificate that should be deleted. explode: false @@ -8528,7 +9123,7 @@ paths: - apim:api_create - apim:api_manage - apim:client_certificates_update - summary: Delete a Certificate + summary: Delete a Certificate of a Given Key Type tags: - Client Certificates x-code-samples: @@ -8538,9 +9133,17 @@ paths: x-accepts: application/json get: description: | - This operation can be used to get the information about a certificate. - operationId: getAPIClientCertificateByAlias + This operation can be used to get the information about a certificate of a given key type. + operationId: getAPIClientCertificateByKeyTypeAndAlias parameters: + - description: Key type for the certificate + explode: false + in: path + name: keyType + required: true + schema: + type: string + style: simple - explode: false in: path name: alias @@ -8616,19 +9219,27 @@ paths: - apim:api_manage - apim:client_certificates_view - apim:client_certificates_manage - summary: Get the Certificate Information + summary: Get the Certificate Information of a Given Key Type tags: - Client Certificates x-code-samples: - lang: Curl source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" - "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certificates/wso2carbon"' + "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certs/PRODUCTION/wso2carbon"' x-accepts: application/json put: description: | - This operation can be used to update an uploaded certificate. - operationId: updateAPIClientCertificateByAlias + This operation can be used to update an uploaded certificate of a given key type. + operationId: updateAPIClientCertificateByKeyTypeAndAlias parameters: + - description: Key type for the certificate + explode: false + in: path + name: keyType + required: true + schema: + type: string + style: simple - description: Alias for the certificate explode: false in: path @@ -8660,9 +9271,6 @@ paths: tier: description: The tier of the certificate type: string - keyType: - description: The key type of the certificate - type: string responses: "200": content: @@ -8730,21 +9338,21 @@ paths: - apim:api_manage - apim:client_certificates_update - apim:client_certificates_manage - summary: Update a Certificate + summary: Update a Certificate of a Given Key Type tags: - Client Certificates x-code-samples: - lang: Curl source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -H "Content-Type: multipart/form-data" -F certificate=@test.crt -F alias=wso2carbon - -F apiId=fea749dd-d548-4a8b-b308-34903b39a34b -F tier=Gold "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certificates/wso2carbon"' + -F apiId=fea749dd-d548-4a8b-b308-34903b39a34b -F tier=Gold "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certs/PRODUCTION/wso2carbon"' x-contentType: multipart/form-data x-accepts: application/json - /apis/{apiId}/client-certificates/{alias}/content: + /apis/{apiId}/client-certs/{keyType}/{alias}/content: get: description: | - This operation can be used to download a certificate which matches the given alias. - operationId: getAPIClientCertificateContentByAlias + This operation can be used to download a certificate which matches the given alias and key type. + operationId: getAPIClientCertificateContentByKeyTypeAndAlias parameters: - description: | **API ID** consisting of the **UUID** of the API. @@ -8762,6 +9370,15 @@ paths: schema: type: string style: simple + - description: | + The key type of the certificate that should be deleted. + explode: false + in: path + name: keyType + required: true + schema: + type: string + style: simple responses: "200": content: {} @@ -8818,13 +9435,14 @@ paths: - apim:api_manage - apim:client_certificates_view - apim:client_certificates_manage - summary: Download a Certificate + summary: Download a Certificate of Given Key Type tags: - Client Certificates x-code-samples: - lang: Curl source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" - "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certificates/wso2carbon/content"' + "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certs/PRODUCTION/wso2carbon/content" + > test.crt' x-accepts: application/json /endpoint-certificates: get: @@ -19802,11 +20420,9 @@ components: certificates: - tier: Gold alias: wso2carbon - keyType: PRODUCTION apiId: 64eca60b-2e55-4c38-8603-e9e6bad7d809 - tier: Gold alias: wso2carbon - keyType: PRODUCTION apiId: 64eca60b-2e55-4c38-8603-e9e6bad7d809 count: 1 properties: @@ -19826,7 +20442,6 @@ components: example: tier: Gold alias: wso2carbon - keyType: PRODUCTION apiId: 64eca60b-2e55-4c38-8603-e9e6bad7d809 properties: alias: @@ -19838,9 +20453,6 @@ components: tier: example: Gold type: string - keyType: - default: PRODUCTION - type: string title: Client certificate meta data type: object LifecycleState: diff --git a/modules/integration/tests-common/clients/publisher/docs/ClientCertMetadataDTO.md b/modules/integration/tests-common/clients/publisher/docs/ClientCertMetadataDTO.md index 27278434cb..08e52569cb 100644 --- a/modules/integration/tests-common/clients/publisher/docs/ClientCertMetadataDTO.md +++ b/modules/integration/tests-common/clients/publisher/docs/ClientCertMetadataDTO.md @@ -10,7 +10,6 @@ Name | Type | Description | Notes **alias** | **String** | | [optional] **apiId** | **String** | | [optional] **tier** | **String** | | [optional] -**keyType** | **String** | | [optional] diff --git a/modules/integration/tests-common/clients/publisher/docs/ClientCertificatesApi.md b/modules/integration/tests-common/clients/publisher/docs/ClientCertificatesApi.md index df7e327206..1d440bcd11 100644 --- a/modules/integration/tests-common/clients/publisher/docs/ClientCertificatesApi.md +++ b/modules/integration/tests-common/clients/publisher/docs/ClientCertificatesApi.md @@ -5,16 +5,22 @@ All URIs are relative to *https://apis.wso2.com/api/am/publisher/v4* Method | HTTP request | Description ------------- | ------------- | ------------- [**addAPIClientCertificate**](ClientCertificatesApi.md#addAPIClientCertificate) | **POST** /apis/{apiId}/client-certificates | Upload a New Certificate +[**addAPIClientCertificateOfGivenKeyType**](ClientCertificatesApi.md#addAPIClientCertificateOfGivenKeyType) | **POST** /apis/{apiId}/client-certs/{keyType} | Upload a New Certificate of the given key type [**deleteAPIClientCertificateByAlias**](ClientCertificatesApi.md#deleteAPIClientCertificateByAlias) | **DELETE** /apis/{apiId}/client-certificates/{alias} | Delete a Certificate +[**deleteAPIClientCertificateByKeyTypeAndAlias**](ClientCertificatesApi.md#deleteAPIClientCertificateByKeyTypeAndAlias) | **DELETE** /apis/{apiId}/client-certs/{keyType}/{alias} | Delete a Certificate of a Given Key Type [**getAPIClientCertificateByAlias**](ClientCertificatesApi.md#getAPIClientCertificateByAlias) | **GET** /apis/{apiId}/client-certificates/{alias} | Get the Certificate Information +[**getAPIClientCertificateByKeyTypeAndAlias**](ClientCertificatesApi.md#getAPIClientCertificateByKeyTypeAndAlias) | **GET** /apis/{apiId}/client-certs/{keyType}/{alias} | Get the Certificate Information of a Given Key Type [**getAPIClientCertificateContentByAlias**](ClientCertificatesApi.md#getAPIClientCertificateContentByAlias) | **GET** /apis/{apiId}/client-certificates/{alias}/content | Download a Certificate +[**getAPIClientCertificateContentByKeyTypeAndAlias**](ClientCertificatesApi.md#getAPIClientCertificateContentByKeyTypeAndAlias) | **GET** /apis/{apiId}/client-certs/{keyType}/{alias}/content | Download a Certificate of Given Key Type [**getAPIClientCertificates**](ClientCertificatesApi.md#getAPIClientCertificates) | **GET** /apis/{apiId}/client-certificates | Retrieve/ Search Uploaded Client Certificates +[**getAPIClientCertificatesByKeyType**](ClientCertificatesApi.md#getAPIClientCertificatesByKeyType) | **GET** /apis/{apiId}/client-certs/{keyType} | Retrieve/ Search Uploaded Client Certificates of a given key type [**updateAPIClientCertificateByAlias**](ClientCertificatesApi.md#updateAPIClientCertificateByAlias) | **PUT** /apis/{apiId}/client-certificates/{alias} | Update a Certificate +[**updateAPIClientCertificateByKeyTypeAndAlias**](ClientCertificatesApi.md#updateAPIClientCertificateByKeyTypeAndAlias) | **PUT** /apis/{apiId}/client-certs/{keyType}/{alias} | Update a Certificate of a Given Key Type # **addAPIClientCertificate** -> ClientCertMetadataDTO addAPIClientCertificate(apiId, certificate, alias, tier, keyType) +> ClientCertMetadataDTO addAPIClientCertificate(apiId, certificate, alias, tier) Upload a New Certificate @@ -44,9 +50,8 @@ public class Example { File certificate = new File("/path/to/file"); // File | The certificate that needs to be uploaded. String alias = "alias_example"; // String | Alias for the certificate String tier = "tier_example"; // String | api tier to which the certificate should be applied. - String keyType = "keyType_example"; // String | key type to which the certificate should be applied. try { - ClientCertMetadataDTO result = apiInstance.addAPIClientCertificate(apiId, certificate, alias, tier, keyType); + ClientCertMetadataDTO result = apiInstance.addAPIClientCertificate(apiId, certificate, alias, tier); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ClientCertificatesApi#addAPIClientCertificate"); @@ -67,7 +72,83 @@ Name | Type | Description | Notes **certificate** | **File**| The certificate that needs to be uploaded. | **alias** | **String**| Alias for the certificate | **tier** | **String**| api tier to which the certificate should be applied. | - **keyType** | **String**| key type to which the certificate should be applied. | [optional] + +### Return type + +[**ClientCertMetadataDTO**](ClientCertMetadataDTO.md) + +### Authorization + +[OAuth2Security](../README.md#OAuth2Security) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK. The Certificate added successfully. | * Location - The URL of the newly created resource.
* Content-Type - The content type of the body.
| +**400** | Bad Request. Invalid request or validation error. | - | +**500** | Internal Server Error. | - | + + +# **addAPIClientCertificateOfGivenKeyType** +> ClientCertMetadataDTO addAPIClientCertificateOfGivenKeyType(keyType, apiId, certificate, alias, tier) + +Upload a New Certificate of the given key type + +This operation can be used to upload a new certificate for an endpoint of the given type. + +### Example +```java +// Import classes: +import org.wso2.am.integration.clients.publisher.api.ApiClient; +import org.wso2.am.integration.clients.publisher.api.ApiException; +import org.wso2.am.integration.clients.publisher.api.Configuration; +import org.wso2.am.integration.clients.publisher.api.auth.*; +import org.wso2.am.integration.clients.publisher.api.models.*; +import org.wso2.am.integration.clients.publisher.api.v1.ClientCertificatesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://apis.wso2.com/api/am/publisher/v4"); + + // Configure OAuth2 access token for authorization: OAuth2Security + OAuth OAuth2Security = (OAuth) defaultClient.getAuthentication("OAuth2Security"); + OAuth2Security.setAccessToken("YOUR ACCESS TOKEN"); + + ClientCertificatesApi apiInstance = new ClientCertificatesApi(defaultClient); + String keyType = "keyType_example"; // String | Key type for the certificate + String apiId = "apiId_example"; // String | **API ID** consisting of the **UUID** of the API. + File certificate = new File("/path/to/file"); // File | The certificate that needs to be uploaded. + String alias = "alias_example"; // String | Alias for the certificate + String tier = "tier_example"; // String | API tier to which the certificate should be applied. + try { + ClientCertMetadataDTO result = apiInstance.addAPIClientCertificateOfGivenKeyType(keyType, apiId, certificate, alias, tier); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ClientCertificatesApi#addAPIClientCertificateOfGivenKeyType"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **keyType** | **String**| Key type for the certificate | + **apiId** | **String**| **API ID** consisting of the **UUID** of the API. | + **certificate** | **File**| The certificate that needs to be uploaded. | + **alias** | **String**| Alias for the certificate | + **tier** | **String**| API tier to which the certificate should be applied. | ### Return type @@ -160,6 +241,79 @@ null (empty response body) **404** | Not Found. The specified resource does not exist. | - | **500** | Internal Server Error. | - | + +# **deleteAPIClientCertificateByKeyTypeAndAlias** +> deleteAPIClientCertificateByKeyTypeAndAlias(keyType, alias, apiId) + +Delete a Certificate of a Given Key Type + +This operation can be used to delete an uploaded certificate of a given key type. + +### Example +```java +// Import classes: +import org.wso2.am.integration.clients.publisher.api.ApiClient; +import org.wso2.am.integration.clients.publisher.api.ApiException; +import org.wso2.am.integration.clients.publisher.api.Configuration; +import org.wso2.am.integration.clients.publisher.api.auth.*; +import org.wso2.am.integration.clients.publisher.api.models.*; +import org.wso2.am.integration.clients.publisher.api.v1.ClientCertificatesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://apis.wso2.com/api/am/publisher/v4"); + + // Configure OAuth2 access token for authorization: OAuth2Security + OAuth OAuth2Security = (OAuth) defaultClient.getAuthentication("OAuth2Security"); + OAuth2Security.setAccessToken("YOUR ACCESS TOKEN"); + + ClientCertificatesApi apiInstance = new ClientCertificatesApi(defaultClient); + String keyType = "keyType_example"; // String | Key type for the certificate + String alias = "alias_example"; // String | The alias of the certificate that should be deleted. + String apiId = "apiId_example"; // String | **API ID** consisting of the **UUID** of the API. + try { + apiInstance.deleteAPIClientCertificateByKeyTypeAndAlias(keyType, alias, apiId); + } catch (ApiException e) { + System.err.println("Exception when calling ClientCertificatesApi#deleteAPIClientCertificateByKeyTypeAndAlias"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **keyType** | **String**| Key type for the certificate | + **alias** | **String**| The alias of the certificate that should be deleted. | + **apiId** | **String**| **API ID** consisting of the **UUID** of the API. | + +### Return type + +null (empty response body) + +### Authorization + +[OAuth2Security](../README.md#OAuth2Security) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK. The Certificate deleted successfully. | * Content-Type - The content type of the body.
| +**400** | Bad Request. Invalid request or validation error. | - | +**404** | Not Found. The specified resource does not exist. | - | +**500** | Internal Server Error. | - | + # **getAPIClientCertificateByAlias** > CertificateInfoDTO getAPIClientCertificateByAlias(alias, apiId) @@ -232,6 +386,80 @@ Name | Type | Description | Notes **404** | Not Found. The specified resource does not exist. | - | **500** | Internal Server Error. | - | + +# **getAPIClientCertificateByKeyTypeAndAlias** +> CertificateInfoDTO getAPIClientCertificateByKeyTypeAndAlias(keyType, alias, apiId) + +Get the Certificate Information of a Given Key Type + +This operation can be used to get the information about a certificate of a given key type. + +### Example +```java +// Import classes: +import org.wso2.am.integration.clients.publisher.api.ApiClient; +import org.wso2.am.integration.clients.publisher.api.ApiException; +import org.wso2.am.integration.clients.publisher.api.Configuration; +import org.wso2.am.integration.clients.publisher.api.auth.*; +import org.wso2.am.integration.clients.publisher.api.models.*; +import org.wso2.am.integration.clients.publisher.api.v1.ClientCertificatesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://apis.wso2.com/api/am/publisher/v4"); + + // Configure OAuth2 access token for authorization: OAuth2Security + OAuth OAuth2Security = (OAuth) defaultClient.getAuthentication("OAuth2Security"); + OAuth2Security.setAccessToken("YOUR ACCESS TOKEN"); + + ClientCertificatesApi apiInstance = new ClientCertificatesApi(defaultClient); + String keyType = "keyType_example"; // String | Key type for the certificate + String alias = "alias_example"; // String | + String apiId = "apiId_example"; // String | **API ID** consisting of the **UUID** of the API. + try { + CertificateInfoDTO result = apiInstance.getAPIClientCertificateByKeyTypeAndAlias(keyType, alias, apiId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ClientCertificatesApi#getAPIClientCertificateByKeyTypeAndAlias"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **keyType** | **String**| Key type for the certificate | + **alias** | **String**| | + **apiId** | **String**| **API ID** consisting of the **UUID** of the API. | + +### Return type + +[**CertificateInfoDTO**](CertificateInfoDTO.md) + +### Authorization + +[OAuth2Security](../README.md#OAuth2Security) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK. | * Content-Type - The content type of the body.
| +**400** | Bad Request. Invalid request or validation error. | - | +**404** | Not Found. The specified resource does not exist. | - | +**500** | Internal Server Error. | - | + # **getAPIClientCertificateContentByAlias** > getAPIClientCertificateContentByAlias(apiId, alias) @@ -303,6 +531,79 @@ null (empty response body) **404** | Not Found. The specified resource does not exist. | - | **500** | Internal Server Error. | - | + +# **getAPIClientCertificateContentByKeyTypeAndAlias** +> getAPIClientCertificateContentByKeyTypeAndAlias(apiId, alias, keyType) + +Download a Certificate of Given Key Type + +This operation can be used to download a certificate which matches the given alias and key type. + +### Example +```java +// Import classes: +import org.wso2.am.integration.clients.publisher.api.ApiClient; +import org.wso2.am.integration.clients.publisher.api.ApiException; +import org.wso2.am.integration.clients.publisher.api.Configuration; +import org.wso2.am.integration.clients.publisher.api.auth.*; +import org.wso2.am.integration.clients.publisher.api.models.*; +import org.wso2.am.integration.clients.publisher.api.v1.ClientCertificatesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://apis.wso2.com/api/am/publisher/v4"); + + // Configure OAuth2 access token for authorization: OAuth2Security + OAuth OAuth2Security = (OAuth) defaultClient.getAuthentication("OAuth2Security"); + OAuth2Security.setAccessToken("YOUR ACCESS TOKEN"); + + ClientCertificatesApi apiInstance = new ClientCertificatesApi(defaultClient); + String apiId = "apiId_example"; // String | **API ID** consisting of the **UUID** of the API. + String alias = "alias_example"; // String | + String keyType = "keyType_example"; // String | The key type of the certificate that should be deleted. + try { + apiInstance.getAPIClientCertificateContentByKeyTypeAndAlias(apiId, alias, keyType); + } catch (ApiException e) { + System.err.println("Exception when calling ClientCertificatesApi#getAPIClientCertificateContentByKeyTypeAndAlias"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **apiId** | **String**| **API ID** consisting of the **UUID** of the API. | + **alias** | **String**| | + **keyType** | **String**| The key type of the certificate that should be deleted. | + +### Return type + +null (empty response body) + +### Authorization + +[OAuth2Security](../README.md#OAuth2Security) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK. | * Content-Type - The content type of the body.
| +**400** | Bad Request. Invalid request or validation error. | - | +**404** | Not Found. The specified resource does not exist. | - | +**500** | Internal Server Error. | - | + # **getAPIClientCertificates** > ClientCertificatesDTO getAPIClientCertificates(apiId, limit, offset, alias) @@ -378,9 +679,86 @@ Name | Type | Description | Notes **400** | Bad Request. Invalid request or validation error. | - | **500** | Internal Server Error. | - | + +# **getAPIClientCertificatesByKeyType** +> ClientCertificatesDTO getAPIClientCertificatesByKeyType(keyType, apiId, limit, offset, alias) + +Retrieve/ Search Uploaded Client Certificates of a given key type + +This operation can be used to retrieve and search the uploaded client certificates of a given key type. + +### Example +```java +// Import classes: +import org.wso2.am.integration.clients.publisher.api.ApiClient; +import org.wso2.am.integration.clients.publisher.api.ApiException; +import org.wso2.am.integration.clients.publisher.api.Configuration; +import org.wso2.am.integration.clients.publisher.api.auth.*; +import org.wso2.am.integration.clients.publisher.api.models.*; +import org.wso2.am.integration.clients.publisher.api.v1.ClientCertificatesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://apis.wso2.com/api/am/publisher/v4"); + + // Configure OAuth2 access token for authorization: OAuth2Security + OAuth OAuth2Security = (OAuth) defaultClient.getAuthentication("OAuth2Security"); + OAuth2Security.setAccessToken("YOUR ACCESS TOKEN"); + + ClientCertificatesApi apiInstance = new ClientCertificatesApi(defaultClient); + String keyType = "keyType_example"; // String | Key type for the certificate + String apiId = "apiId_example"; // String | **API ID** consisting of the **UUID** of the API. + Integer limit = 25; // Integer | Maximum size of resource array to return. + Integer offset = 0; // Integer | Starting point within the complete list of items qualified. + String alias = "alias_example"; // String | Alias for the client certificate + try { + ClientCertificatesDTO result = apiInstance.getAPIClientCertificatesByKeyType(keyType, apiId, limit, offset, alias); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ClientCertificatesApi#getAPIClientCertificatesByKeyType"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **keyType** | **String**| Key type for the certificate | + **apiId** | **String**| **API ID** consisting of the **UUID** of the API. | + **limit** | **Integer**| Maximum size of resource array to return. | [optional] [default to 25] + **offset** | **Integer**| Starting point within the complete list of items qualified. | [optional] [default to 0] + **alias** | **String**| Alias for the client certificate | [optional] + +### Return type + +[**ClientCertificatesDTO**](ClientCertificatesDTO.md) + +### Authorization + +[OAuth2Security](../README.md#OAuth2Security) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK. Successful response with the list of matching certificate information in the body. | * Content-Type - The content type of the body.
| +**400** | Bad Request. Invalid request or validation error. | - | +**500** | Internal Server Error. | - | + # **updateAPIClientCertificateByAlias** -> ClientCertMetadataDTO updateAPIClientCertificateByAlias(alias, apiId, certificate, tier, keyType) +> ClientCertMetadataDTO updateAPIClientCertificateByAlias(alias, apiId, certificate, tier) Update a Certificate @@ -410,9 +788,8 @@ public class Example { String apiId = "apiId_example"; // String | **API ID** consisting of the **UUID** of the API. File certificate = new File("/path/to/file"); // File | The certificate that needs to be uploaded. String tier = "tier_example"; // String | The tier of the certificate - String keyType = "keyType_example"; // String | The key type of the certificate try { - ClientCertMetadataDTO result = apiInstance.updateAPIClientCertificateByAlias(alias, apiId, certificate, tier, keyType); + ClientCertMetadataDTO result = apiInstance.updateAPIClientCertificateByAlias(alias, apiId, certificate, tier); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ClientCertificatesApi#updateAPIClientCertificateByAlias"); @@ -433,7 +810,84 @@ Name | Type | Description | Notes **apiId** | **String**| **API ID** consisting of the **UUID** of the API. | **certificate** | **File**| The certificate that needs to be uploaded. | [optional] **tier** | **String**| The tier of the certificate | [optional] - **keyType** | **String**| The key type of the certificate | [optional] + +### Return type + +[**ClientCertMetadataDTO**](ClientCertMetadataDTO.md) + +### Authorization + +[OAuth2Security](../README.md#OAuth2Security) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK. The Certificate updated successfully. | * Location - The URL of the newly created resource.
* Content-Type - The content type of the body.
| +**400** | Bad Request. Invalid request or validation error. | - | +**404** | Not Found. The specified resource does not exist. | - | +**500** | Internal Server Error. | - | + + +# **updateAPIClientCertificateByKeyTypeAndAlias** +> ClientCertMetadataDTO updateAPIClientCertificateByKeyTypeAndAlias(keyType, alias, apiId, certificate, tier) + +Update a Certificate of a Given Key Type + +This operation can be used to update an uploaded certificate of a given key type. + +### Example +```java +// Import classes: +import org.wso2.am.integration.clients.publisher.api.ApiClient; +import org.wso2.am.integration.clients.publisher.api.ApiException; +import org.wso2.am.integration.clients.publisher.api.Configuration; +import org.wso2.am.integration.clients.publisher.api.auth.*; +import org.wso2.am.integration.clients.publisher.api.models.*; +import org.wso2.am.integration.clients.publisher.api.v1.ClientCertificatesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://apis.wso2.com/api/am/publisher/v4"); + + // Configure OAuth2 access token for authorization: OAuth2Security + OAuth OAuth2Security = (OAuth) defaultClient.getAuthentication("OAuth2Security"); + OAuth2Security.setAccessToken("YOUR ACCESS TOKEN"); + + ClientCertificatesApi apiInstance = new ClientCertificatesApi(defaultClient); + String keyType = "keyType_example"; // String | Key type for the certificate + String alias = "alias_example"; // String | Alias for the certificate + String apiId = "apiId_example"; // String | **API ID** consisting of the **UUID** of the API. + File certificate = new File("/path/to/file"); // File | The certificate that needs to be uploaded. + String tier = "tier_example"; // String | The tier of the certificate + try { + ClientCertMetadataDTO result = apiInstance.updateAPIClientCertificateByKeyTypeAndAlias(keyType, alias, apiId, certificate, tier); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ClientCertificatesApi#updateAPIClientCertificateByKeyTypeAndAlias"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **keyType** | **String**| Key type for the certificate | + **alias** | **String**| Alias for the certificate | + **apiId** | **String**| **API ID** consisting of the **UUID** of the API. | + **certificate** | **File**| The certificate that needs to be uploaded. | [optional] + **tier** | **String**| The tier of the certificate | [optional] ### Return type diff --git a/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java b/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java index 02b62748fb..9067e74037 100644 --- a/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java +++ b/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ClientCertificatesApi.java @@ -64,7 +64,6 @@ public void setApiClient(ApiClient apiClient) { * @param certificate The certificate that needs to be uploaded. (required) * @param alias Alias for the certificate (required) * @param tier api tier to which the certificate should be applied. (required) - * @param keyType key type to which the certificate should be applied. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -76,7 +75,7 @@ public void setApiClient(ApiClient apiClient) { 500 Internal Server Error. - */ - public okhttp3.Call addAPIClientCertificateCall(String apiId, File certificate, String alias, String tier, String keyType, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addAPIClientCertificateCall(String apiId, File certificate, String alias, String tier, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -100,10 +99,6 @@ public okhttp3.Call addAPIClientCertificateCall(String apiId, File certificate, localVarFormParams.put("tier", tier); } - if (keyType != null) { - localVarFormParams.put("keyType", keyType); - } - final String[] localVarAccepts = { "application/json" }; @@ -123,7 +118,7 @@ public okhttp3.Call addAPIClientCertificateCall(String apiId, File certificate, } @SuppressWarnings("rawtypes") - private okhttp3.Call addAPIClientCertificateValidateBeforeCall(String apiId, File certificate, String alias, String tier, String keyType, final ApiCallback _callback) throws ApiException { + private okhttp3.Call addAPIClientCertificateValidateBeforeCall(String apiId, File certificate, String alias, String tier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'apiId' is set if (apiId == null) { @@ -146,7 +141,7 @@ private okhttp3.Call addAPIClientCertificateValidateBeforeCall(String apiId, Fil } - okhttp3.Call localVarCall = addAPIClientCertificateCall(apiId, certificate, alias, tier, keyType, _callback); + okhttp3.Call localVarCall = addAPIClientCertificateCall(apiId, certificate, alias, tier, _callback); return localVarCall; } @@ -158,7 +153,6 @@ private okhttp3.Call addAPIClientCertificateValidateBeforeCall(String apiId, Fil * @param certificate The certificate that needs to be uploaded. (required) * @param alias Alias for the certificate (required) * @param tier api tier to which the certificate should be applied. (required) - * @param keyType key type to which the certificate should be applied. (optional) * @return ClientCertMetadataDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -169,8 +163,8 @@ private okhttp3.Call addAPIClientCertificateValidateBeforeCall(String apiId, Fil 500 Internal Server Error. - */ - public ClientCertMetadataDTO addAPIClientCertificate(String apiId, File certificate, String alias, String tier, String keyType) throws ApiException { - ApiResponse localVarResp = addAPIClientCertificateWithHttpInfo(apiId, certificate, alias, tier, keyType); + public ClientCertMetadataDTO addAPIClientCertificate(String apiId, File certificate, String alias, String tier) throws ApiException { + ApiResponse localVarResp = addAPIClientCertificateWithHttpInfo(apiId, certificate, alias, tier); return localVarResp.getData(); } @@ -181,7 +175,6 @@ public ClientCertMetadataDTO addAPIClientCertificate(String apiId, File certific * @param certificate The certificate that needs to be uploaded. (required) * @param alias Alias for the certificate (required) * @param tier api tier to which the certificate should be applied. (required) - * @param keyType key type to which the certificate should be applied. (optional) * @return ApiResponse<ClientCertMetadataDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -192,8 +185,8 @@ public ClientCertMetadataDTO addAPIClientCertificate(String apiId, File certific 500 Internal Server Error. - */ - public ApiResponse addAPIClientCertificateWithHttpInfo(String apiId, File certificate, String alias, String tier, String keyType) throws ApiException { - okhttp3.Call localVarCall = addAPIClientCertificateValidateBeforeCall(apiId, certificate, alias, tier, keyType, null); + public ApiResponse addAPIClientCertificateWithHttpInfo(String apiId, File certificate, String alias, String tier) throws ApiException { + okhttp3.Call localVarCall = addAPIClientCertificateValidateBeforeCall(apiId, certificate, alias, tier, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -205,7 +198,6 @@ public ApiResponse addAPIClientCertificateWithHttpInfo(St * @param certificate The certificate that needs to be uploaded. (required) * @param alias Alias for the certificate (required) * @param tier api tier to which the certificate should be applied. (required) - * @param keyType key type to which the certificate should be applied. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -217,35 +209,37 @@ public ApiResponse addAPIClientCertificateWithHttpInfo(St 500 Internal Server Error. - */ - public okhttp3.Call addAPIClientCertificateAsync(String apiId, File certificate, String alias, String tier, String keyType, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addAPIClientCertificateAsync(String apiId, File certificate, String alias, String tier, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = addAPIClientCertificateValidateBeforeCall(apiId, certificate, alias, tier, keyType, _callback); + okhttp3.Call localVarCall = addAPIClientCertificateValidateBeforeCall(apiId, certificate, alias, tier, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for deleteAPIClientCertificateByAlias - * @param alias The alias of the certificate that should be deleted. (required) + * Build call for addAPIClientCertificateOfGivenKeyType + * @param keyType Key type for the certificate (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param certificate The certificate that needs to be uploaded. (required) + * @param alias Alias for the certificate (required) + * @param tier API tier to which the certificate should be applied. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + -
Status Code Description Response Headers
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
200 OK. The Certificate added successfully. * Location - The URL of the newly created resource.
* Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public okhttp3.Call deleteAPIClientCertificateByAliasCall(String alias, String apiId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addAPIClientCertificateOfGivenKeyTypeCall(String keyType, String apiId, File certificate, String alias, String tier, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/apis/{apiId}/client-certificates/{alias}" - .replaceAll("\\{" + "alias" + "\\}", localVarApiClient.escapeString(alias.toString())) + String localVarPath = "/apis/{apiId}/client-certs/{keyType}" + .replaceAll("\\{" + "keyType" + "\\}", localVarApiClient.escapeString(keyType.toString())) .replaceAll("\\{" + "apiId" + "\\}", localVarApiClient.escapeString(apiId.toString())); List localVarQueryParams = new ArrayList(); @@ -253,6 +247,18 @@ public okhttp3.Call deleteAPIClientCertificateByAliasCall(String alias, String a Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (certificate != null) { + localVarFormParams.put("certificate", certificate); + } + + if (alias != null) { + localVarFormParams.put("alias", alias); + } + + if (tier != null) { + localVarFormParams.put("tier", tier); + } + final String[] localVarAccepts = { "application/json" }; @@ -262,100 +268,125 @@ public okhttp3.Call deleteAPIClientCertificateByAliasCall(String alias, String a } final String[] localVarContentTypes = { - + "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "OAuth2Security" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteAPIClientCertificateByAliasValidateBeforeCall(String alias, String apiId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call addAPIClientCertificateOfGivenKeyTypeValidateBeforeCall(String keyType, String apiId, File certificate, String alias, String tier, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'alias' is set - if (alias == null) { - throw new ApiException("Missing the required parameter 'alias' when calling deleteAPIClientCertificateByAlias(Async)"); + // verify the required parameter 'keyType' is set + if (keyType == null) { + throw new ApiException("Missing the required parameter 'keyType' when calling addAPIClientCertificateOfGivenKeyType(Async)"); } // verify the required parameter 'apiId' is set if (apiId == null) { - throw new ApiException("Missing the required parameter 'apiId' when calling deleteAPIClientCertificateByAlias(Async)"); + throw new ApiException("Missing the required parameter 'apiId' when calling addAPIClientCertificateOfGivenKeyType(Async)"); + } + + // verify the required parameter 'certificate' is set + if (certificate == null) { + throw new ApiException("Missing the required parameter 'certificate' when calling addAPIClientCertificateOfGivenKeyType(Async)"); + } + + // verify the required parameter 'alias' is set + if (alias == null) { + throw new ApiException("Missing the required parameter 'alias' when calling addAPIClientCertificateOfGivenKeyType(Async)"); + } + + // verify the required parameter 'tier' is set + if (tier == null) { + throw new ApiException("Missing the required parameter 'tier' when calling addAPIClientCertificateOfGivenKeyType(Async)"); } - okhttp3.Call localVarCall = deleteAPIClientCertificateByAliasCall(alias, apiId, _callback); + okhttp3.Call localVarCall = addAPIClientCertificateOfGivenKeyTypeCall(keyType, apiId, certificate, alias, tier, _callback); return localVarCall; } /** - * Delete a Certificate - * This operation can be used to delete an uploaded certificate. - * @param alias The alias of the certificate that should be deleted. (required) + * Upload a New Certificate of the given key type + * This operation can be used to upload a new certificate for an endpoint of the given type. + * @param keyType Key type for the certificate (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param certificate The certificate that needs to be uploaded. (required) + * @param alias Alias for the certificate (required) + * @param tier API tier to which the certificate should be applied. (required) + * @return ClientCertMetadataDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + -
Status Code Description Response Headers
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
200 OK. The Certificate added successfully. * Location - The URL of the newly created resource.
* Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public void deleteAPIClientCertificateByAlias(String alias, String apiId) throws ApiException { - deleteAPIClientCertificateByAliasWithHttpInfo(alias, apiId); + public ClientCertMetadataDTO addAPIClientCertificateOfGivenKeyType(String keyType, String apiId, File certificate, String alias, String tier) throws ApiException { + ApiResponse localVarResp = addAPIClientCertificateOfGivenKeyTypeWithHttpInfo(keyType, apiId, certificate, alias, tier); + return localVarResp.getData(); } /** - * Delete a Certificate - * This operation can be used to delete an uploaded certificate. - * @param alias The alias of the certificate that should be deleted. (required) + * Upload a New Certificate of the given key type + * This operation can be used to upload a new certificate for an endpoint of the given type. + * @param keyType Key type for the certificate (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) - * @return ApiResponse<Void> + * @param certificate The certificate that needs to be uploaded. (required) + * @param alias Alias for the certificate (required) + * @param tier API tier to which the certificate should be applied. (required) + * @return ApiResponse<ClientCertMetadataDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + -
Status Code Description Response Headers
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
200 OK. The Certificate added successfully. * Location - The URL of the newly created resource.
* Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public ApiResponse deleteAPIClientCertificateByAliasWithHttpInfo(String alias, String apiId) throws ApiException { - okhttp3.Call localVarCall = deleteAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse addAPIClientCertificateOfGivenKeyTypeWithHttpInfo(String keyType, String apiId, File certificate, String alias, String tier) throws ApiException { + okhttp3.Call localVarCall = addAPIClientCertificateOfGivenKeyTypeValidateBeforeCall(keyType, apiId, certificate, alias, tier, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Delete a Certificate (asynchronously) - * This operation can be used to delete an uploaded certificate. - * @param alias The alias of the certificate that should be deleted. (required) + * Upload a New Certificate of the given key type (asynchronously) + * This operation can be used to upload a new certificate for an endpoint of the given type. + * @param keyType Key type for the certificate (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param certificate The certificate that needs to be uploaded. (required) + * @param alias Alias for the certificate (required) + * @param tier API tier to which the certificate should be applied. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + -
Status Code Description Response Headers
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
200 OK. The Certificate added successfully. * Location - The URL of the newly created resource.
* Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public okhttp3.Call deleteAPIClientCertificateByAliasAsync(String alias, String apiId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addAPIClientCertificateOfGivenKeyTypeAsync(String keyType, String apiId, File certificate, String alias, String tier, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = addAPIClientCertificateOfGivenKeyTypeValidateBeforeCall(keyType, apiId, certificate, alias, tier, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getAPIClientCertificateByAlias - * @param alias (required) + * Build call for deleteAPIClientCertificateByAlias + * @param alias The alias of the certificate that should be deleted. (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -363,13 +394,13 @@ public okhttp3.Call deleteAPIClientCertificateByAliasAsync(String alias, String * @http.response.details - +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public okhttp3.Call getAPIClientCertificateByAliasCall(String alias, String apiId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAPIClientCertificateByAliasCall(String alias, String apiId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -397,75 +428,72 @@ public okhttp3.Call getAPIClientCertificateByAliasCall(String alias, String apiI localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "OAuth2Security" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getAPIClientCertificateByAliasValidateBeforeCall(String alias, String apiId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteAPIClientCertificateByAliasValidateBeforeCall(String alias, String apiId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'alias' is set if (alias == null) { - throw new ApiException("Missing the required parameter 'alias' when calling getAPIClientCertificateByAlias(Async)"); + throw new ApiException("Missing the required parameter 'alias' when calling deleteAPIClientCertificateByAlias(Async)"); } // verify the required parameter 'apiId' is set if (apiId == null) { - throw new ApiException("Missing the required parameter 'apiId' when calling getAPIClientCertificateByAlias(Async)"); + throw new ApiException("Missing the required parameter 'apiId' when calling deleteAPIClientCertificateByAlias(Async)"); } - okhttp3.Call localVarCall = getAPIClientCertificateByAliasCall(alias, apiId, _callback); + okhttp3.Call localVarCall = deleteAPIClientCertificateByAliasCall(alias, apiId, _callback); return localVarCall; } /** - * Get the Certificate Information - * This operation can be used to get the information about a certificate. - * @param alias (required) + * Delete a Certificate + * This operation can be used to delete an uploaded certificate. + * @param alias The alias of the certificate that should be deleted. (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) - * @return CertificateInfoDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public CertificateInfoDTO getAPIClientCertificateByAlias(String alias, String apiId) throws ApiException { - ApiResponse localVarResp = getAPIClientCertificateByAliasWithHttpInfo(alias, apiId); - return localVarResp.getData(); + public void deleteAPIClientCertificateByAlias(String alias, String apiId) throws ApiException { + deleteAPIClientCertificateByAliasWithHttpInfo(alias, apiId); } /** - * Get the Certificate Information - * This operation can be used to get the information about a certificate. - * @param alias (required) + * Delete a Certificate + * This operation can be used to delete an uploaded certificate. + * @param alias The alias of the certificate that should be deleted. (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) - * @return ApiResponse<CertificateInfoDTO> + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public ApiResponse getAPIClientCertificateByAliasWithHttpInfo(String alias, String apiId) throws ApiException { - okhttp3.Call localVarCall = getAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse deleteAPIClientCertificateByAliasWithHttpInfo(String alias, String apiId) throws ApiException { + okhttp3.Call localVarCall = deleteAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, null); + return localVarApiClient.execute(localVarCall); } /** - * Get the Certificate Information (asynchronously) - * This operation can be used to get the information about a certificate. - * @param alias (required) + * Delete a Certificate (asynchronously) + * This operation can be used to delete an uploaded certificate. + * @param alias The alias of the certificate that should be deleted. (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -473,42 +501,43 @@ public ApiResponse getAPIClientCertificateByAliasWithHttpInf * @http.response.details - +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public okhttp3.Call getAPIClientCertificateByAliasAsync(String alias, String apiId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAPIClientCertificateByAliasAsync(String alias, String apiId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = deleteAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for getAPIClientCertificateContentByAlias + * Build call for deleteAPIClientCertificateByKeyTypeAndAlias + * @param keyType Key type for the certificate (required) + * @param alias The alias of the certificate that should be deleted. (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) - * @param alias (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public okhttp3.Call getAPIClientCertificateContentByAliasCall(String apiId, String alias, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAPIClientCertificateByKeyTypeAndAliasCall(String keyType, String alias, String apiId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/apis/{apiId}/client-certificates/{alias}/content" - .replaceAll("\\{" + "apiId" + "\\}", localVarApiClient.escapeString(apiId.toString())) - .replaceAll("\\{" + "alias" + "\\}", localVarApiClient.escapeString(alias.toString())); + String localVarPath = "/apis/{apiId}/client-certs/{keyType}/{alias}" + .replaceAll("\\{" + "keyType" + "\\}", localVarApiClient.escapeString(keyType.toString())) + .replaceAll("\\{" + "alias" + "\\}", localVarApiClient.escapeString(alias.toString())) + .replaceAll("\\{" + "apiId" + "\\}", localVarApiClient.escapeString(apiId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -530,129 +559,125 @@ public okhttp3.Call getAPIClientCertificateContentByAliasCall(String apiId, Stri localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "OAuth2Security" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getAPIClientCertificateContentByAliasValidateBeforeCall(String apiId, String alias, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteAPIClientCertificateByKeyTypeAndAliasValidateBeforeCall(String keyType, String alias, String apiId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'apiId' is set - if (apiId == null) { - throw new ApiException("Missing the required parameter 'apiId' when calling getAPIClientCertificateContentByAlias(Async)"); + // verify the required parameter 'keyType' is set + if (keyType == null) { + throw new ApiException("Missing the required parameter 'keyType' when calling deleteAPIClientCertificateByKeyTypeAndAlias(Async)"); } // verify the required parameter 'alias' is set if (alias == null) { - throw new ApiException("Missing the required parameter 'alias' when calling getAPIClientCertificateContentByAlias(Async)"); + throw new ApiException("Missing the required parameter 'alias' when calling deleteAPIClientCertificateByKeyTypeAndAlias(Async)"); + } + + // verify the required parameter 'apiId' is set + if (apiId == null) { + throw new ApiException("Missing the required parameter 'apiId' when calling deleteAPIClientCertificateByKeyTypeAndAlias(Async)"); } - okhttp3.Call localVarCall = getAPIClientCertificateContentByAliasCall(apiId, alias, _callback); + okhttp3.Call localVarCall = deleteAPIClientCertificateByKeyTypeAndAliasCall(keyType, alias, apiId, _callback); return localVarCall; } /** - * Download a Certificate - * This operation can be used to download a certificate which matches the given alias. + * Delete a Certificate of a Given Key Type + * This operation can be used to delete an uploaded certificate of a given key type. + * @param keyType Key type for the certificate (required) + * @param alias The alias of the certificate that should be deleted. (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) - * @param alias (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public void getAPIClientCertificateContentByAlias(String apiId, String alias) throws ApiException { - getAPIClientCertificateContentByAliasWithHttpInfo(apiId, alias); + public void deleteAPIClientCertificateByKeyTypeAndAlias(String keyType, String alias, String apiId) throws ApiException { + deleteAPIClientCertificateByKeyTypeAndAliasWithHttpInfo(keyType, alias, apiId); } /** - * Download a Certificate - * This operation can be used to download a certificate which matches the given alias. + * Delete a Certificate of a Given Key Type + * This operation can be used to delete an uploaded certificate of a given key type. + * @param keyType Key type for the certificate (required) + * @param alias The alias of the certificate that should be deleted. (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) - * @param alias (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public ApiResponse getAPIClientCertificateContentByAliasWithHttpInfo(String apiId, String alias) throws ApiException { - okhttp3.Call localVarCall = getAPIClientCertificateContentByAliasValidateBeforeCall(apiId, alias, null); + public ApiResponse deleteAPIClientCertificateByKeyTypeAndAliasWithHttpInfo(String keyType, String alias, String apiId) throws ApiException { + okhttp3.Call localVarCall = deleteAPIClientCertificateByKeyTypeAndAliasValidateBeforeCall(keyType, alias, apiId, null); return localVarApiClient.execute(localVarCall); } /** - * Download a Certificate (asynchronously) - * This operation can be used to download a certificate which matches the given alias. + * Delete a Certificate of a Given Key Type (asynchronously) + * This operation can be used to delete an uploaded certificate of a given key type. + * @param keyType Key type for the certificate (required) + * @param alias The alias of the certificate that should be deleted. (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) - * @param alias (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
200 OK. The Certificate deleted successfully. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public okhttp3.Call getAPIClientCertificateContentByAliasAsync(String apiId, String alias, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAPIClientCertificateByKeyTypeAndAliasAsync(String keyType, String alias, String apiId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAPIClientCertificateContentByAliasValidateBeforeCall(apiId, alias, _callback); + okhttp3.Call localVarCall = deleteAPIClientCertificateByKeyTypeAndAliasValidateBeforeCall(keyType, alias, apiId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for getAPIClientCertificates + * Build call for getAPIClientCertificateByAlias + * @param alias (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param alias Alias for the client certificate (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 OK. Successful response with the list of matching certificate information in the body. * Content-Type - The content type of the body.
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public okhttp3.Call getAPIClientCertificatesCall(String apiId, Integer limit, Integer offset, String alias, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAPIClientCertificateByAliasCall(String alias, String apiId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/apis/{apiId}/client-certificates" + String localVarPath = "/apis/{apiId}/client-certificates/{alias}" + .replaceAll("\\{" + "alias" + "\\}", localVarApiClient.escapeString(alias.toString())) .replaceAll("\\{" + "apiId" + "\\}", localVarApiClient.escapeString(apiId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - - if (alias != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("alias", alias)); - } - Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); @@ -675,44 +700,752 @@ public okhttp3.Call getAPIClientCertificatesCall(String apiId, Integer limit, In } @SuppressWarnings("rawtypes") - private okhttp3.Call getAPIClientCertificatesValidateBeforeCall(String apiId, Integer limit, Integer offset, String alias, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAPIClientCertificateByAliasValidateBeforeCall(String alias, String apiId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'alias' is set + if (alias == null) { + throw new ApiException("Missing the required parameter 'alias' when calling getAPIClientCertificateByAlias(Async)"); + } // verify the required parameter 'apiId' is set if (apiId == null) { - throw new ApiException("Missing the required parameter 'apiId' when calling getAPIClientCertificates(Async)"); + throw new ApiException("Missing the required parameter 'apiId' when calling getAPIClientCertificateByAlias(Async)"); } - okhttp3.Call localVarCall = getAPIClientCertificatesCall(apiId, limit, offset, alias, _callback); + okhttp3.Call localVarCall = getAPIClientCertificateByAliasCall(alias, apiId, _callback); return localVarCall; } /** - * Retrieve/ Search Uploaded Client Certificates - * This operation can be used to retrieve and search the uploaded client certificates. + * Get the Certificate Information + * This operation can be used to get the information about a certificate. + * @param alias (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) - * @param limit Maximum size of resource array to return. (optional, default to 25) - * @param offset Starting point within the complete list of items qualified. (optional, default to 0) - * @param alias Alias for the client certificate (optional) - * @return ClientCertificatesDTO + * @return CertificateInfoDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 OK. Successful response with the list of matching certificate information in the body. * Content-Type - The content type of the body.
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
*/ - public ClientCertificatesDTO getAPIClientCertificates(String apiId, Integer limit, Integer offset, String alias) throws ApiException { - ApiResponse localVarResp = getAPIClientCertificatesWithHttpInfo(apiId, limit, offset, alias); + public CertificateInfoDTO getAPIClientCertificateByAlias(String alias, String apiId) throws ApiException { + ApiResponse localVarResp = getAPIClientCertificateByAliasWithHttpInfo(alias, apiId); return localVarResp.getData(); } /** - * Retrieve/ Search Uploaded Client Certificates - * This operation can be used to retrieve and search the uploaded client certificates. + * Get the Certificate Information + * This operation can be used to get the information about a certificate. + * @param alias (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @return ApiResponse<CertificateInfoDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public ApiResponse getAPIClientCertificateByAliasWithHttpInfo(String alias, String apiId) throws ApiException { + okhttp3.Call localVarCall = getAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get the Certificate Information (asynchronously) + * This operation can be used to get the information about a certificate. + * @param alias (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public okhttp3.Call getAPIClientCertificateByAliasAsync(String alias, String apiId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAPIClientCertificateByKeyTypeAndAlias + * @param keyType Key type for the certificate (required) + * @param alias (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public okhttp3.Call getAPIClientCertificateByKeyTypeAndAliasCall(String keyType, String alias, String apiId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/{apiId}/client-certs/{keyType}/{alias}" + .replaceAll("\\{" + "keyType" + "\\}", localVarApiClient.escapeString(keyType.toString())) + .replaceAll("\\{" + "alias" + "\\}", localVarApiClient.escapeString(alias.toString())) + .replaceAll("\\{" + "apiId" + "\\}", localVarApiClient.escapeString(apiId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "OAuth2Security" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAPIClientCertificateByKeyTypeAndAliasValidateBeforeCall(String keyType, String alias, String apiId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'keyType' is set + if (keyType == null) { + throw new ApiException("Missing the required parameter 'keyType' when calling getAPIClientCertificateByKeyTypeAndAlias(Async)"); + } + + // verify the required parameter 'alias' is set + if (alias == null) { + throw new ApiException("Missing the required parameter 'alias' when calling getAPIClientCertificateByKeyTypeAndAlias(Async)"); + } + + // verify the required parameter 'apiId' is set + if (apiId == null) { + throw new ApiException("Missing the required parameter 'apiId' when calling getAPIClientCertificateByKeyTypeAndAlias(Async)"); + } + + + okhttp3.Call localVarCall = getAPIClientCertificateByKeyTypeAndAliasCall(keyType, alias, apiId, _callback); + return localVarCall; + + } + + /** + * Get the Certificate Information of a Given Key Type + * This operation can be used to get the information about a certificate of a given key type. + * @param keyType Key type for the certificate (required) + * @param alias (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @return CertificateInfoDTO + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public CertificateInfoDTO getAPIClientCertificateByKeyTypeAndAlias(String keyType, String alias, String apiId) throws ApiException { + ApiResponse localVarResp = getAPIClientCertificateByKeyTypeAndAliasWithHttpInfo(keyType, alias, apiId); + return localVarResp.getData(); + } + + /** + * Get the Certificate Information of a Given Key Type + * This operation can be used to get the information about a certificate of a given key type. + * @param keyType Key type for the certificate (required) + * @param alias (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @return ApiResponse<CertificateInfoDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public ApiResponse getAPIClientCertificateByKeyTypeAndAliasWithHttpInfo(String keyType, String alias, String apiId) throws ApiException { + okhttp3.Call localVarCall = getAPIClientCertificateByKeyTypeAndAliasValidateBeforeCall(keyType, alias, apiId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get the Certificate Information of a Given Key Type (asynchronously) + * This operation can be used to get the information about a certificate of a given key type. + * @param keyType Key type for the certificate (required) + * @param alias (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public okhttp3.Call getAPIClientCertificateByKeyTypeAndAliasAsync(String keyType, String alias, String apiId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAPIClientCertificateByKeyTypeAndAliasValidateBeforeCall(keyType, alias, apiId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAPIClientCertificateContentByAlias + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param alias (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public okhttp3.Call getAPIClientCertificateContentByAliasCall(String apiId, String alias, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/{apiId}/client-certificates/{alias}/content" + .replaceAll("\\{" + "apiId" + "\\}", localVarApiClient.escapeString(apiId.toString())) + .replaceAll("\\{" + "alias" + "\\}", localVarApiClient.escapeString(alias.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "OAuth2Security" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAPIClientCertificateContentByAliasValidateBeforeCall(String apiId, String alias, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'apiId' is set + if (apiId == null) { + throw new ApiException("Missing the required parameter 'apiId' when calling getAPIClientCertificateContentByAlias(Async)"); + } + + // verify the required parameter 'alias' is set + if (alias == null) { + throw new ApiException("Missing the required parameter 'alias' when calling getAPIClientCertificateContentByAlias(Async)"); + } + + + okhttp3.Call localVarCall = getAPIClientCertificateContentByAliasCall(apiId, alias, _callback); + return localVarCall; + + } + + /** + * Download a Certificate + * This operation can be used to download a certificate which matches the given alias. + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param alias (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public void getAPIClientCertificateContentByAlias(String apiId, String alias) throws ApiException { + getAPIClientCertificateContentByAliasWithHttpInfo(apiId, alias); + } + + /** + * Download a Certificate + * This operation can be used to download a certificate which matches the given alias. + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param alias (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public ApiResponse getAPIClientCertificateContentByAliasWithHttpInfo(String apiId, String alias) throws ApiException { + okhttp3.Call localVarCall = getAPIClientCertificateContentByAliasValidateBeforeCall(apiId, alias, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Download a Certificate (asynchronously) + * This operation can be used to download a certificate which matches the given alias. + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param alias (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public okhttp3.Call getAPIClientCertificateContentByAliasAsync(String apiId, String alias, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAPIClientCertificateContentByAliasValidateBeforeCall(apiId, alias, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getAPIClientCertificateContentByKeyTypeAndAlias + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param alias (required) + * @param keyType The key type of the certificate that should be deleted. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public okhttp3.Call getAPIClientCertificateContentByKeyTypeAndAliasCall(String apiId, String alias, String keyType, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/{apiId}/client-certs/{keyType}/{alias}/content" + .replaceAll("\\{" + "apiId" + "\\}", localVarApiClient.escapeString(apiId.toString())) + .replaceAll("\\{" + "alias" + "\\}", localVarApiClient.escapeString(alias.toString())) + .replaceAll("\\{" + "keyType" + "\\}", localVarApiClient.escapeString(keyType.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "OAuth2Security" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAPIClientCertificateContentByKeyTypeAndAliasValidateBeforeCall(String apiId, String alias, String keyType, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'apiId' is set + if (apiId == null) { + throw new ApiException("Missing the required parameter 'apiId' when calling getAPIClientCertificateContentByKeyTypeAndAlias(Async)"); + } + + // verify the required parameter 'alias' is set + if (alias == null) { + throw new ApiException("Missing the required parameter 'alias' when calling getAPIClientCertificateContentByKeyTypeAndAlias(Async)"); + } + + // verify the required parameter 'keyType' is set + if (keyType == null) { + throw new ApiException("Missing the required parameter 'keyType' when calling getAPIClientCertificateContentByKeyTypeAndAlias(Async)"); + } + + + okhttp3.Call localVarCall = getAPIClientCertificateContentByKeyTypeAndAliasCall(apiId, alias, keyType, _callback); + return localVarCall; + + } + + /** + * Download a Certificate of Given Key Type + * This operation can be used to download a certificate which matches the given alias and key type. + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param alias (required) + * @param keyType The key type of the certificate that should be deleted. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public void getAPIClientCertificateContentByKeyTypeAndAlias(String apiId, String alias, String keyType) throws ApiException { + getAPIClientCertificateContentByKeyTypeAndAliasWithHttpInfo(apiId, alias, keyType); + } + + /** + * Download a Certificate of Given Key Type + * This operation can be used to download a certificate which matches the given alias and key type. + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param alias (required) + * @param keyType The key type of the certificate that should be deleted. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public ApiResponse getAPIClientCertificateContentByKeyTypeAndAliasWithHttpInfo(String apiId, String alias, String keyType) throws ApiException { + okhttp3.Call localVarCall = getAPIClientCertificateContentByKeyTypeAndAliasValidateBeforeCall(apiId, alias, keyType, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Download a Certificate of Given Key Type (asynchronously) + * This operation can be used to download a certificate which matches the given alias and key type. + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param alias (required) + * @param keyType The key type of the certificate that should be deleted. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public okhttp3.Call getAPIClientCertificateContentByKeyTypeAndAliasAsync(String apiId, String alias, String keyType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAPIClientCertificateContentByKeyTypeAndAliasValidateBeforeCall(apiId, alias, keyType, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getAPIClientCertificates + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param limit Maximum size of resource array to return. (optional, default to 25) + * @param offset Starting point within the complete list of items qualified. (optional, default to 0) + * @param alias Alias for the client certificate (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK. Successful response with the list of matching certificate information in the body. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
500 Internal Server Error. -
+ */ + public okhttp3.Call getAPIClientCertificatesCall(String apiId, Integer limit, Integer offset, String alias, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/{apiId}/client-certificates" + .replaceAll("\\{" + "apiId" + "\\}", localVarApiClient.escapeString(apiId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (alias != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("alias", alias)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "OAuth2Security" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAPIClientCertificatesValidateBeforeCall(String apiId, Integer limit, Integer offset, String alias, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'apiId' is set + if (apiId == null) { + throw new ApiException("Missing the required parameter 'apiId' when calling getAPIClientCertificates(Async)"); + } + + + okhttp3.Call localVarCall = getAPIClientCertificatesCall(apiId, limit, offset, alias, _callback); + return localVarCall; + + } + + /** + * Retrieve/ Search Uploaded Client Certificates + * This operation can be used to retrieve and search the uploaded client certificates. + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param limit Maximum size of resource array to return. (optional, default to 25) + * @param offset Starting point within the complete list of items qualified. (optional, default to 0) + * @param alias Alias for the client certificate (optional) + * @return ClientCertificatesDTO + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK. Successful response with the list of matching certificate information in the body. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
500 Internal Server Error. -
+ */ + public ClientCertificatesDTO getAPIClientCertificates(String apiId, Integer limit, Integer offset, String alias) throws ApiException { + ApiResponse localVarResp = getAPIClientCertificatesWithHttpInfo(apiId, limit, offset, alias); + return localVarResp.getData(); + } + + /** + * Retrieve/ Search Uploaded Client Certificates + * This operation can be used to retrieve and search the uploaded client certificates. + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param limit Maximum size of resource array to return. (optional, default to 25) + * @param offset Starting point within the complete list of items qualified. (optional, default to 0) + * @param alias Alias for the client certificate (optional) + * @return ApiResponse<ClientCertificatesDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK. Successful response with the list of matching certificate information in the body. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
500 Internal Server Error. -
+ */ + public ApiResponse getAPIClientCertificatesWithHttpInfo(String apiId, Integer limit, Integer offset, String alias) throws ApiException { + okhttp3.Call localVarCall = getAPIClientCertificatesValidateBeforeCall(apiId, limit, offset, alias, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve/ Search Uploaded Client Certificates (asynchronously) + * This operation can be used to retrieve and search the uploaded client certificates. + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param limit Maximum size of resource array to return. (optional, default to 25) + * @param offset Starting point within the complete list of items qualified. (optional, default to 0) + * @param alias Alias for the client certificate (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK. Successful response with the list of matching certificate information in the body. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
500 Internal Server Error. -
+ */ + public okhttp3.Call getAPIClientCertificatesAsync(String apiId, Integer limit, Integer offset, String alias, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAPIClientCertificatesValidateBeforeCall(apiId, limit, offset, alias, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAPIClientCertificatesByKeyType + * @param keyType Key type for the certificate (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param limit Maximum size of resource array to return. (optional, default to 25) + * @param offset Starting point within the complete list of items qualified. (optional, default to 0) + * @param alias Alias for the client certificate (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK. Successful response with the list of matching certificate information in the body. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
500 Internal Server Error. -
+ */ + public okhttp3.Call getAPIClientCertificatesByKeyTypeCall(String keyType, String apiId, Integer limit, Integer offset, String alias, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/{apiId}/client-certs/{keyType}" + .replaceAll("\\{" + "keyType" + "\\}", localVarApiClient.escapeString(keyType.toString())) + .replaceAll("\\{" + "apiId" + "\\}", localVarApiClient.escapeString(apiId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (alias != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("alias", alias)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "OAuth2Security" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAPIClientCertificatesByKeyTypeValidateBeforeCall(String keyType, String apiId, Integer limit, Integer offset, String alias, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'keyType' is set + if (keyType == null) { + throw new ApiException("Missing the required parameter 'keyType' when calling getAPIClientCertificatesByKeyType(Async)"); + } + + // verify the required parameter 'apiId' is set + if (apiId == null) { + throw new ApiException("Missing the required parameter 'apiId' when calling getAPIClientCertificatesByKeyType(Async)"); + } + + + okhttp3.Call localVarCall = getAPIClientCertificatesByKeyTypeCall(keyType, apiId, limit, offset, alias, _callback); + return localVarCall; + + } + + /** + * Retrieve/ Search Uploaded Client Certificates of a given key type + * This operation can be used to retrieve and search the uploaded client certificates of a given key type. + * @param keyType Key type for the certificate (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param limit Maximum size of resource array to return. (optional, default to 25) + * @param offset Starting point within the complete list of items qualified. (optional, default to 0) + * @param alias Alias for the client certificate (optional) + * @return ClientCertificatesDTO + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK. Successful response with the list of matching certificate information in the body. * Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
500 Internal Server Error. -
+ */ + public ClientCertificatesDTO getAPIClientCertificatesByKeyType(String keyType, String apiId, Integer limit, Integer offset, String alias) throws ApiException { + ApiResponse localVarResp = getAPIClientCertificatesByKeyTypeWithHttpInfo(keyType, apiId, limit, offset, alias); + return localVarResp.getData(); + } + + /** + * Retrieve/ Search Uploaded Client Certificates of a given key type + * This operation can be used to retrieve and search the uploaded client certificates of a given key type. + * @param keyType Key type for the certificate (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param limit Maximum size of resource array to return. (optional, default to 25) * @param offset Starting point within the complete list of items qualified. (optional, default to 0) @@ -727,15 +1460,16 @@ public ClientCertificatesDTO getAPIClientCertificates(String apiId, Integer limi 500 Internal Server Error. - */ - public ApiResponse getAPIClientCertificatesWithHttpInfo(String apiId, Integer limit, Integer offset, String alias) throws ApiException { - okhttp3.Call localVarCall = getAPIClientCertificatesValidateBeforeCall(apiId, limit, offset, alias, null); + public ApiResponse getAPIClientCertificatesByKeyTypeWithHttpInfo(String keyType, String apiId, Integer limit, Integer offset, String alias) throws ApiException { + okhttp3.Call localVarCall = getAPIClientCertificatesByKeyTypeValidateBeforeCall(keyType, apiId, limit, offset, alias, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Retrieve/ Search Uploaded Client Certificates (asynchronously) - * This operation can be used to retrieve and search the uploaded client certificates. + * Retrieve/ Search Uploaded Client Certificates of a given key type (asynchronously) + * This operation can be used to retrieve and search the uploaded client certificates of a given key type. + * @param keyType Key type for the certificate (required) * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param limit Maximum size of resource array to return. (optional, default to 25) * @param offset Starting point within the complete list of items qualified. (optional, default to 0) @@ -751,9 +1485,9 @@ public ApiResponse getAPIClientCertificatesWithHttpInfo(S 500 Internal Server Error. - */ - public okhttp3.Call getAPIClientCertificatesAsync(String apiId, Integer limit, Integer offset, String alias, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAPIClientCertificatesByKeyTypeAsync(String keyType, String apiId, Integer limit, Integer offset, String alias, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAPIClientCertificatesValidateBeforeCall(apiId, limit, offset, alias, _callback); + okhttp3.Call localVarCall = getAPIClientCertificatesByKeyTypeValidateBeforeCall(keyType, apiId, limit, offset, alias, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -764,7 +1498,6 @@ public okhttp3.Call getAPIClientCertificatesAsync(String apiId, Integer limit, I * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param certificate The certificate that needs to be uploaded. (optional) * @param tier The tier of the certificate (optional) - * @param keyType The key type of the certificate (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -777,7 +1510,7 @@ public okhttp3.Call getAPIClientCertificatesAsync(String apiId, Integer limit, I 500 Internal Server Error. - */ - public okhttp3.Call updateAPIClientCertificateByAliasCall(String alias, String apiId, File certificate, String tier, String keyType, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAPIClientCertificateByAliasCall(String alias, String apiId, File certificate, String tier, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -798,10 +1531,6 @@ public okhttp3.Call updateAPIClientCertificateByAliasCall(String alias, String a localVarFormParams.put("tier", tier); } - if (keyType != null) { - localVarFormParams.put("keyType", keyType); - } - final String[] localVarAccepts = { "application/json" }; @@ -821,7 +1550,7 @@ public okhttp3.Call updateAPIClientCertificateByAliasCall(String alias, String a } @SuppressWarnings("rawtypes") - private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String alias, String apiId, File certificate, String tier, String keyType, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String alias, String apiId, File certificate, String tier, final ApiCallback _callback) throws ApiException { // verify the required parameter 'alias' is set if (alias == null) { @@ -834,7 +1563,7 @@ private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String } - okhttp3.Call localVarCall = updateAPIClientCertificateByAliasCall(alias, apiId, certificate, tier, keyType, _callback); + okhttp3.Call localVarCall = updateAPIClientCertificateByAliasCall(alias, apiId, certificate, tier, _callback); return localVarCall; } @@ -846,7 +1575,6 @@ private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param certificate The certificate that needs to be uploaded. (optional) * @param tier The tier of the certificate (optional) - * @param keyType The key type of the certificate (optional) * @return ClientCertMetadataDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -858,8 +1586,8 @@ private okhttp3.Call updateAPIClientCertificateByAliasValidateBeforeCall(String 500 Internal Server Error. - */ - public ClientCertMetadataDTO updateAPIClientCertificateByAlias(String alias, String apiId, File certificate, String tier, String keyType) throws ApiException { - ApiResponse localVarResp = updateAPIClientCertificateByAliasWithHttpInfo(alias, apiId, certificate, tier, keyType); + public ClientCertMetadataDTO updateAPIClientCertificateByAlias(String alias, String apiId, File certificate, String tier) throws ApiException { + ApiResponse localVarResp = updateAPIClientCertificateByAliasWithHttpInfo(alias, apiId, certificate, tier); return localVarResp.getData(); } @@ -870,7 +1598,6 @@ public ClientCertMetadataDTO updateAPIClientCertificateByAlias(String alias, Str * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param certificate The certificate that needs to be uploaded. (optional) * @param tier The tier of the certificate (optional) - * @param keyType The key type of the certificate (optional) * @return ApiResponse<ClientCertMetadataDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -882,8 +1609,8 @@ public ClientCertMetadataDTO updateAPIClientCertificateByAlias(String alias, Str 500 Internal Server Error. - */ - public ApiResponse updateAPIClientCertificateByAliasWithHttpInfo(String alias, String apiId, File certificate, String tier, String keyType) throws ApiException { - okhttp3.Call localVarCall = updateAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, certificate, tier, keyType, null); + public ApiResponse updateAPIClientCertificateByAliasWithHttpInfo(String alias, String apiId, File certificate, String tier) throws ApiException { + okhttp3.Call localVarCall = updateAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, certificate, tier, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -895,7 +1622,6 @@ public ApiResponse updateAPIClientCertificateByAliasWithH * @param apiId **API ID** consisting of the **UUID** of the API. (required) * @param certificate The certificate that needs to be uploaded. (optional) * @param tier The tier of the certificate (optional) - * @param keyType The key type of the certificate (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -908,9 +1634,168 @@ public ApiResponse updateAPIClientCertificateByAliasWithH 500 Internal Server Error. - */ - public okhttp3.Call updateAPIClientCertificateByAliasAsync(String alias, String apiId, File certificate, String tier, String keyType, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAPIClientCertificateByAliasAsync(String alias, String apiId, File certificate, String tier, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, certificate, tier, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateAPIClientCertificateByKeyTypeAndAlias + * @param keyType Key type for the certificate (required) + * @param alias Alias for the certificate (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param certificate The certificate that needs to be uploaded. (optional) + * @param tier The tier of the certificate (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. The Certificate updated successfully. * Location - The URL of the newly created resource.
* Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public okhttp3.Call updateAPIClientCertificateByKeyTypeAndAliasCall(String keyType, String alias, String apiId, File certificate, String tier, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/{apiId}/client-certs/{keyType}/{alias}" + .replaceAll("\\{" + "keyType" + "\\}", localVarApiClient.escapeString(keyType.toString())) + .replaceAll("\\{" + "alias" + "\\}", localVarApiClient.escapeString(alias.toString())) + .replaceAll("\\{" + "apiId" + "\\}", localVarApiClient.escapeString(apiId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + if (certificate != null) { + localVarFormParams.put("certificate", certificate); + } + + if (tier != null) { + localVarFormParams.put("tier", tier); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "OAuth2Security" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateAPIClientCertificateByKeyTypeAndAliasValidateBeforeCall(String keyType, String alias, String apiId, File certificate, String tier, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'keyType' is set + if (keyType == null) { + throw new ApiException("Missing the required parameter 'keyType' when calling updateAPIClientCertificateByKeyTypeAndAlias(Async)"); + } + + // verify the required parameter 'alias' is set + if (alias == null) { + throw new ApiException("Missing the required parameter 'alias' when calling updateAPIClientCertificateByKeyTypeAndAlias(Async)"); + } + + // verify the required parameter 'apiId' is set + if (apiId == null) { + throw new ApiException("Missing the required parameter 'apiId' when calling updateAPIClientCertificateByKeyTypeAndAlias(Async)"); + } + + + okhttp3.Call localVarCall = updateAPIClientCertificateByKeyTypeAndAliasCall(keyType, alias, apiId, certificate, tier, _callback); + return localVarCall; + + } + + /** + * Update a Certificate of a Given Key Type + * This operation can be used to update an uploaded certificate of a given key type. + * @param keyType Key type for the certificate (required) + * @param alias Alias for the certificate (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param certificate The certificate that needs to be uploaded. (optional) + * @param tier The tier of the certificate (optional) + * @return ClientCertMetadataDTO + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. The Certificate updated successfully. * Location - The URL of the newly created resource.
* Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public ClientCertMetadataDTO updateAPIClientCertificateByKeyTypeAndAlias(String keyType, String alias, String apiId, File certificate, String tier) throws ApiException { + ApiResponse localVarResp = updateAPIClientCertificateByKeyTypeAndAliasWithHttpInfo(keyType, alias, apiId, certificate, tier); + return localVarResp.getData(); + } + + /** + * Update a Certificate of a Given Key Type + * This operation can be used to update an uploaded certificate of a given key type. + * @param keyType Key type for the certificate (required) + * @param alias Alias for the certificate (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param certificate The certificate that needs to be uploaded. (optional) + * @param tier The tier of the certificate (optional) + * @return ApiResponse<ClientCertMetadataDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. The Certificate updated successfully. * Location - The URL of the newly created resource.
* Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public ApiResponse updateAPIClientCertificateByKeyTypeAndAliasWithHttpInfo(String keyType, String alias, String apiId, File certificate, String tier) throws ApiException { + okhttp3.Call localVarCall = updateAPIClientCertificateByKeyTypeAndAliasValidateBeforeCall(keyType, alias, apiId, certificate, tier, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update a Certificate of a Given Key Type (asynchronously) + * This operation can be used to update an uploaded certificate of a given key type. + * @param keyType Key type for the certificate (required) + * @param alias Alias for the certificate (required) + * @param apiId **API ID** consisting of the **UUID** of the API. (required) + * @param certificate The certificate that needs to be uploaded. (optional) + * @param tier The tier of the certificate (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK. The Certificate updated successfully. * Location - The URL of the newly created resource.
* Content-Type - The content type of the body.
400 Bad Request. Invalid request or validation error. -
404 Not Found. The specified resource does not exist. -
500 Internal Server Error. -
+ */ + public okhttp3.Call updateAPIClientCertificateByKeyTypeAndAliasAsync(String keyType, String alias, String apiId, File certificate, String tier, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = updateAPIClientCertificateByAliasValidateBeforeCall(alias, apiId, certificate, tier, keyType, _callback); + okhttp3.Call localVarCall = updateAPIClientCertificateByKeyTypeAndAliasValidateBeforeCall(keyType, alias, apiId, certificate, tier, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/dto/ClientCertMetadataDTO.java b/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/dto/ClientCertMetadataDTO.java index 7af28c0c83..d1b52c43a5 100644 --- a/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/dto/ClientCertMetadataDTO.java +++ b/modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/dto/ClientCertMetadataDTO.java @@ -42,10 +42,6 @@ public class ClientCertMetadataDTO { @SerializedName(SERIALIZED_NAME_TIER) private String tier; - public static final String SERIALIZED_NAME_KEY_TYPE = "keyType"; - @SerializedName(SERIALIZED_NAME_KEY_TYPE) - private String keyType = "PRODUCTION"; - public ClientCertMetadataDTO alias(String alias) { @@ -116,29 +112,6 @@ public void setTier(String tier) { } - public ClientCertMetadataDTO keyType(String keyType) { - - this.keyType = keyType; - return this; - } - - /** - * Get keyType - * @return keyType - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getKeyType() { - return keyType; - } - - - public void setKeyType(String keyType) { - this.keyType = keyType; - } - - @Override public boolean equals(Object o) { if (this == o) { @@ -150,13 +123,12 @@ public boolean equals(Object o) { ClientCertMetadataDTO clientCertMetadata = (ClientCertMetadataDTO) o; return Objects.equals(this.alias, clientCertMetadata.alias) && Objects.equals(this.apiId, clientCertMetadata.apiId) && - Objects.equals(this.tier, clientCertMetadata.tier) && - Objects.equals(this.keyType, clientCertMetadata.keyType); + Objects.equals(this.tier, clientCertMetadata.tier); } @Override public int hashCode() { - return Objects.hash(alias, apiId, tier, keyType); + return Objects.hash(alias, apiId, tier); } @@ -167,7 +139,6 @@ public String toString() { sb.append(" alias: ").append(toIndentedString(alias)).append("\n"); sb.append(" apiId: ").append(toIndentedString(apiId)).append("\n"); sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); - sb.append(" keyType: ").append(toIndentedString(keyType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/modules/integration/tests-common/clients/publisher/src/main/resources/publisher-api.yaml b/modules/integration/tests-common/clients/publisher/src/main/resources/publisher-api.yaml index 4d5ebabc2d..0946d3cb45 100644 --- a/modules/integration/tests-common/clients/publisher/src/main/resources/publisher-api.yaml +++ b/modules/integration/tests-common/clients/publisher/src/main/resources/publisher-api.yaml @@ -4596,6 +4596,9 @@ paths: source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" "https://127.0.0.1:9443/api/am/publisher/v4/throttling-policies/api/Platinum"' + ###################################################### + # The "Client Certificates" resource APIs (Deprecated) + ###################################################### /apis/{apiId}/client-certificates: get: tags: @@ -4671,9 +4674,6 @@ paths: tier: type: string description: api tier to which the certificate should be applied. - keyType: - type: string - description: key type to which the certificate should be applied. required: true responses: 200: @@ -4786,9 +4786,6 @@ paths: tier: type: string description: The tier of the certificate - keyType: - type: string - description: The key type of the certificate responses: 200: description: | @@ -4915,6 +4912,342 @@ paths: "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certificates/wso2carbon/content"' operationId: getAPIClientCertificateContentByAlias + ###################################################### + # The "Client Certificates" resource APIs (New) + ###################################################### + /apis/{apiId}/client-certs/{keyType}: + parameters: + - in: path + name: keyType + schema: + type: string + required: true + description: Key type for the certificate + get: + tags: + - Client Certificates + summary: Retrieve/ Search Uploaded Client Certificates of a given key type + description: | + This operation can be used to retrieve and search the uploaded client certificates of a given key type. + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + - name: alias + in: query + description: Alias for the client certificate + schema: + type: string + - $ref: '#/components/parameters/apiId' + responses: + 200: + description: | + OK. Successful response with the list of matching certificate information in the body. + headers: + Content-Type: + description: | + The content type of the body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ClientCertificates' + 400: + $ref: '#/components/responses/BadRequest' + 500: + $ref: '#/components/responses/InternalServerError' + security: + - OAuth2Security: + - apim:api_view + - apim:api_manage + - apim:client_certificates_view + - apim:client_certificates_manage + x-code-samples: + - lang: Curl + source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certs/PRODUCTION?alias=wso2carbon"' + operationId: getAPIClientCertificatesByKeyType + post: + tags: + - Client Certificates + summary: Upload a New Certificate of the given key type + description: | + This operation can be used to upload a new certificate for an endpoint of the given type. + parameters: + - $ref: '#/components/parameters/apiId' + requestBody: + content: + multipart/form-data: + schema: + required: + - alias + - certificate + - tier + properties: + certificate: + type: string + description: The certificate that needs to be uploaded. + format: binary + alias: + maxLength: 30 + minLength: 1 + type: string + description: Alias for the certificate + tier: + type: string + description: API tier to which the certificate should be applied. + required: true + responses: + 200: + description: | + OK. + The Certificate added successfully. + headers: + Location: + description: | + The URL of the newly created resource. + schema: + type: string + Content-Type: + description: | + The content type of the body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ClientCertMetadata' + 400: + $ref: '#/components/responses/BadRequest' + 500: + $ref: '#/components/responses/InternalServerError' + security: + - OAuth2Security: + - apim:api_create + - apim:api_manage + - apim:client_certificates_add + - apim:client_certificates_manage + x-code-samples: + - lang: Curl + source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + -H "Content-Type: multipart/form-data" -F certificate=@test.crt -F alias=wso2carbon -F tier=Gold + "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certs/PRODUCTION"' + operationId: addAPIClientCertificateOfGivenKeyType + + /apis/{apiId}/client-certs/{keyType}/{alias}: + parameters: + - in: path + name: keyType + schema: + type: string + required: true + description: Key type for the certificate + get: + tags: + - Client Certificates + summary: Get the Certificate Information of a Given Key Type + description: | + This operation can be used to get the information about a certificate of a given key type. + parameters: + - name: alias + in: path + required: true + schema: + type: string + - $ref: '#/components/parameters/apiId' + responses: + 200: + description: | + OK. + headers: + Content-Type: + description: | + The content type of the body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/CertificateInfo' + 400: + $ref: '#/components/responses/BadRequest' + 404: + $ref: '#/components/responses/NotFound' + 500: + $ref: '#/components/responses/InternalServerError' + security: + - OAuth2Security: + - apim:api_view + - apim:api_manage + - apim:client_certificates_view + - apim:client_certificates_manage + x-code-samples: + - lang: Curl + source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certs/PRODUCTION/wso2carbon"' + operationId: getAPIClientCertificateByKeyTypeAndAlias + + put: + tags: + - Client Certificates + summary: Update a Certificate of a Given Key Type + description: | + This operation can be used to update an uploaded certificate of a given key type. + parameters: + - name: alias + in: path + description: Alias for the certificate + required: true + schema: + maxLength: 30 + minLength: 1 + type: string + - $ref: '#/components/parameters/apiId' + requestBody: + content: + multipart/form-data: + schema: + properties: + certificate: + type: string + description: The certificate that needs to be uploaded. + format: binary + tier: + type: string + description: The tier of the certificate + responses: + 200: + description: | + OK. + The Certificate updated successfully. + headers: + Location: + description: | + The URL of the newly created resource. + schema: + type: string + Content-Type: + description: | + The content type of the body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ClientCertMetadata' + 400: + $ref: '#/components/responses/BadRequest' + 404: + $ref: '#/components/responses/NotFound' + 500: + $ref: '#/components/responses/InternalServerError' + security: + - OAuth2Security: + - apim:api_create + - apim:api_manage + - apim:client_certificates_update + - apim:client_certificates_manage + x-code-samples: + - lang: Curl + source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + -H "Content-Type: multipart/form-data" -F certificate=@test.crt -F alias=wso2carbon + -F apiId=fea749dd-d548-4a8b-b308-34903b39a34b -F tier=Gold "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certs/PRODUCTION/wso2carbon"' + operationId: updateAPIClientCertificateByKeyTypeAndAlias + + delete: + tags: + - Client Certificates + summary: Delete a Certificate of a Given Key Type + description: | + This operation can be used to delete an uploaded certificate of a given key type. + parameters: + - name: alias + in: path + description: | + The alias of the certificate that should be deleted. + required: true + schema: + type: string + - $ref: '#/components/parameters/apiId' + responses: + 200: + description: | + OK. + The Certificate deleted successfully. + headers: + Content-Type: + description: | + The content type of the body. + schema: + type: string + content: { } + 400: + $ref: '#/components/responses/BadRequest' + 404: + $ref: '#/components/responses/NotFound' + 500: + $ref: '#/components/responses/InternalServerError' + security: + - OAuth2Security: + - apim:api_create + - apim:api_manage + - apim:client_certificates_update + x-code-samples: + - lang: Curl + source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certificates/wso2carbon"' + operationId: deleteAPIClientCertificateByKeyTypeAndAlias + + /apis/{apiId}/client-certs/{keyType}/{alias}/content: + get: + tags: + - Client Certificates + summary: Download a Certificate of Given Key Type + description: | + This operation can be used to download a certificate which matches the given alias and key type. + parameters: + - $ref: '#/components/parameters/apiId' + - name: alias + in: path + required: true + schema: + type: string + - name: keyType + in: path + description: | + The key type of the certificate that should be deleted. + required: true + schema: + type: string + responses: + 200: + description: | + OK. + headers: + Content-Type: + description: | + The content type of the body. + schema: + type: string + content: {} + 400: + $ref: '#/components/responses/BadRequest' + 404: + $ref: '#/components/responses/NotFound' + 500: + $ref: '#/components/responses/InternalServerError' + security: + - OAuth2Security: + - apim:api_view + - apim:api_manage + - apim:client_certificates_view + - apim:client_certificates_manage + x-code-samples: + - lang: Curl + source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" + "https://127.0.0.1:9443/api/am/publisher/v4/apis/d48a3412-1b85-49be-99f4-b81a3722ae73/client-certs/PRODUCTION/wso2carbon/content" > test.crt' + operationId: getAPIClientCertificateContentByKeyTypeAndAlias + ###################################################### # The "Certificate Management" resource APIs ###################################################### @@ -11288,9 +11621,6 @@ components: tier: type: string example: Gold - keyType: - type: string - default: PRODUCTION description: Meta data of certificate LifecycleState: title: Lifecycle State diff --git a/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/impl/RestAPIPublisherImpl.java b/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/impl/RestAPIPublisherImpl.java index 0410667ba8..0e0b354dbf 100644 --- a/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/impl/RestAPIPublisherImpl.java +++ b/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/impl/RestAPIPublisherImpl.java @@ -1426,8 +1426,8 @@ public APIDTO addAPI(APICreationRequestBean apiCreationRequestBean) throws ApiEx public HttpResponse uploadCertificate(File certificate, String alias, String apiId, String tier, String keyType) throws ApiException { - ClientCertMetadataDTO certificateDTO = clientCertificatesApi.addAPIClientCertificate(apiId, certificate, - alias, tier, keyType); + ClientCertMetadataDTO certificateDTO = clientCertificatesApi.addAPIClientCertificateOfGivenKeyType(keyType, + apiId, certificate, alias, tier); HttpResponse response = null; if (StringUtils.isNotEmpty(certificateDTO.getAlias())) { response = new HttpResponse("Successfully uploaded the certificate", 200); From 4a4af386085c1e11543fcb2cd832b6149370c13e Mon Sep 17 00:00:00 2001 From: rusirijayodaillesinghe Date: Mon, 29 Jul 2024 19:38:48 +0530 Subject: [PATCH 12/12] Update carbon apimgt and apim-apps version --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9328d2fa0f..ac659e50f5 100644 --- a/pom.xml +++ b/pom.xml @@ -1284,11 +1284,11 @@ 5.3.11 - 9.1.97 + 9.1.98 - 9.29.171 + 9.29.173 [9.0.0, 10.0.0)