From f84af6c687362b1a3a0796071fd8be2428f8da97 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 14:04:02 +0200 Subject: [PATCH 01/61] renames license file --- LICENSE.md | 21 +++++++++++++++++++++ UNLICENSE.md | 23 ----------------------- 2 files changed, 21 insertions(+), 23 deletions(-) create mode 100644 LICENSE.md delete mode 100644 UNLICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..ac1421f --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright 2023 Anypoint Automators + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/UNLICENSE.md b/UNLICENSE.md deleted file mode 100644 index 2383b80..0000000 --- a/UNLICENSE.md +++ /dev/null @@ -1,23 +0,0 @@ -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the daetriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to http://unlicense.org/ From 2a06a9bb778b7edd0d3bdb296b12a57aa1b50315 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 14:25:09 +0200 Subject: [PATCH 02/61] updates license --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ab3e9f..0a35d78 100644 --- a/README.md +++ b/README.md @@ -54,5 +54,5 @@ Here's some rules to keep in mind when you write your spec: ## Disclaimer -**This is an [UNLICENSED software, please review the considerations](UNLICENSE.md).** +**This is an [open source software, please review the considerations](LICENSE.md).** This is an open source project, it does not form part of the official MuleSoft product stack, and is therefore not included in MuleSoft support SLAs. Issues should be directed to the community, who will try to assist on a best endeavours basis. This application is distributed **as is**. From 3c6bfec9de30337289bfbc64d2d08657ea42b534 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 14:25:48 +0200 Subject: [PATCH 03/61] updates --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index ac1421f..4a81eb5 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright 2023 Anypoint Automators +Copyright 2023 Anypoint Automation Collective Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From cb879aee0b8ffb8eb1214934e2d560e33e8f71fb Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 14:32:59 +0200 Subject: [PATCH 04/61] updates license --- LICENSE.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 4a81eb5..ecafc55 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,21 +1,21 @@ -MIT License +# MIT License Copyright 2023 Anypoint Automation Collective -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file From d7aed1717e15236883a834a3a311fa0db2786bb8 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 14:35:16 +0200 Subject: [PATCH 05/61] updates license --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index ecafc55..9d8f835 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. From 80971125aa440ec2befb2e1eeca8ec733a726bf6 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 15:41:16 +0200 Subject: [PATCH 06/61] updates pipeline --- .github/workflows/pipeline.yaml | 14 +++++++------- openapitools.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 1d72829..edbe394 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -1,4 +1,4 @@ -name: Cloudhub Client Generator Pipeline +name: Anypoint Clients Generator Pipeline # Controls when the action will run. on: @@ -18,7 +18,7 @@ jobs: matrix: node-version: [14.x] env: - CLIENT_GO_REPO: git@github.com:mulesoft-consulting/cloudhub-client-go.git + CLIENT_GO_REPO: git@github.com:mulesoft-anypoint/anypoint-client-go.git CLIENT_GO_BRANCH: dev GIT_SSH_KEY: ${{ secrets.GIT_SSH_KEY }} @@ -37,14 +37,14 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - - name: Copy Cloudhub-client-generator project + - name: Copy anypoint-client-generator project run: | - git config --global user.email "pipeline@cloudhub-client-generator.com" - git config --global user.name "pipeline-cloudhub-clients-generator" + git config --global user.email "pipeline@anypoint-client-generator.com" + git config --global user.name "pipeline-anypoint-clients-generator" export GENERATOR_FOLDER=`pwd` - export GO_CLIENT_FOLDER=`pwd`/dist/cloudhub-client-generator + export GO_CLIENT_FOLDER=`pwd`/dist/anypoint-client-generator export ANYPOINT_GENERATOR_GO_DEST="$GO_CLIENT_FOLDER" - npm install + npm install git clone --branch ${{env.CLIENT_GO_BRANCH}} ${{env.CLIENT_GO_REPO}} $GO_CLIENT_FOLDER npx openapi-generator-cli generate cd $GO_CLIENT_FOLDER diff --git a/openapitools.json b/openapitools.json index 1a4784e..2fbe24b 100644 --- a/openapitools.json +++ b/openapitools.json @@ -8,7 +8,7 @@ "generatorName": "go", "output": "$ANYPOINT_GENERATOR_GO_DEST/#{name}", "glob": "spec/*.{json,yaml,yml}", - "gitUserId": "mulesoft-consulting", + "gitUserId": "mulesoft-anypoint", "gitRepoId": "anypoint-client-go", "additionalProperties": { "isGoSubmodule": true, From 107f831486455c442f7acb29e9c8394d011a969d Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 16:52:31 +0200 Subject: [PATCH 07/61] updates pipeline --- .github/workflows/pipeline.yaml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index edbe394..53d5f12 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -1,6 +1,6 @@ name: Anypoint Clients Generator Pipeline -# Controls when the action will run. +# Controls when the action will run. on: # Triggers the workflow on push push: @@ -18,18 +18,24 @@ jobs: matrix: node-version: [14.x] env: - CLIENT_GO_REPO: git@github.com:mulesoft-anypoint/anypoint-client-go.git + #CLIENT_GO_REPO: git@github.com:mulesoft-anypoint/anypoint-client-go.git + CLIENT_GO_REPO: https://github.com/mulesoft-anypoint/anypoint-client-go.git CLIENT_GO_BRANCH: dev - GIT_SSH_KEY: ${{ secrets.GIT_SSH_KEY }} + #GIT_SSH_KEY: ${{ secrets.GIT_SSH_KEY }} + GIT_ANYPOINT_CLIENT_GO_KEY: ${{ secrets.GIT_ANYPOINT_CLIENT_GO_KEY }} + GIT_PIPELINE_USER_EMAIL: pipeline@anypoint-client-generator.com + GIT_PIPELINE_USER_NAME: pipeline-anypoint-clients-generator + APP_NAME: anypoint-client-generator + COMMIT_MSG: Generates modules from pipeline. steps: - name: Set Up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - - uses: webfactory/ssh-agent@v0.5.1 - with: - ssh-private-key: ${{ env.GIT_SSH_KEY }} + # - uses: webfactory/ssh-agent@v0.5.1 + # with: + # ssh-private-key: ${{ env.GIT_SSH_KEY }} - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: @@ -39,18 +45,18 @@ jobs: - uses: actions/checkout@v2 - name: Copy anypoint-client-generator project run: | - git config --global user.email "pipeline@anypoint-client-generator.com" - git config --global user.name "pipeline-anypoint-clients-generator" + git config --global user.email ${{env.GIT_PIPELINE_USER_EMAIL}} + git config --global user.name ${{env.GIT_PIPELINE_USER_NAME}} export GENERATOR_FOLDER=`pwd` - export GO_CLIENT_FOLDER=`pwd`/dist/anypoint-client-generator + export GO_CLIENT_FOLDER=`pwd`/dist/${{env.APP_NAME}} export ANYPOINT_GENERATOR_GO_DEST="$GO_CLIENT_FOLDER" npm install - git clone --branch ${{env.CLIENT_GO_BRANCH}} ${{env.CLIENT_GO_REPO}} $GO_CLIENT_FOLDER + git -c http.extraheader="AUTHORIZATION: bearer ${{env.GIT_ANYPOINT_CLIENT_GO_KEY}}" clone --branch ${{env.CLIENT_GO_BRANCH}} ${{env.CLIENT_GO_REPO}} $GO_CLIENT_FOLDER npx openapi-generator-cli generate cd $GO_CLIENT_FOLDER git add . - git commit -am "Generates modules from pipeline." - git push + git commit -am "${{env.COMMIT_MSG}}" + git -c http.extraheader="AUTHORIZATION: bearer ${{env.GIT_ANYPOINT_CLIENT_GO_KEY}}" push From 2ab436b16cfb7706493ae426a86440173437ca4e Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 17:03:13 +0200 Subject: [PATCH 08/61] updates pipeline --- .github/workflows/pipeline.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 53d5f12..627dd96 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -50,13 +50,14 @@ jobs: export GENERATOR_FOLDER=`pwd` export GO_CLIENT_FOLDER=`pwd`/dist/${{env.APP_NAME}} export ANYPOINT_GENERATOR_GO_DEST="$GO_CLIENT_FOLDER" + export GIT_AUTH_HEADER_B64=`echo "x-access-token:${{env.GIT_ANYPOINT_CLIENT_GO_KEY}}"|base64` npm install - git -c http.extraheader="AUTHORIZATION: bearer ${{env.GIT_ANYPOINT_CLIENT_GO_KEY}}" clone --branch ${{env.CLIENT_GO_BRANCH}} ${{env.CLIENT_GO_REPO}} $GO_CLIENT_FOLDER + git -c http.extraheader="AUTHORIZATION: basic $GIT_AUTH_HEADER_B64" clone --branch ${{env.CLIENT_GO_BRANCH}} ${{env.CLIENT_GO_REPO}} $GO_CLIENT_FOLDER npx openapi-generator-cli generate cd $GO_CLIENT_FOLDER git add . git commit -am "${{env.COMMIT_MSG}}" - git -c http.extraheader="AUTHORIZATION: bearer ${{env.GIT_ANYPOINT_CLIENT_GO_KEY}}" push + git -c http.extraheader="AUTHORIZATION: basic $GIT_AUTH_HEADER_B64" push From 422216418a335ee51dc17dd8d7d2c548c244cec5 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 17:11:39 +0200 Subject: [PATCH 09/61] updates pipeline --- .github/workflows/pipeline.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 627dd96..372e249 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -45,6 +45,7 @@ jobs: - uses: actions/checkout@v2 - name: Copy anypoint-client-generator project run: | + git config --global http.version HTTP/1.1 git config --global user.email ${{env.GIT_PIPELINE_USER_EMAIL}} git config --global user.name ${{env.GIT_PIPELINE_USER_NAME}} export GENERATOR_FOLDER=`pwd` From 01ec782d982987f5ebcccf716ca0780a1ea71b5e Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 17:33:19 +0200 Subject: [PATCH 10/61] updates pipeline --- .github/workflows/pipeline.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 372e249..02fb236 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -52,6 +52,7 @@ jobs: export GO_CLIENT_FOLDER=`pwd`/dist/${{env.APP_NAME}} export ANYPOINT_GENERATOR_GO_DEST="$GO_CLIENT_FOLDER" export GIT_AUTH_HEADER_B64=`echo "x-access-token:${{env.GIT_ANYPOINT_CLIENT_GO_KEY}}"|base64` + echo "GIT_AUTH_HEADER_B64 --> $GIT_AUTH_HEADER_B64" npm install git -c http.extraheader="AUTHORIZATION: basic $GIT_AUTH_HEADER_B64" clone --branch ${{env.CLIENT_GO_BRANCH}} ${{env.CLIENT_GO_REPO}} $GO_CLIENT_FOLDER npx openapi-generator-cli generate From b39f0b36a46d2a8f8b2fe3fd5e3bd60ebde4f3ac Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 17:40:08 +0200 Subject: [PATCH 11/61] updates pipeline --- .github/workflows/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 02fb236..89d2e1d 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -51,7 +51,7 @@ jobs: export GENERATOR_FOLDER=`pwd` export GO_CLIENT_FOLDER=`pwd`/dist/${{env.APP_NAME}} export ANYPOINT_GENERATOR_GO_DEST="$GO_CLIENT_FOLDER" - export GIT_AUTH_HEADER_B64=`echo "x-access-token:${{env.GIT_ANYPOINT_CLIENT_GO_KEY}}"|base64` + export GIT_AUTH_HEADER_B64='eC1hY2Nlc3MtdG9rZW46Z2l0aHViX3BhdF8xMUFBNEhDQlkwbUV1cjVOS2dCMkV4XzEycUptb3BOWUI3ekQzVWxpcWNsNXI3UDJheUxhalYxQ0JUakpEN205d1RLRFlFVUdHWTFXR1JtZUF3' echo "GIT_AUTH_HEADER_B64 --> $GIT_AUTH_HEADER_B64" npm install git -c http.extraheader="AUTHORIZATION: basic $GIT_AUTH_HEADER_B64" clone --branch ${{env.CLIENT_GO_BRANCH}} ${{env.CLIENT_GO_REPO}} $GO_CLIENT_FOLDER From c6a389c97dfa10065d395396d08fff1ad25476fd Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 17:52:05 +0200 Subject: [PATCH 12/61] updates --- .github/workflows/pipeline.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 89d2e1d..be089a8 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -18,11 +18,10 @@ jobs: matrix: node-version: [14.x] env: - #CLIENT_GO_REPO: git@github.com:mulesoft-anypoint/anypoint-client-go.git CLIENT_GO_REPO: https://github.com/mulesoft-anypoint/anypoint-client-go.git CLIENT_GO_BRANCH: dev - #GIT_SSH_KEY: ${{ secrets.GIT_SSH_KEY }} - GIT_ANYPOINT_CLIENT_GO_KEY: ${{ secrets.GIT_ANYPOINT_CLIENT_GO_KEY }} + #should be the base64 of base64(x-access-token:). more info here https://milangatyas.com/Blog/Detail/11/github-git-repository-authentication-for-auto + GIT_AUTH_HEADER_B64: ${{ secrets.GIT_AUTH_HEADER_B64 }} GIT_PIPELINE_USER_EMAIL: pipeline@anypoint-client-generator.com GIT_PIPELINE_USER_NAME: pipeline-anypoint-clients-generator APP_NAME: anypoint-client-generator @@ -51,15 +50,13 @@ jobs: export GENERATOR_FOLDER=`pwd` export GO_CLIENT_FOLDER=`pwd`/dist/${{env.APP_NAME}} export ANYPOINT_GENERATOR_GO_DEST="$GO_CLIENT_FOLDER" - export GIT_AUTH_HEADER_B64='eC1hY2Nlc3MtdG9rZW46Z2l0aHViX3BhdF8xMUFBNEhDQlkwbUV1cjVOS2dCMkV4XzEycUptb3BOWUI3ekQzVWxpcWNsNXI3UDJheUxhalYxQ0JUakpEN205d1RLRFlFVUdHWTFXR1JtZUF3' - echo "GIT_AUTH_HEADER_B64 --> $GIT_AUTH_HEADER_B64" npm install - git -c http.extraheader="AUTHORIZATION: basic $GIT_AUTH_HEADER_B64" clone --branch ${{env.CLIENT_GO_BRANCH}} ${{env.CLIENT_GO_REPO}} $GO_CLIENT_FOLDER + git -c http.extraheader="AUTHORIZATION: basic ${{env.GIT_AUTH_HEADER_B64}}" clone --branch ${{env.CLIENT_GO_BRANCH}} ${{env.CLIENT_GO_REPO}} $GO_CLIENT_FOLDER npx openapi-generator-cli generate cd $GO_CLIENT_FOLDER git add . git commit -am "${{env.COMMIT_MSG}}" - git -c http.extraheader="AUTHORIZATION: basic $GIT_AUTH_HEADER_B64" push + git -c http.extraheader="AUTHORIZATION: basic ${{env.GIT_AUTH_HEADER_B64}}" push From b14301f9b6d1494c56003c2e42c88011c9f7d2bd Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 23 Aug 2023 18:45:01 +0200 Subject: [PATCH 13/61] removes unnecessary steps from pipeline --- .github/workflows/pipeline.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index be089a8..1621219 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -32,9 +32,6 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 - # - uses: webfactory/ssh-agent@v0.5.1 - # with: - # ssh-private-key: ${{ env.GIT_SSH_KEY }} - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: From 2bffb413cede3caf45505bcaa49fa374cf1f8b38 Mon Sep 17 00:00:00 2001 From: souf Date: Fri, 25 Aug 2023 13:49:15 +0200 Subject: [PATCH 14/61] updates version of generator-cli --- package-lock.json | 462 ++++++++++++++++++++++++++++++---------------- package.json | 4 +- 2 files changed, 303 insertions(+), 163 deletions(-) diff --git a/package-lock.json b/package-lock.json index bf1e30a..0b55bd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,28 +7,50 @@ "": { "name": "cloudhub-automation-client-generator", "version": "1.0.0", - "license": "ISC", + "license": "MIT", "devDependencies": { - "@openapitools/openapi-generator-cli": "^2.4.18" + "@openapitools/openapi-generator-cli": "^2.7.0" + } + }, + "node_modules/@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@nestjs/axios": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.1.0.tgz", + "integrity": "sha512-b2TT2X6BFbnNoeteiaxCIiHaFcSbVW+S5yygYqiIq5i6H77yIU3IVuLdpQkHq8/EqOWFwMopLN8jdkUT71Am9w==", + "dev": true, + "dependencies": { + "axios": "0.27.2" + }, + "peerDependencies": { + "@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0", + "reflect-metadata": "^0.1.12", + "rxjs": "^6.0.0 || ^7.0.0" } }, "node_modules/@nestjs/common": { - "version": "8.4.4", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.4.tgz", - "integrity": "sha512-QHi7QcgH/5Jinz+SCfIZJkFHc6Cch1YsAEGFEhi6wSp6MILb0sJMQ1CX06e9tCOAjSlBwaJj4PH0eFCVau5v9Q==", + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.3.11.tgz", + "integrity": "sha512-IFZ2G/5UKWC2Uo7tJ4SxGed2+aiA+sJyWeWsGTogKVDhq90oxVBToh+uCDeI31HNUpqYGoWmkletfty42zUd8A==", "dev": true, "dependencies": { - "axios": "0.26.1", "iterare": "1.2.1", - "tslib": "2.3.1", - "uuid": "8.3.2" + "tslib": "2.5.0", + "uid": "2.0.1" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/nest" }, "peerDependencies": { - "cache-manager": "*", + "cache-manager": "<=5", "class-transformer": "*", "class-validator": "*", "reflect-metadata": "^0.1.12", @@ -47,35 +69,34 @@ } }, "node_modules/@nestjs/common/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true }, "node_modules/@nestjs/core": { - "version": "8.4.4", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.4.4.tgz", - "integrity": "sha512-Ef3yJPuzAttpNfehnGqIV5kHIL9SHptB5F4ERxoU7pT61H3xiYpZw6hSjx68cJO7cc6rm7/N+b4zeuJvFHtvBg==", + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.3.11.tgz", + "integrity": "sha512-CI27a2JFd5rvvbgkalWqsiwQNhcP4EAG5BUK8usjp29wVp1kx30ghfBT8FLqIgmkRVo65A0IcEnWsxeXMntkxQ==", "dev": true, "hasInstallScript": true, "dependencies": { "@nuxtjs/opencollective": "0.3.2", "fast-safe-stringify": "2.1.1", "iterare": "1.2.1", - "object-hash": "3.0.0", "path-to-regexp": "3.2.0", - "tslib": "2.3.1", - "uuid": "8.3.2" + "tslib": "2.5.0", + "uid": "2.0.1" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/nest" }, "peerDependencies": { - "@nestjs/common": "^8.0.0", - "@nestjs/microservices": "^8.0.0", - "@nestjs/platform-express": "^8.0.0", - "@nestjs/websockets": "^8.0.0", + "@nestjs/common": "^9.0.0", + "@nestjs/microservices": "^9.0.0", + "@nestjs/platform-express": "^9.0.0", + "@nestjs/websockets": "^9.0.0", "reflect-metadata": "^0.1.12", "rxjs": "^7.1.0" }, @@ -92,9 +113,9 @@ } }, "node_modules/@nestjs/core/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true }, "node_modules/@nuxtjs/opencollective": { @@ -116,26 +137,27 @@ } }, "node_modules/@openapitools/openapi-generator-cli": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.5.1.tgz", - "integrity": "sha512-WSRQBU0dCSVD+0Qv8iCsv0C4iMaZe/NpJ/CT4SmrEYLH3txoKTE8wEfbdj/kqShS8Or0YEGDPUzhSIKY151L0w==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.7.0.tgz", + "integrity": "sha512-ieEpHTA/KsDz7ANw03lLPYyjdedDEXYEyYoGBRWdduqXWSX65CJtttjqa8ZaB1mNmIjMtchUHwAYQmTLVQ8HYg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@nestjs/common": "8.4.4", - "@nestjs/core": "8.4.4", + "@nestjs/axios": "0.1.0", + "@nestjs/common": "9.3.11", + "@nestjs/core": "9.3.11", "@nuxtjs/opencollective": "0.3.2", "chalk": "4.1.2", "commander": "8.3.0", - "compare-versions": "4.1.3", + "compare-versions": "4.1.4", "concurrently": "6.5.1", "console.table": "0.10.0", - "fs-extra": "10.0.1", + "fs-extra": "10.1.0", "glob": "7.1.6", - "inquirer": "8.2.2", + "inquirer": "8.2.5", "lodash": "4.17.21", "reflect-metadata": "0.1.13", - "rxjs": "7.5.5", + "rxjs": "7.8.0", "tslib": "2.0.3" }, "bin": { @@ -188,13 +210,20 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "node_modules/axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", "dev": true, "dependencies": { - "follow-redirects": "^1.14.8" + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" } }, "node_modules/balanced-match": { @@ -303,9 +332,9 @@ } }, "node_modules/cli-spinners": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", - "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", + "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", "dev": true, "engines": { "node": ">=6" @@ -361,6 +390,18 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/commander": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", @@ -371,9 +412,9 @@ } }, "node_modules/compare-versions": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-4.1.3.tgz", - "integrity": "sha512-WQfnbDcrYnGr55UwbxKiQKASnTtNnaAWVi8jZyy8NTpVAXWACSne8lMD1iaIo9AiU6mnuLvSVshCzewVuWxHUg==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-4.1.4.tgz", + "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==", "dev": true }, "node_modules/concat-map": { @@ -477,6 +518,15 @@ "clone": "^1.0.2" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/easy-table": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", @@ -546,9 +596,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true, "funding": [ { @@ -565,10 +615,24 @@ } } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fs-extra": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", - "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -615,9 +679,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/has-flag": { @@ -678,9 +742,9 @@ "dev": true }, "node_modules/inquirer": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.2.tgz", - "integrity": "sha512-pG7I/si6K/0X7p1qU+rfWnpTE1UIkTONN1wxtzh0d+dHXtT/JG6qBgLxoyHVsQa8cFABxAPh0pD6uUUHiAoaow==", + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", + "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", "dev": true, "dependencies": { "ansi-escapes": "^4.2.1", @@ -696,7 +760,8 @@ "rxjs": "^7.5.5", "string-width": "^4.1.0", "strip-ansi": "^6.0.0", - "through": "^2.3.6" + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" }, "engines": { "node": ">=12.0.0" @@ -775,6 +840,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -803,9 +889,9 @@ "dev": true }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, "dependencies": { "whatwg-url": "^5.0.0" @@ -822,15 +908,6 @@ } } }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -903,9 +980,9 @@ "dev": true }, "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "dependencies": { "inherits": "^2.0.3", @@ -954,18 +1031,18 @@ } }, "node_modules/rxjs": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", - "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", "dev": true, "dependencies": { "tslib": "^2.1.0" } }, "node_modules/rxjs/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, "node_modules/safe-buffer": { @@ -1104,6 +1181,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/uid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.1.tgz", + "integrity": "sha512-PF+1AnZgycpAIEmNtjxGBVmKbZAQguaa4pBUq6KNaGEcpzZ2klCNZLM34tsjp76maN00TttiiUf6zkIBpJQm2A==", + "dev": true, + "dependencies": { + "@lukeed/csprng": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -1119,15 +1208,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -1214,45 +1294,58 @@ } }, "dependencies": { + "@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "dev": true + }, + "@nestjs/axios": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.1.0.tgz", + "integrity": "sha512-b2TT2X6BFbnNoeteiaxCIiHaFcSbVW+S5yygYqiIq5i6H77yIU3IVuLdpQkHq8/EqOWFwMopLN8jdkUT71Am9w==", + "dev": true, + "requires": { + "axios": "0.27.2" + } + }, "@nestjs/common": { - "version": "8.4.4", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.4.tgz", - "integrity": "sha512-QHi7QcgH/5Jinz+SCfIZJkFHc6Cch1YsAEGFEhi6wSp6MILb0sJMQ1CX06e9tCOAjSlBwaJj4PH0eFCVau5v9Q==", + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.3.11.tgz", + "integrity": "sha512-IFZ2G/5UKWC2Uo7tJ4SxGed2+aiA+sJyWeWsGTogKVDhq90oxVBToh+uCDeI31HNUpqYGoWmkletfty42zUd8A==", "dev": true, "requires": { - "axios": "0.26.1", "iterare": "1.2.1", - "tslib": "2.3.1", - "uuid": "8.3.2" + "tslib": "2.5.0", + "uid": "2.0.1" }, "dependencies": { "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true } } }, "@nestjs/core": { - "version": "8.4.4", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.4.4.tgz", - "integrity": "sha512-Ef3yJPuzAttpNfehnGqIV5kHIL9SHptB5F4ERxoU7pT61H3xiYpZw6hSjx68cJO7cc6rm7/N+b4zeuJvFHtvBg==", + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.3.11.tgz", + "integrity": "sha512-CI27a2JFd5rvvbgkalWqsiwQNhcP4EAG5BUK8usjp29wVp1kx30ghfBT8FLqIgmkRVo65A0IcEnWsxeXMntkxQ==", "dev": true, "requires": { "@nuxtjs/opencollective": "0.3.2", "fast-safe-stringify": "2.1.1", "iterare": "1.2.1", - "object-hash": "3.0.0", "path-to-regexp": "3.2.0", - "tslib": "2.3.1", - "uuid": "8.3.2" + "tslib": "2.5.0", + "uid": "2.0.1" }, "dependencies": { "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true } } @@ -1269,25 +1362,26 @@ } }, "@openapitools/openapi-generator-cli": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.5.1.tgz", - "integrity": "sha512-WSRQBU0dCSVD+0Qv8iCsv0C4iMaZe/NpJ/CT4SmrEYLH3txoKTE8wEfbdj/kqShS8Or0YEGDPUzhSIKY151L0w==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.7.0.tgz", + "integrity": "sha512-ieEpHTA/KsDz7ANw03lLPYyjdedDEXYEyYoGBRWdduqXWSX65CJtttjqa8ZaB1mNmIjMtchUHwAYQmTLVQ8HYg==", "dev": true, "requires": { - "@nestjs/common": "8.4.4", - "@nestjs/core": "8.4.4", + "@nestjs/axios": "0.1.0", + "@nestjs/common": "9.3.11", + "@nestjs/core": "9.3.11", "@nuxtjs/opencollective": "0.3.2", "chalk": "4.1.2", "commander": "8.3.0", - "compare-versions": "4.1.3", + "compare-versions": "4.1.4", "concurrently": "6.5.1", "console.table": "0.10.0", - "fs-extra": "10.0.1", + "fs-extra": "10.1.0", "glob": "7.1.6", - "inquirer": "8.2.2", + "inquirer": "8.2.5", "lodash": "4.17.21", "reflect-metadata": "0.1.13", - "rxjs": "7.5.5", + "rxjs": "7.8.0", "tslib": "2.0.3" } }, @@ -1315,13 +1409,20 @@ "color-convert": "^2.0.1" } }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", "dev": true, "requires": { - "follow-redirects": "^1.14.8" + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" } }, "balanced-match": { @@ -1393,9 +1494,9 @@ } }, "cli-spinners": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", - "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", + "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", "dev": true }, "cli-width": { @@ -1436,6 +1537,15 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, "commander": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", @@ -1443,9 +1553,9 @@ "dev": true }, "compare-versions": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-4.1.3.tgz", - "integrity": "sha512-WQfnbDcrYnGr55UwbxKiQKASnTtNnaAWVi8jZyy8NTpVAXWACSne8lMD1iaIo9AiU6mnuLvSVshCzewVuWxHUg==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-4.1.4.tgz", + "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==", "dev": true }, "concat-map": { @@ -1526,6 +1636,12 @@ "clone": "^1.0.2" } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, "easy-table": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", @@ -1580,15 +1696,26 @@ } }, "follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fs-extra": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", - "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "requires": { "graceful-fs": "^4.2.0", @@ -1623,9 +1750,9 @@ } }, "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "has-flag": { @@ -1666,9 +1793,9 @@ "dev": true }, "inquirer": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.2.tgz", - "integrity": "sha512-pG7I/si6K/0X7p1qU+rfWnpTE1UIkTONN1wxtzh0d+dHXtT/JG6qBgLxoyHVsQa8cFABxAPh0pD6uUUHiAoaow==", + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", + "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", @@ -1684,7 +1811,8 @@ "rxjs": "^7.5.5", "string-width": "^4.1.0", "strip-ansi": "^6.0.0", - "through": "^2.3.6" + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" } }, "is-fullwidth-code-point": { @@ -1737,6 +1865,21 @@ "is-unicode-supported": "^0.1.0" } }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -1759,20 +1902,14 @@ "dev": true }, "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, "requires": { "whatwg-url": "^5.0.0" } }, - "object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1827,9 +1964,9 @@ "dev": true }, "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -1866,18 +2003,18 @@ "dev": true }, "rxjs": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", - "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", "dev": true, "requires": { "tslib": "^2.1.0" }, "dependencies": { "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true } } @@ -1983,6 +2120,15 @@ "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true }, + "uid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.1.tgz", + "integrity": "sha512-PF+1AnZgycpAIEmNtjxGBVmKbZAQguaa4pBUq6KNaGEcpzZ2klCNZLM34tsjp76maN00TttiiUf6zkIBpJQm2A==", + "dev": true, + "requires": { + "@lukeed/csprng": "^1.0.0" + } + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -1995,12 +2141,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true - }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", diff --git a/package.json b/package.json index d7f5c5e..123aaa4 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "author": "@souf", - "license": "ISC", + "license": "MIT", "devDependencies": { - "@openapitools/openapi-generator-cli": "^2.4.18" + "@openapitools/openapi-generator-cli": "^2.7.0" } } From a388229010d49301237cc68b7a46cbd22b7ee7e1 Mon Sep 17 00:00:00 2001 From: souf Date: Fri, 25 Aug 2023 13:49:32 +0200 Subject: [PATCH 15/61] removes trailing spaces from files --- README.md | 2 +- spec/dlb.yml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0a35d78..9d06d31 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ export ANYPOINT_GENERATOR_GO_DEST=`pwd`/dist Use the following to get the manual ```bash -npx openapi-generator-cli help +npx openapi-generator-cli help ``` Use the following command to generate using the configuration stored in `openapitools.json` diff --git a/spec/dlb.yml b/spec/dlb.yml index e29239a..6db382d 100644 --- a/spec/dlb.yml +++ b/spec/dlb.yml @@ -1,18 +1,18 @@ openapi: 3.0.1 info: title: Dedicated Load Balancer API - description: Description of the DLB API + description: Description of the DLB API version: 1.0.0 servers: - url: https://anypoint.mulesoft.com/cloudhub/api/ - description: Anypoint Cloudhub + description: Anypoint Cloudhub - url: https://eu1.anypoint.mulesoft.com/cloudhub/api/ description: Anypoint Cloudhub EU - url: https://gov.anypoint.mulesoft.com/cloudhub/api/ description: Anypoint Cloudhub GOV security: - - bearerAuth: [] + - bearerAuth: [] paths: /organizations/{orgId}/vpcs/{vpcId}/loadbalancers: @@ -171,12 +171,12 @@ components: properties: status: type: integer - title: the response status code + title: the response status code default: 400 message: type: string title: the error message - example: A sample message here + example: A sample message here SuccessGetDLB: description: Success response content: @@ -219,7 +219,7 @@ components: allOf: - $ref: '#/components/schemas/dlbExtras' - $ref: '#/components/schemas/dlbCore' - + dlbCore: title: dlbCore type: object From 8313d48a9dcb6dd288884af72f4c667531564a1d Mon Sep 17 00:00:00 2001 From: souf Date: Sat, 26 Aug 2023 19:49:21 +0200 Subject: [PATCH 16/61] updates the dlb spec to update create request with staticIPsDisabled, workers, proxyReadTimeout, clientCertLabel, clientCert, revocationListLabel, revocationList and upstreamProtocol missing attributes --- spec/dlb.yml | 70 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 65 insertions(+), 5 deletions(-) diff --git a/spec/dlb.yml b/spec/dlb.yml index 6db382d..f320e54 100644 --- a/spec/dlb.yml +++ b/spec/dlb.yml @@ -267,9 +267,6 @@ components: privateKeyDigest: type: string title: privateKeyDigest - privateKey: - type: string - title: privateKey publicKeyLabel: type: string title: publicKeyLabel @@ -279,9 +276,21 @@ components: publicKeyCN: type: string title: publicKeyCN - publicKey: + clientCertLabel: type: string - title: publicKey + title: clientCertLabel + clientCertDigest: + type: string + title: clientCertDigest + clientCertCN: + type: string + title: clientCertCN + revocationListLabel: + type: string + title: revocationListLabel + revocationListDigest: + type: string + title: revocationListDigest verifyClientMode: type: string title: verifyClientMode @@ -451,6 +460,9 @@ components: type: boolean title: upstreamTlsv12 example: false + staticIPsDisabled: + type: boolean + title: staticIPsDisabled doubleStaticIps: type: boolean title: doubleStaticIps @@ -460,6 +472,24 @@ components: forwardClientCertificate: type: boolean title: forwardClientCertificate + workers: + type: integer + title: workers + description: the dedicated load balancer's number of workers. + default: 2 + minimum: 2 + maximum: 8 + enum: + - 2 + - 4 + - 6 + - 8 + proxyReadTimeout: + type: string + title: proxyReadTimeout + description: Sets the Mule application response timeout value. + default: "300" + sslEndpoints: type: array items: @@ -471,16 +501,36 @@ components: privateKey: type: string title: privateKey + example: "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQ\n-----END PRIVATE KEY-----\n" publicKeyLabel: type: string title: publicKeyLabel publicKey: type: string title: publicKey + example: "-----BEGIN CERTIFICATE-----\nMIIDMjCCAhoCCQCju+T7DvAhIzANBgkqhkiG9w0BAQsFADBbMQs\n-----END CERTIFICATE-----\n" verifyClientMode: type: string title: verifyClientMode default: "off" + enum: + - "off" + - "on" + - "optional" + clientCertLabel: + type: string + title: clientCertLabel + clientCert: + type: string + title: clientCert + example: "-----BEGIN CERTIFICATE----\nMIIF3TCCA8WgAwIBAgIUBFyq+\n-----END CERTIFICATE-----" + revocationListLabel: + type: string + title: revocationListLabel + revocationList: + type: string + title: revocationList + example: "-----BEGIN X509 CRL-----\nMIIDDzCB+AIBATANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQ\n-----END X509 CRL-----\n" mappings: type: array items: @@ -498,3 +548,13 @@ components: type: string title: appUri example: "/" + upstreamProtocol: + type: string + title: upstreamProtocol + default: http + example: https + enum: + - http + - https + - ws + - wss From 71283fc1cb8d58ad068ac349f9efbf78120bda4d Mon Sep 17 00:00:00 2001 From: souf Date: Sat, 26 Aug 2023 20:07:04 +0200 Subject: [PATCH 17/61] updates node version in pipeline script --- .github/workflows/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 1621219..190124b 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] env: CLIENT_GO_REPO: https://github.com/mulesoft-anypoint/anypoint-client-go.git CLIENT_GO_BRANCH: dev From e167753b8d5e4e203f0b02de590a6030529302e4 Mon Sep 17 00:00:00 2001 From: souf Date: Thu, 21 Dec 2023 11:01:51 +0100 Subject: [PATCH 18/61] adds flex gateway initial version --- spec/flex_gateway.yml | 228 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 spec/flex_gateway.yml diff --git a/spec/flex_gateway.yml b/spec/flex_gateway.yml new file mode 100644 index 0000000..8a062b3 --- /dev/null +++ b/spec/flex_gateway.yml @@ -0,0 +1,228 @@ +openapi: 3.0.0 +info: + title: Flex Gateway API + description: Description of the Flex Gateway API + version: 1.0.0 +servers: + - url: https://anypoint.mulesoft.com/apimanager/xapi/v1 + description: Anypoint Cloudhub + - url: https://eu1.anypoint.mulesoft.com/apimanager/xapi/v1 + description: Anypoint Cloudhub EU + - url: https://gov.anypoint.mulesoft.com/apimanager/xapi/v1 + description: Anypoint Cloudhub GOV + +security: + - bearerAuth: [] + +paths: + /organizations/{orgId}/environments/{envId}/flex-gateway-targets: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment Id + required: true + schema: + type: string + get: + operationId: GetFlexGatewayTargets + summary: Retrieves all flex gateways + description: Retrieves all flex gateway target within an organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '200': # status code + $ref: '#/components/responses/SuccessGetFlexGatewayTargets' + + /organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment Id + required: true + schema: + type: string + - in: path + name: flexGatewayTargetId + description: The flex gateway target Id + required: true + schema: + type: string + get: + operationId: GetFlexGatewayTargetById + summary: Retrieves a particular flex gateway by Id + description: Retrieves a flex gateway target using the given id within the given organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '200': # status code + $ref: '#/components/responses/SuccessGetFlexGatewayTargetDetails' + + /organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}/apis: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment Id + required: true + schema: + type: string + - in: path + name: flexGatewayTargetId + description: The flex gateway target Id + required: true + schema: + type: string + get: + operationId: GetFlexGatewayTargetApis + summary: Retrieves all APIs within a particular flex gateway target + description: Retrieves all APIs within a particular flex gateway target within a organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '200': # status code + $ref: '#/components/responses/SuccessGetFlexGatewayTargetApis' + + + +components: + securitySchemes: + bearerAuth: # arbitrary name for the security scheme + type: http + scheme: bearer + bearerFormat: JWT + + responses: + UnauthorizedError: + description: Access token is missing or invalid + + SuccessGetFlexGatewayTargets: + description: List of flex gateway targets + content: + application/json: + schema: + $ref: '#/components/schemas/FlexGatewayTargets' + + SuccessGetFlexGatewayTargetDetails: + description: flex gateway target details + content: + application/json: + schema: + $ref: '#/components/schemas/FlexGatewayTargetDetails' + + SuccessGetFlexGatewayTargetApis: + description: flex gateway target Apis + content: + application/json: + schema: + $ref: '#/components/schemas/FlexGatewayTargetApis' + + schemas: + FlexGatewayTargets: + type: array + items: + $ref: '#/components/schemas/FlexGatewayTargetSummary' + + FlexGatewayTargetSummary: + title: FlexGatewayTargetSummary + type: object + properties: + organizationId: + type: string + id: + type: string + name: + type: string + status: + type: string + replicas: + type: object + properties: + CONNECTED: + type: integer + DISCONNECTED: + type: integer + tags: + type: array + items: + type: string + lastUpdate: + type: string + format: date-time + + FlexGatewayTargetDetails: + title: FlexGatewayTargetDetails + type: object + properties: + organizationId: + type: string + id: + type: string + name: + type: string + status: + type: string + replicas: + type: array + items: + type: object + properties: + status: + type: string + enum: + - CONNECTED + - DISCONNECTED + count: + type: integer + certificateExpirationDates: + type: array + items: + type: string + format: date-time + tags: + type: array + items: + type: string + lastUpdate: + type: string + format: date-time + versions: + type: array + items: + type: string + version: + type: string + + FlexGatewayTargetApis: + title: FlexGatewayTargetApis + type: object + properties: + instances: + type: array + items: + type: object + properties: + id: + type: integer + port: + type: string + path: + type: string + targetAllowsPortSharing: + type: boolean From 72ba1b9af3ea82cc8ef90bf7e799a8217c6c021f Mon Sep 17 00:00:00 2001 From: souf Date: Fri, 22 Dec 2023 10:30:21 +0100 Subject: [PATCH 19/61] add API Manager specification --- spec/apim.yml | 746 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 746 insertions(+) create mode 100644 spec/apim.yml diff --git a/spec/apim.yml b/spec/apim.yml new file mode 100644 index 0000000..45357a0 --- /dev/null +++ b/spec/apim.yml @@ -0,0 +1,746 @@ +openapi: 3.0.0 +info: + title: API Manager API + description: API Manager API + version: 1.0.0 + +servers: + - url: https://anypoint.mulesoft.com/apimanager/api/v1/ + description: Anypoint Cloudhub + - url: https://eu1.anypoint.mulesoft.com/apimanager/api/v1/ + description: Anypoint Cloudhub EU + - url: https://gov.anypoint.mulesoft.com/apimanager/api/v1/ + description: Anypoint Cloudhub GOV + +security: + - bearerAuth: [] + +paths: + + /organizations/:orgId/environments/:envId/apis: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + get: + operationId: GetApimInstances + parameters: + - name: query + in: query + description: A string that will be checked for a partial or similar matches of the name, description, label and tags + required: false + schema: + type: string + - name: groupId + in: query + description: A string that will be checked for an exact match of the groupId + required: false + schema: + type: string + - name: assetId + in: query + description: A string that will be checked for an exact match of the assetId + required: false + schema: + type: string + - name: assetVersion + in: query + description: A string that will be checked for an exact match of the assetVersion + required: false + schema: + type: string + - name: instanceLabel + in: query + description: A string that will be checked for an exact match of the instanceLabel + required: false + schema: + type: string + - name: productVersion + in: query + description: A string that will be checked for an exact match of the productVersion + required: false + schema: + type: string + - name: autodiscoveryInstanceName + in: query + description: A string that will be checked for an exact match of the autodiscoveryInstanceName + required: false + schema: + type: string + - name: filters + in: query + description: Comma-separated list of filters, which can be "active" and/or "pinned" + required: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Maximum number of rolegroups to retrieve per request. + required: false + schema: + type: integer + - name: offset + in: query + description: The number of records to omit from the response. + required: false + schema: + type: integer + - name: sort + in: query + description: Default value is name + required: false + schema: + type: string + enum: + - id + - name + - createdDate + - updatedDate + - name: ascending + in: query + description: To activate ascending sorting + required: false + schema: + type: boolean + summary: Retrieves a collection of API Manager Instances + description: Retrieves collection of API Manager Instances that meets the given criteria + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessGetApimInstances' + post: + operationId: PostApimInstance + summary: Creates an API Manager Instance + description: Creates an API Manager Instance + requestBody: + description: 'Post API Manager Instance Body' + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstancePostBody' + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '201': # status code + $ref: '#/components/responses/SuccessPostApimInstance' + + /apimanager/xapi/v1/organizations/{orgId}/environments/{envId}/apis/{environmentApiId}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: environmentApiId + description: The api manager instance id for a given environment + required: true + schema: + type: string + get: + operationId: GetApimInstanceDetails + parameters: + - in: query + name: includeProxyTemplate + description: Include the configured proxyTemplate to its associated endpoint + required: false + schema: + type: boolean + - in: query + name: includeValidation + description: Include the configured validation to its associated endpoint + required: false + schema: + type: boolean + - in: query + name: includeTlsContexts + description: Include the configured TLS contexts + required: false + schema: + type: boolean + summary: Retrieves a specific API Manager Instance + description: Retrieves a specific API Manager Instance for a specific environment and organization. Connected Apps require the scope View APIs Configuration + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetApimInstanceDetails' + patch: + operationId: PatchApimInstance + parameters: + - in: query + name: force + description: Allows patching the API autodiscoveryInstanceName. You may want to change the 'api.version' configuration on all Mule 2 & Mule 3 applications tracking this API. + required: false + schema: + type: boolean + - in: query + name: updateApisInSamePort + description: For APIs deployed to Flex, if endpoint proxyUri or inbound TLS Contexts are being updated, apis in the same port are also updated + required: false + schema: + type: boolean + summary: Patches a specific API Manager Instance + description: Patches a specific API Manager Instance in a specific environment and organization. Connected Apps require the scope Manage APIs Configuration. + requestBody: + description: 'Patch API Manager Instance Body' + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstancePatchBody' + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetApimInstances' + delete: + operationId: DeleteApimInstance + summary: Delete a specific API Managaer Instance + description: Delete a specific API Manager Instance in a specific environment and organization. Connected Apps require the scope Manage APIs Configuration. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '204': + $ref: '#/components/responses/SuccessDeleteApimInstance' + +components: + securitySchemes: + bearerAuth: # arbitrary name for the security scheme + type: http + scheme: bearer + bearerFormat: JWT + + responses: + UnauthorizedError: + description: Access token is missing or invalid + BadRequestError: + description: Bad request response + content: + application/json: + schema: + $ref: "#/components/schemas/errorsResponse" + NotFoundError: + description: resource not found + content: + application/json: + schema: + type: object + properties: + name: + type: string + message: + type: string + SuccessGetApimInstances: + description: List of APIM Instances + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstances' + SuccessPostApimInstance: + description: Create APIM Instance + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstancePostBody' + SuccessGetApimInstanceDetails: + description: API Instance + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstanceDetails' + SuccessPatchApimInstance: + description: API Instance Patch + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstancePatchBody' + SuccessDeleteApimInstance: + description: API Instance Delete + + schemas: + errorsResponse: + type: object + title: errorsResponse + properties: + errors: + type: array + items: + type: object + properties: + type: + type: string + title: type + dataPath: + type: string + title: dataPath + keyword: + type: string + title: keyword + schema: + type: string + title: schema + data: + type: string + title: data + message: + type: string + title: message + + ApimInstances: + type: object + properties: + total: + type: integer + assets: + type: array + items: + type: object + properties: + audit: + $ref: '#/components/schemas/audit' + masterOrganizationId: + type: string + organizationId: + type: string + id: + type: integer + name: + type: string + exchangeAssetName: + type: string + groupId: + type: string + assetId: + type: string + apis: + type: array + items: + type: object + properties: + audit: + type: object + properties: + created: + type: object + properties: + date: + type: string + format: date-time + updated: + type: object + properties: + date: + type: string + format: date-time + masterOrganizationId: + type: string + organizationId: + type: string + id: + type: integer + instanceLabel: + type: string + groupId: + type: string + assetId: + type: string + assetVersion: + type: string + productVersion: + type: string + description: + type: string + tags: + type: array + items: + type: string + order: + type: integer + providerId: + type: string + deprecated: + type: boolean + lastActiveDate: + type: string + endpointUri: + type: string + environmentId: + type: string + isPublic: + type: boolean + stage: + type: string + technology: + type: string + status: + type: string + deployment: + $ref: '#/components/schemas/deployment' + routing: + $ref: '#/components/schemas/routing' + pinned: + type: boolean + activeContractsCount: + type: integer + autodiscoveryInstanceName: + type: string + totalApis: + type: integer + autodiscoveryApiName: + type: string + + ApimInstancePostBody: + title: ApimInstancePostBody + type: object + properties: + technology: + type: string + enum: + - flexGateway + - mule3 + - mule4 + - serviceMesh + endpoint: + $ref: '#/components/schemas/endpointPostBody' + spec: + $ref: '#/components/schemas/spec' + routing: + $ref: '#/components/schemas/routingPostBody' + deployment: + $ref: '#/components/schemas/deploymentPostBody' + instanceLabel: + type: string + + ApimInstanceDetails: + title: ApimInstanceDetails + type: object + properties: + audit: + $ref: '#/components/schemas/audit' + masterOrganizationId: + type: string + organizationId: + type: string + id: + type: string + instanceLabel: + type: string + groupId: + type: string + assetId: + type: string + assetVersion: + type: string + productVersion: + type: string + description: + type: string + nullable: true + tags: + type: array + items: + type: string + order: + type: integer + providerId: + type: string + nullable: true + deprecated: + type: boolean + lastActiveDate: + type: string + format: date-time + nullable: true + endpointUri: + type: string + environmentId: + type: string + isPublic: + type: boolean + stage: + type: string + technology: + type: string + endpoint: + $ref: '#/components/schemas/endpoint' + deployment: + $ref: '#/components/schemas/deployment' + routing: + $ref: '#/components/schemas/routingList' + status: + type: string + autodiscoveryInstanceName: + type: string + + ApimInstancePatchBody: + title: ApimInstancePatchBody + type: object + properties: + technology: + type: string + enum: + - flexGateway + - mule3 + - mule4 + - serviceMesh + endpoint: + $ref: '#/components/schemas/endpointPostBody' + spec: + $ref: '#/components/schemas/spec' + routing: + $ref: '#/components/schemas/routingPostBody' + deployment: + $ref: '#/components/schemas/deploymentPostBody' + instanceLabel: + type: string + + endpoint: + title: endpoint + type: object + properties: + audit: + $ref: '#/components/schemas/audit' + id: + type: integer + type: + type: string + uri: + type: string + apiGatewayVersion: + type: string + proxyUri: + type: string + proxyRegistrationUri: + type: string + nullable: true + lastActiveDate: + type: string + format: date-time + nullable: true + isCloudHub: + type: string + nullable: true + deploymentType: + type: string + policiesVersion: + type: string + nullable: true + referencesUserDomain: + type: string + nullable: true + responseTimeout: + type: string + nullable: true + wsdlConfig: + type: string + nullable: true + tlsContexts: + type: object + muleVersion4OrAbove: + type: boolean + nullable: true + apiVersionId: + type: integer + validation: + type: string + console: + type: string + nullable: true + + endpointPostBody: + title: endpointPostBody + type: object + properties: + deploymentType: + type: string + muleVersion4OrAbove: + type: boolean + uri: + type: string + type: + type: string + isCloudHub: + type: string + nullable: true + proxyUri: + type: string + nullable: true + referencesUserDomain: + type: string + nullable: true + responseTimeout: + type: string + nullable: true + tlsContexts: + type: object + properties: + inbound: + nullable: true + + spec: + title: spec + type: object + properties: + assetId: + type: string + groupId: + type: string + version: + type: string + + audit: + type: object + properties: + created: + type: object + properties: + date: + type: string + format: date-time + updated: + type: object + properties: + date: + type: string + format: date-time + required: + - date + additionalProperties: false + + deployment: + title: deployment + type: object + properties: + audit: + $ref: "#/components/schemas/audit" + id: + type: integer + applicationId: + type: string + applicationName: + type: string + nullable: true + gatewayVersion: + type: string + nullable: true + environmentName: + type: string + nullable: true + environmentId: + type: string + nullable: true + targetId: + type: string + targetName: + type: string + deploymentId: + type: string + nullable: true + updatedDate: + type: string + format: date-time + type: + type: string + expectedStatus: + type: string + apiId: + type: integer + + deploymentPostBody: + title: deploymentPostBody + type: object + properties: + environmentId: + type: string + type: + type: string + expectedStatus: + type: string + overwrite: + type: string + targetId: + type: string + targetName: + type: string + gatewayVersion: + type: string + + routing: + title: routing + type: object + properties: + label: + type: string + upstreams: + type: array + items: + type: object + properties: + id: + type: string + weight: + type: integer + uri: + type: string + label: + type: string + + routingList: + title: routingList + type: array + items: + $ref: '#/components/schemas/routing' + + routingPostBody: + title: routingPostBody + type: array + items: + title: routingPostBodyItem + properties: + label: + type: string + upstreams: + properties: + weight: + type: integer + uri: + type: string + label: + type: string + + + + From f60b26d8b46c2f165ba1eb49fbaae9bdf72ba974 Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 26 Dec 2023 11:25:55 +0100 Subject: [PATCH 20/61] updates api manager --- spec/apim.yml | 106 +++++++++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 54 deletions(-) diff --git a/spec/apim.yml b/spec/apim.yml index 45357a0..8f66781 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -32,7 +32,7 @@ paths: schema: type: string get: - operationId: GetApimInstances + operationId: GetEnvApimInstances parameters: - name: query in: query @@ -114,18 +114,18 @@ paths: schema: type: boolean summary: Retrieves a collection of API Manager Instances - description: Retrieves collection of API Manager Instances that meets the given criteria + description: Retrieves collection of API Manager Instances that meets the given criteria. Connected Apps require the scope "View APIs Configuration" responses: '401': $ref: '#/components/responses/UnauthorizedError' '400': $ref: '#/components/responses/BadRequestError' '200': # status code - $ref: '#/components/responses/SuccessGetApimInstances' + $ref: '#/components/responses/SuccessGetApimInstanceCollection' post: operationId: PostApimInstance summary: Creates an API Manager Instance - description: Creates an API Manager Instance + description: Creates an API Manager Instance in a given environment. Connected Apps require the scope "Manage APIs Configuration". requestBody: description: 'Post API Manager Instance Body' content: @@ -140,7 +140,7 @@ paths: '201': # status code $ref: '#/components/responses/SuccessPostApimInstance' - /apimanager/xapi/v1/organizations/{orgId}/environments/{envId}/apis/{environmentApiId}: + /apimanager/xapi/v1/organizations/{orgId}/environments/{envId}/apis/{envApiId}: parameters: - in: path name: orgId @@ -155,7 +155,7 @@ paths: schema: type: string - in: path - name: environmentApiId + name: envApiId description: The api manager instance id for a given environment required: true schema: @@ -182,7 +182,7 @@ paths: schema: type: boolean summary: Retrieves a specific API Manager Instance - description: Retrieves a specific API Manager Instance for a specific environment and organization. Connected Apps require the scope View APIs Configuration + description: Retrieves a specific API Manager Instance for a specific environment and organization. Connected Apps require the scope "View APIs Configuration". responses: '401': $ref: '#/components/responses/UnauthorizedError' @@ -208,7 +208,7 @@ paths: schema: type: boolean summary: Patches a specific API Manager Instance - description: Patches a specific API Manager Instance in a specific environment and organization. Connected Apps require the scope Manage APIs Configuration. + description: Patches a specific API Manager Instance in a specific environment and organization. Connected Apps require the scope "Manage APIs Configuration". requestBody: description: 'Patch API Manager Instance Body' content: @@ -223,11 +223,11 @@ paths: '404': $ref: '#/components/responses/NotFoundError' '200': # status code - $ref: '#/components/responses/SuccessGetApimInstances' + $ref: '#/components/responses/SuccessPatchApimInstance' delete: operationId: DeleteApimInstance - summary: Delete a specific API Managaer Instance - description: Delete a specific API Manager Instance in a specific environment and organization. Connected Apps require the scope Manage APIs Configuration. + summary: Delete a specific API Manager Instance + description: Delete a specific API Manager Instance in a specific environment and organization. Connected Apps require the scope "Manage APIs Configuration". responses: '401': $ref: '#/components/responses/UnauthorizedError' @@ -263,12 +263,12 @@ components: type: string message: type: string - SuccessGetApimInstances: - description: List of APIM Instances + SuccessGetApimInstanceCollection: + description: Collection of APIM Instances content: application/json: schema: - $ref: '#/components/schemas/ApimInstances' + $ref: '#/components/schemas/ApimInstanceCollection' SuccessPostApimInstance: description: Create APIM Instance content: @@ -319,7 +319,7 @@ components: type: string title: message - ApimInstances: + ApimInstanceCollection: type: object properties: total: @@ -330,7 +330,7 @@ components: type: object properties: audit: - $ref: '#/components/schemas/audit' + $ref: '#/components/schemas/Audit' masterOrganizationId: type: string organizationId: @@ -408,9 +408,9 @@ components: status: type: string deployment: - $ref: '#/components/schemas/deployment' + $ref: '#/components/schemas/Deployment' routing: - $ref: '#/components/schemas/routing' + $ref: '#/components/schemas/Routing' pinned: type: boolean activeContractsCount: @@ -434,13 +434,13 @@ components: - mule4 - serviceMesh endpoint: - $ref: '#/components/schemas/endpointPostBody' + $ref: '#/components/schemas/EndpointPostBody' spec: - $ref: '#/components/schemas/spec' + $ref: '#/components/schemas/Spec' routing: - $ref: '#/components/schemas/routingPostBody' + $ref: '#/components/schemas/RoutingPostBody' deployment: - $ref: '#/components/schemas/deploymentPostBody' + $ref: '#/components/schemas/DeploymentPostBody' instanceLabel: type: string @@ -449,7 +449,7 @@ components: type: object properties: audit: - $ref: '#/components/schemas/audit' + $ref: '#/components/schemas/Audit' masterOrganizationId: type: string organizationId: @@ -495,11 +495,11 @@ components: technology: type: string endpoint: - $ref: '#/components/schemas/endpoint' + $ref: '#/components/schemas/Endpoint' deployment: - $ref: '#/components/schemas/deployment' + $ref: '#/components/schemas/Deployment' routing: - $ref: '#/components/schemas/routingList' + $ref: '#/components/schemas/RoutingCollection' status: type: string autodiscoveryInstanceName: @@ -517,22 +517,22 @@ components: - mule4 - serviceMesh endpoint: - $ref: '#/components/schemas/endpointPostBody' + $ref: '#/components/schemas/EndpointPostBody' spec: - $ref: '#/components/schemas/spec' + $ref: '#/components/schemas/Spec' routing: - $ref: '#/components/schemas/routingPostBody' + $ref: '#/components/schemas/RoutingPostBody' deployment: - $ref: '#/components/schemas/deploymentPostBody' + $ref: '#/components/schemas/DeploymentPostBody' instanceLabel: type: string - endpoint: - title: endpoint + Endpoint: + title: Endpoint type: object properties: audit: - $ref: '#/components/schemas/audit' + $ref: '#/components/schemas/Audit' id: type: integer type: @@ -580,8 +580,8 @@ components: type: string nullable: true - endpointPostBody: - title: endpointPostBody + EndpointPostBody: + title: EndpointPostBody type: object properties: deploymentType: @@ -610,8 +610,8 @@ components: inbound: nullable: true - spec: - title: spec + Spec: + title: Spec type: object properties: assetId: @@ -621,7 +621,8 @@ components: version: type: string - audit: + Audit: + title: Audit type: object properties: created: @@ -636,16 +637,13 @@ components: date: type: string format: date-time - required: - - date - additionalProperties: false - deployment: - title: deployment + Deployment: + title: Deployment type: object properties: audit: - $ref: "#/components/schemas/audit" + $ref: "#/components/schemas/Audit" id: type: integer applicationId: @@ -679,8 +677,8 @@ components: apiId: type: integer - deploymentPostBody: - title: deploymentPostBody + DeploymentPostBody: + title: DeploymentPostBody type: object properties: environmentId: @@ -698,8 +696,8 @@ components: gatewayVersion: type: string - routing: - title: routing + Routing: + title: Routing type: object properties: label: @@ -718,17 +716,17 @@ components: label: type: string - routingList: - title: routingList + RoutingCollection: + title: RoutingCollection type: array items: - $ref: '#/components/schemas/routing' + $ref: '#/components/schemas/Routing' - routingPostBody: - title: routingPostBody + RoutingPostBody: + title: RoutingPostBody type: array items: - title: routingPostBodyItem + title: RoutingPostBodyItem properties: label: type: string From a51193cd87e9d9e8e635ce4e1ccb5642376ebd13 Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 26 Dec 2023 11:26:49 +0100 Subject: [PATCH 21/61] adds api manager upstream specification --- spec/apim_upstream.yml | 284 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 spec/apim_upstream.yml diff --git a/spec/apim_upstream.yml b/spec/apim_upstream.yml new file mode 100644 index 0000000..a5bbee2 --- /dev/null +++ b/spec/apim_upstream.yml @@ -0,0 +1,284 @@ +openapi: 3.0.0 +info: + title: API Manager Upstream API + description: API Manager Upstream API + version: 1.0.0 + +servers: + - url: https://anypoint.mulesoft.com/apimanager/api/v1/ + description: Anypoint Cloudhub + - url: https://eu1.anypoint.mulesoft.com/apimanager/api/v1/ + description: Anypoint Cloudhub EU + - url: https://gov.anypoint.mulesoft.com/apimanager/api/v1/ + description: Anypoint Cloudhub GOV + +security: + - bearerAuth: [] + + +paths: + /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: envApiId + description: The api id specific to a given environment + required: true + schema: + type: string + get: + operationId: GetApimInstanceUpstreams + summary: Retrieve all upstreams of a given API Manager instance + description: Retrieves all upstreams for a given API Manager instance in a given environment. Connected App requires the scope "View APIs Configuration" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetApimInstanceUpstreams' + post: + operationId: PostApimInstanceUpstream + summary: Creates an upstream for a given API Manager instance + description: Creates an upstream for a given API Manager instance in a given environment. Connected App requires the scope "Manage APIs Configuration" + requestBody: + description: 'Post API Manager Instance Upstream Body' + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamPostBody' + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '201': # status code + $ref: '#/components/responses/SuccessPostApimInstanceUpstream' + + /organizations/{orgId}/environments/{envId}/apis/{envApiId}/upstreams/{upstreamId}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: envApiId + description: The api id specific to a given environment + required: true + schema: + type: string + - in: path + name: upstreamId + description: The upstream id + required: true + schema: + type: string + get: + operationId: GetApimInstanceUpstream + summary: Retrieve a specific upstream for a given API Manager instance + description: Retrieve a specific upstream for a given API Manager instance in a given environment. Connected App requires the scope "View APIs Configuration" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetApimInstanceUpstream' + patch: + operationId: PatchApimInstanceUpstream + summary: Update a specific upstream in a given API Manager instance + description: Update a specific upstream in a given API Manager instance in a given environment. Connected App requires the scope "Manage APIs Configuration" + requestBody: + description: 'Patch API Manager Instance Upstream Body' + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamPatchBody' + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessPatchApimInstanceUpstream' + delete: + operationId: DeleteApimInstanceUpstream + summary: Delete a specific Upstream of the given API Manager Instance + description: Delete a specific Upstream in a API Manager Instance in a specific environment and organization. Connected Apps require the scope "Manage APIs Configuration". + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '204': + $ref: '#/components/responses/SuccessDeleteApimInstanceUpstream' + +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + + responses: + UnauthorizedError: + description: Access token is missing or invalid + BadRequestError: + description: Bad request response + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorsResponse" + NotFoundError: + description: resource not found + content: + application/json: + schema: + type: object + properties: + name: + type: string + message: + type: string + SuccessGetApimInstanceUpstreams: + description: Collection of upstreams in a given api manager instance + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamCollection' + SuccessPostApimInstanceUpstream: + description: Upstream post response + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamDetails' + SuccessGetApimInstanceUpstream: + description: single upstream in a given api manager instance + content: + application/json: + schema: + $ref: '#/components/schemas/UpstreamDetails' + SuccessPatchApimInstanceUpstream: + description: Upstream patch response + content: + application/json: + schema: + $ref: '#/components/schemas/Upstream' + SuccessDeleteApimInstanceUpstream: + description: delete upstream response + + schemas: + ErrorsResponse: + type: object + title: errorsResponse + properties: + errors: + type: array + items: + type: object + properties: + type: + type: string + title: type + dataPath: + type: string + title: dataPath + keyword: + type: string + title: keyword + schema: + type: string + title: schema + data: + type: string + title: data + message: + type: string + title: message + + UpstreamCollection: + type: object + properties: + total: + type: integer + upstreams: + type: array + items: + $ref: '#/components/schemas/UpstreamDetails' + + UpstreamDetails: + type: object + properties: + audit: + $ref: "#/components/schemas/Audit" + id: + type: string + label: + type: string + uri: + type: string + + Upstream: + type: object + properties: + id: + type: string + label: + type: string + uri: + type: string + + UpstreamPostBody: + type: object + properties: + label: + type: string + uri: + type: string + + UpstreamPatchBody: + type: object + properties: + label: + type: string + uri: + type: string + + Audit: + type: object + properties: + created: + type: object + properties: + date: + type: string + format: date-time + updated: + type: object + properties: + date: + type: string + format: date-time + + + + From 47f9a6d458d1b355447360b68755d4ce8fc668df Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 27 Dec 2023 11:06:05 +0100 Subject: [PATCH 22/61] updates apim_upstream with tlsContext --- spec/apim_upstream.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/spec/apim_upstream.yml b/spec/apim_upstream.yml index a5bbee2..266b58a 100644 --- a/spec/apim_upstream.yml +++ b/spec/apim_upstream.yml @@ -236,6 +236,20 @@ components: type: string uri: type: string + tlsContext: + type: object + nullable: true + properties: + audit: + $ref: "#/components/schemas/Audit" + secretGroupId: + type: string + tlsContextId: + type: string + name: + type: string + authorized: + type: boolean Upstream: type: object @@ -246,6 +260,15 @@ components: type: string uri: type: string + tlsContext: + type: object + properties: + secretGroupId: + type: string + tlsContextId: + type: string + audit: + $ref: '#/components/schemas/Audit' UpstreamPostBody: type: object @@ -254,6 +277,13 @@ components: type: string uri: type: string + tlsContext: + type: object + properties: + secretGroupId: + type: string + tlsContextId: + type: string UpstreamPatchBody: type: object @@ -262,6 +292,13 @@ components: type: string uri: type: string + tlsContext: + type: object + properties: + secretGroupId: + type: string + tlsContextId: + type: string Audit: type: object From ee2a568c5675853cf9247f46b68be3c191a1e531 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 27 Dec 2023 11:13:19 +0100 Subject: [PATCH 23/61] updates apim with tlsContext on endpoint --- spec/apim.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/spec/apim.yml b/spec/apim.yml index 8f66781..8a7ade3 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -579,6 +579,26 @@ components: console: type: string nullable: true + tlsContext: + type: object + properties: + audit: + $ref: '#/components/schemas/Audit' + inbound: + nullable: true + type: object + properties: + secretGroupId: + type: string + tlsContextId: + type: string + name: + type: string + authorized: + type: boolean + outbound: + type: object + nullable: true EndpointPostBody: title: EndpointPostBody @@ -608,7 +628,15 @@ components: type: object properties: inbound: + type: object nullable: true + properties: + tlsContextId: + type: string + secretGroupId: + type: string + name: + type: string Spec: title: Spec From b7c5e14d90c0876d7bbcffc73edadddc80303a75 Mon Sep 17 00:00:00 2001 From: souf Date: Thu, 28 Dec 2023 08:08:25 +0100 Subject: [PATCH 24/61] updates apim by adding rules to routing object --- spec/apim.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/spec/apim.yml b/spec/apim.yml index 8a7ade3..fceb8e4 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -730,6 +730,17 @@ components: properties: label: type: string + rules: + type: object + properties: + methods: + type: string + host: + type: string + path: + type: string + headers: + type: object upstreams: type: array items: @@ -758,7 +769,19 @@ components: properties: label: type: string + rules: + type: object + properties: + methods: + type: string + host: + type: string + path: + type: string + headers: + type: object upstreams: + type: object properties: weight: type: integer From b59ff2138fd3defbbe5fe368227277e74f65a6ab Mon Sep 17 00:00:00 2001 From: souf Date: Thu, 28 Dec 2023 08:54:08 +0100 Subject: [PATCH 25/61] updates apim by adding nullable everywhere --- spec/apim.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/spec/apim.yml b/spec/apim.yml index fceb8e4..8c2008e 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -537,12 +537,16 @@ components: type: integer type: type: string + nullable: true uri: type: string + nullable: true apiGatewayVersion: type: string + nullable: true proxyUri: type: string + nullable: true proxyRegistrationUri: type: string nullable: true @@ -576,6 +580,7 @@ components: type: integer validation: type: string + nullable: true console: type: string nullable: true @@ -603,6 +608,7 @@ components: EndpointPostBody: title: EndpointPostBody type: object + nullable: true properties: deploymentType: type: string @@ -669,6 +675,7 @@ components: Deployment: title: Deployment type: object + nullable: true properties: audit: $ref: "#/components/schemas/Audit" @@ -708,6 +715,7 @@ components: DeploymentPostBody: title: DeploymentPostBody type: object + nullable: true properties: environmentId: type: string @@ -727,6 +735,7 @@ components: Routing: title: Routing type: object + nullable: true properties: label: type: string @@ -765,7 +774,8 @@ components: title: RoutingPostBody type: array items: - title: RoutingPostBodyItem + type: object + nullable: true properties: label: type: string From 1a671532594864262d2e737b0cea7c29e968c3ed Mon Sep 17 00:00:00 2001 From: souf Date: Thu, 28 Dec 2023 12:37:11 +0100 Subject: [PATCH 26/61] apim: fixes issue on the routing property on the GetEnvApimInstances --- spec/apim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/apim.yml b/spec/apim.yml index 8c2008e..5c102c2 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -410,7 +410,7 @@ components: deployment: $ref: '#/components/schemas/Deployment' routing: - $ref: '#/components/schemas/Routing' + $ref: '#/components/schemas/RoutingCollection' pinned: type: boolean activeContractsCount: From f4fe9c0b0f9a6f355dc87a35fa07faad21f5e1ac Mon Sep 17 00:00:00 2001 From: souf Date: Thu, 28 Dec 2023 19:59:55 +0100 Subject: [PATCH 27/61] apim: fixes typos --- spec/apim.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/apim.yml b/spec/apim.yml index 5c102c2..0a484fa 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -571,8 +571,6 @@ components: wsdlConfig: type: string nullable: true - tlsContexts: - type: object muleVersion4OrAbove: type: boolean nullable: true @@ -584,7 +582,7 @@ components: console: type: string nullable: true - tlsContext: + tlsContexts: type: object properties: audit: @@ -632,6 +630,7 @@ components: nullable: true tlsContexts: type: object + nullable: true properties: inbound: type: object From ac4783303f8198eaac3a71db6e092b1f1dc868a8 Mon Sep 17 00:00:00 2001 From: souf Date: Fri, 29 Dec 2023 09:15:56 +0100 Subject: [PATCH 28/61] apim: adds missing proxyRegistrationUri attribute to endpointPostBody --- spec/apim.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/apim.yml b/spec/apim.yml index 0a484fa..9f6b94f 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -622,6 +622,9 @@ components: proxyUri: type: string nullable: true + proxyRegistrationUri: + type: string + nullable: true referencesUserDomain: type: string nullable: true From bf0b6d7ffc5d969a2ebfbe3cb6e786ba43cad4a8 Mon Sep 17 00:00:00 2001 From: souf Date: Fri, 29 Dec 2023 09:53:53 +0100 Subject: [PATCH 29/61] apim: fixes type of overwrite in DeploymentPostBody --- spec/apim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/apim.yml b/spec/apim.yml index 9f6b94f..d42f255 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -726,7 +726,7 @@ components: expectedStatus: type: string overwrite: - type: string + type: boolean targetId: type: string targetName: From 26e9b2bea5a20db29a3647e0eada072b120c3d93 Mon Sep 17 00:00:00 2001 From: souf Date: Fri, 29 Dec 2023 11:03:26 +0100 Subject: [PATCH 30/61] apim: adds missing schemas for post and patch resources --- spec/apim.yml | 76 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 2 deletions(-) diff --git a/spec/apim.yml b/spec/apim.yml index d42f255..0c5e326 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -274,7 +274,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/ApimInstancePostBody' + $ref: '#/components/schemas/ApimInstancePostResponse' SuccessGetApimInstanceDetails: description: API Instance content: @@ -286,7 +286,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/ApimInstancePatchBody' + $ref: '#/components/schemas/ApimInstancePatchResponse' SuccessDeleteApimInstance: description: API Instance Delete @@ -444,6 +444,48 @@ components: instanceLabel: type: string + ApimInstancePostResponse: + type: object + properties: + environmentId: + type: string + format: uuid + instanceLabel: + type: string + providerId: + type: string + nullable: true + technology: + type: string + assetVersion: + type: string + productVersion: + type: string + order: + type: integer + stage: + type: string + audit: + $ref: '#/components/schemas/Audit' + masterOrganizationId: + type: string + organizationId: + type: string + id: + type: integer + groupId: + type: string + assetId: + type: string + tags: + type: array + items: + type: string + endpoint: + $ref: '#/components/schemas/Endpoint' + autodiscoveryInstanceName: + type: string + ApimInstanceDetails: title: ApimInstanceDetails type: object @@ -505,6 +547,36 @@ components: autodiscoveryInstanceName: type: string + + ApimInstancePatchResponse: + type: object + properties: + audit: + $ref: "#/components/schemas/Audit" + masterOrganizationId: + type: string + organizationId: + type: string + id: + type: integer + instanceLabel: + type: string + providerId: + type: string + nullable: true + endpointUri: + type: string + environmentId: + type: string + technology: + type: string + routing: + $ref: "#/components/schemas/RoutingCollection" + endpoint: + $ref: "#/components/schemas/Endpoint" + deployment: + $ref: "#/components/schemas/Deployment" + ApimInstancePatchBody: title: ApimInstancePatchBody type: object From 6fe80150b7065aa6a384cf7c06982aede99261fe Mon Sep 17 00:00:00 2001 From: souf Date: Sun, 31 Dec 2023 10:46:56 +0100 Subject: [PATCH 31/61] apim_upstream: updates postbody and patch body --- spec/apim_upstream.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/apim_upstream.yml b/spec/apim_upstream.yml index 266b58a..13cc7d2 100644 --- a/spec/apim_upstream.yml +++ b/spec/apim_upstream.yml @@ -279,6 +279,7 @@ components: type: string tlsContext: type: object + nullable: true properties: secretGroupId: type: string @@ -294,6 +295,7 @@ components: type: string tlsContext: type: object + nullable: true properties: secretGroupId: type: string From 5714af4c6f48d4043b7d0ffe3fd036b9526f52cb Mon Sep 17 00:00:00 2001 From: souf Date: Sun, 31 Dec 2023 11:30:21 +0100 Subject: [PATCH 32/61] apim: makes routingPostBody nullable --- spec/apim.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/apim.yml b/spec/apim.yml index 0c5e326..5209dfd 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -847,6 +847,7 @@ components: RoutingPostBody: title: RoutingPostBody type: array + nullable: true items: type: object nullable: true From 97e3025608f358f98482a4edf8125a2080c622f7 Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 2 Jan 2024 08:19:44 +0100 Subject: [PATCH 33/61] apim: fixes error in path --- spec/apim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/apim.yml b/spec/apim.yml index 5209dfd..600842e 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -140,7 +140,7 @@ paths: '201': # status code $ref: '#/components/responses/SuccessPostApimInstance' - /apimanager/xapi/v1/organizations/{orgId}/environments/{envId}/apis/{envApiId}: + /organizations/{orgId}/environments/{envId}/apis/{envApiId}: parameters: - in: path name: orgId From 1c3fd4d646722a24b486baeaab660cdd6f8abad5 Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 2 Jan 2024 12:14:51 +0100 Subject: [PATCH 34/61] apim: fixes issue with path --- spec/apim.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/apim.yml b/spec/apim.yml index 600842e..b43cbe2 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -16,8 +16,7 @@ security: - bearerAuth: [] paths: - - /organizations/:orgId/environments/:envId/apis: + /organizations/{orgId}/environments/{envId}/apis: parameters: - in: path name: orgId @@ -497,7 +496,7 @@ components: organizationId: type: string id: - type: string + type: integer instanceLabel: type: string groupId: @@ -547,7 +546,6 @@ components: autodiscoveryInstanceName: type: string - ApimInstancePatchResponse: type: object properties: From cf2d41c34c694274e379fe55faf85c5fc91aa18a Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 2 Jan 2024 12:20:32 +0100 Subject: [PATCH 35/61] apim: minor update to schema --- spec/apim.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/spec/apim.yml b/spec/apim.yml index b43cbe2..931620b 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -350,20 +350,7 @@ components: type: object properties: audit: - type: object - properties: - created: - type: object - properties: - date: - type: string - format: date-time - updated: - type: object - properties: - date: - type: string - format: date-time + $ref: "#/components/schemas/Audit" masterOrganizationId: type: string organizationId: From 80c2c27ff56778b4ca2234fe878342b2e200e663 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 3 Jan 2024 17:22:51 +0100 Subject: [PATCH 36/61] apim: updates instanceLabel to be nullable --- spec/apim.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/apim.yml b/spec/apim.yml index 931620b..c1eab66 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -429,6 +429,7 @@ components: $ref: '#/components/schemas/DeploymentPostBody' instanceLabel: type: string + nullable: true ApimInstancePostResponse: type: object From 9b8ceddf3ad09611214e1e28a38318276fd006e0 Mon Sep 17 00:00:00 2001 From: souf Date: Sat, 6 Jan 2024 08:13:46 +0100 Subject: [PATCH 37/61] apim: updates patch operation to use an open schema --- spec/apim.yml | 68 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 18 deletions(-) diff --git a/spec/apim.yml b/spec/apim.yml index c1eab66..0d979ab 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -566,24 +566,56 @@ components: ApimInstancePatchBody: title: ApimInstancePatchBody type: object - properties: - technology: - type: string - enum: - - flexGateway - - mule3 - - mule4 - - serviceMesh - endpoint: - $ref: '#/components/schemas/EndpointPostBody' - spec: - $ref: '#/components/schemas/Spec' - routing: - $ref: '#/components/schemas/RoutingPostBody' - deployment: - $ref: '#/components/schemas/DeploymentPostBody' - instanceLabel: - type: string + example: > + { + "technology": "flexGateway", + "providerId": null, + "endpoint": { + "deploymentType": "HY", + "muleVersion4OrAbove": null, + "type": "raml", + "isCloudHub": null, + "proxyUri": "https://0.0.0.0:8082/", + "referencesUserDomain": null, + "responseTimeout": null, + "tlsContexts": null + }, + "spec": { + "assetId": "flex-backend-app-test", + "groupId": "aa1f55d6-213d-4f60-845c-207286484cd1", + "version": "1.0.0" + }, + "instanceLabel": "instance Label", + "routing": [ + { + "upstreams": [ + { + "weight": 100, + "id": "dc1e2a8b-36b2-402f-8200-d587ef8c5282" + } + ], + "label": "Route 01", + "rules": { + "methods": "GET|PUT|DELETE|OPTIONS|POST|PATCH|HEAD|TRACE|CONNECT", + "host": "myhost2.com", + "path": "/api/(.*)", + "headers": { + "x-correlation-id": "1212", + "x-example": "hello" + } + } + } + ], + "deployment": { + "environmentId": "7074fcdd-9b23-4ab3-97c8-5db5f4adf17d", + "type": "HY", + "expectedStatus": "deployed", + "overwrite": false, + "targetId": "c33dac89-4ca6-4951-9ad5-19ace129029e", + "targetName": "sbo-gateway", + "gatewayVersion": "1.0.0" + } + } Endpoint: title: Endpoint From c6b2feef65db701a62aa4044222ca6d21c30dc5e Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 9 Jan 2024 13:06:22 +0100 Subject: [PATCH 38/61] renames flex gateway specification --- spec/{flex_gateway.yml => flexgateway.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename spec/{flex_gateway.yml => flexgateway.yml} (100%) diff --git a/spec/flex_gateway.yml b/spec/flexgateway.yml similarity index 100% rename from spec/flex_gateway.yml rename to spec/flexgateway.yml From 8ed685a1637dae79c3183072559d09a52d9d7505 Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 9 Jan 2024 20:21:47 +0100 Subject: [PATCH 39/61] flexgateway: adds registrationToken endpoint --- spec/flexgateway.yml | 55 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/spec/flexgateway.yml b/spec/flexgateway.yml index 8a062b3..af8c35f 100644 --- a/spec/flexgateway.yml +++ b/spec/flexgateway.yml @@ -2,20 +2,20 @@ openapi: 3.0.0 info: title: Flex Gateway API description: Description of the Flex Gateway API - version: 1.0.0 + version: 1.1.0 servers: - - url: https://anypoint.mulesoft.com/apimanager/xapi/v1 + - url: https://anypoint.mulesoft.com description: Anypoint Cloudhub - - url: https://eu1.anypoint.mulesoft.com/apimanager/xapi/v1 + - url: https://eu1.anypoint.mulesoft.com description: Anypoint Cloudhub EU - - url: https://gov.anypoint.mulesoft.com/apimanager/xapi/v1 + - url: https://gov.anypoint.mulesoft.com description: Anypoint Cloudhub GOV security: - bearerAuth: [] paths: - /organizations/{orgId}/environments/{envId}/flex-gateway-targets: + /apimanager/xapi/v1/organizations/{orgId}/environments/{envId}/flex-gateway-targets: parameters: - in: path name: orgId @@ -39,7 +39,7 @@ paths: '200': # status code $ref: '#/components/responses/SuccessGetFlexGatewayTargets' - /organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}: + /apimanager/xapi/v1/organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}: parameters: - in: path name: orgId @@ -69,7 +69,7 @@ paths: '200': # status code $ref: '#/components/responses/SuccessGetFlexGatewayTargetDetails' - /organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}/apis: + /apimanager/xapi/v1/organizations/{orgId}/environments/{envId}/flex-gateway-targets/{flexGatewayTargetId}/apis: parameters: - in: path name: orgId @@ -99,7 +99,29 @@ paths: '200': # status code $ref: '#/components/responses/SuccessGetFlexGatewayTargetApis' - + /standalone/api/v1/organizations/{orgId}/environments/{envId}/gatewaytokens: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment Id + required: true + schema: + type: string + post: + operationId: GetFlexGatewayRegistrationToken + summary: Retrieves the flex gateway registration token. + description: Retrieves the flex gateway registration token. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '200': # status code + $ref: '#/components/responses/SuccessGetFlexGatewayRegistrationToken' components: securitySchemes: @@ -111,27 +133,31 @@ components: responses: UnauthorizedError: description: Access token is missing or invalid - SuccessGetFlexGatewayTargets: description: List of flex gateway targets content: application/json: schema: $ref: '#/components/schemas/FlexGatewayTargets' - SuccessGetFlexGatewayTargetDetails: description: flex gateway target details content: application/json: schema: $ref: '#/components/schemas/FlexGatewayTargetDetails' - SuccessGetFlexGatewayTargetApis: description: flex gateway target Apis content: application/json: schema: $ref: '#/components/schemas/FlexGatewayTargetApis' + SuccessGetFlexGatewayRegistrationToken: + description: flex gateway registration token response + content: + application/json: + schema: + $ref: "#/components/schemas/FlexGatewayRegistrationToken" + schemas: FlexGatewayTargets: @@ -226,3 +252,10 @@ components: type: string targetAllowsPortSharing: type: boolean + + FlexGatewayRegistrationToken: + type: object + properties: + registrationToken: + type: string + From 3754ec2a36793dd75894c61b3eb4de23c875bb0f Mon Sep 17 00:00:00 2001 From: souf Date: Mon, 15 Jan 2024 08:58:48 +0100 Subject: [PATCH 40/61] adds secretgroup apis along with its sub-components APIs --- spec/secretgroup.yml | 275 +++++++++++ spec/secretgroup_certificate.yml | 417 ++++++++++++++++ spec/secretgroup_keystore.yml | 518 +++++++++++++++++++ spec/secretgroup_tlscontext.yml | 822 +++++++++++++++++++++++++++++++ spec/secretgroup_truststore.yml | 465 +++++++++++++++++ 5 files changed, 2497 insertions(+) create mode 100644 spec/secretgroup.yml create mode 100644 spec/secretgroup_certificate.yml create mode 100644 spec/secretgroup_keystore.yml create mode 100644 spec/secretgroup_tlscontext.yml create mode 100644 spec/secretgroup_truststore.yml diff --git a/spec/secretgroup.yml b/spec/secretgroup.yml new file mode 100644 index 0000000..959f03b --- /dev/null +++ b/spec/secretgroup.yml @@ -0,0 +1,275 @@ +openapi: 3.0.0 +info: + title: Secret Group API + description: Secret Group API + version: 1.0.0 + +servers: + - url: https://anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub + - url: https://eu1.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub EU + - url: https://gov.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub GOV + +security: + - bearerAuth: [] + +paths: + /organizations/{orgId}/environments/{envId}/secretGroups: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + get: + operationId: GetEnvSecretGroups + parameters: + - name: downloadable + in: query + description: Filter and fetch list of secret groups based on value of 'downloadable' flag. + required: false + schema: + type: boolean + summary: Retrieves a collection of secret groups + description: Retrieves collection of secret groups. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroupsCollection' + post: + operationId: PostSecretGroup + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SecretGroupPostBody" + summary: Creates a secret group + description: Creates a secret group. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '400': + $ref: '#/components/responses/BadRequestError' + '201': # status code + $ref: '#/components/responses/SuccessPostSecretGroup' + + /organizations/{orgId}/environments/{envId}/secretGroups/{secretGroupId}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: secretGroupId + description: The secret group id + required: true + schema: + type: string + get: + operationId: GetSecretGroup + summary: Retrieve a secret group + description: Retrieve a secret group by id. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroup' + patch: + operationId: PatchSecretGroup + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SecretGroupPatchBody" + summary: Update a secret group + description: Update a secret group by id. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessPatchSecretGroup' + delete: + operationId: DeleteSecretGroup + summary: Delete a secret group + description: Delete a secret group by id. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '204': # status code + $ref: '#/components/responses/SuccessDeleteSecretGroup' + +components: + securitySchemes: + bearerAuth: # arbitrary name for the security scheme + type: http + scheme: bearer + bearerFormat: JWT + + responses: + UnauthorizedError: + description: Access token is missing or invalid + BadRequestError: + description: Bad request response + content: + application/json: + schema: + $ref: "#/components/schemas/errorsResponse" + NotFoundError: + description: resource not found + content: + application/json: + schema: + type: object + properties: + name: + type: string + message: + type: string + SuccessGetSecretGroupsCollection: + description: get list secret groups + content: + application/json: + schema: + $ref: "#/components/schemas/SecretGroupCollection" + SuccessPostSecretGroup: + description: post secret group response + content: + application/json: + schema: + $ref: "#/components/schemas/SecretGroupPostResponse" + SuccessGetSecretGroup: + description: get secret group response + content: + application/json: + schema: + $ref: "#/components/schemas/SecretGroup" + SuccessPatchSecretGroup: + description: patch secret group response + content: + application/json: + schema: + $ref: "#/components/schemas/SecretGroupPatchResponse" + SuccessDeleteSecretGroup: + description: delete secret group response + + schemas: + errorsResponse: + type: object + title: errorsResponse + properties: + errors: + type: array + items: + type: object + properties: + type: + type: string + title: type + dataPath: + type: string + title: dataPath + keyword: + type: string + title: keyword + schema: + type: string + title: schema + data: + type: string + title: data + message: + type: string + title: message + + SecretGroupCollection: + type: array + items: + $ref: "#/components/schemas/SecretGroup" + + SecretGroup: + type: object + properties: + name: + type: string + downloadable: + type: boolean + meta: + $ref: "#/components/schemas/Meta" + + SecretGroupPostBody: + type: object + properties: + name: + type: string + downloadable: + type: boolean + + SecretGroupPatchBody: + type: object + properties: + name: + type: string + + SecretGroupPostResponse: + type: object + properties: + message: + type: string + id: + type: string + + SecretGroupPatchResponse: + type: object + properties: + message: + type: string + + Meta: + type: object + properties: + id: + type: string + createdAt: + type: string + modifiedAt: + type: string + modifiedBy: + type: string + locked: + type: boolean + lockedBy: + type: string + currentState: + type: string \ No newline at end of file diff --git a/spec/secretgroup_certificate.yml b/spec/secretgroup_certificate.yml new file mode 100644 index 0000000..68cd9f0 --- /dev/null +++ b/spec/secretgroup_certificate.yml @@ -0,0 +1,417 @@ +openapi: 3.0.0 +info: + title: Secret Group Keystore API + description: Secret Group Keystore API + version: 1.0.0 + +servers: + - url: https://anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub + - url: https://eu1.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub EU + - url: https://gov.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub GOV + +security: + - bearerAuth: [] + + +paths: + /organizations/{orgId}/environments/{envId}/secretGroups/{secretGroupId}/certificates: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: secretGroupId + description: The secret group id + required: true + schema: + type: string + get: + operationId: GetSecretGroupCertificates + summary: Retrieves a secret-groups' collection of certificates. + description: Retrieves a secret-groups' collection of certificates. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroupCertificatesCollection' + post: + operationId: PostSecretGroupCertificate + parameters: + - in: query + name: allowExpiredCert + description: With 'true' to allow uploading expired certificates + required: true + schema: + type: boolean + summary: Create a secret-groups' certificate. + description: Create a secret-groups' certificate. + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/CertificatePostBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '201': # status code + $ref: '#/components/responses/SuccessPostSecretGroupCertificate' + + /organizations/{orgId}/environments/{envId}/secretGroups/{secretGroupId}/certificates/{secretId}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: secretGroupId + description: The secret group id + required: true + schema: + type: string + - in: path + name: secretId + description: The truststore id + required: true + schema: + type: string + get: + operationId: GetSecretGroupCertificateDetails + summary: Retrieve certificate details + description: Retrieves certificate details by id for a given secret group in a given organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroupCertificate' + put: + operationId: PutSecretGroupCertificate + parameters: + - in: query + name: allowExpiredCert + description: With 'true' to allow uploading expired certificates + required: true + schema: + type: boolean + summary: Update a given secret-group certificate + description: Update certificate details for a given secret-group in a given organization and environment + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/CertificatePutBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessPutSecretGroupCertificate' + patch: + operationId: PatchSecretGroupCertificate + requestBody: + content: + application/json:: + schema: + $ref: "#/components/schemas/CertificatePatchBody" + summary: Update a given secret-group certificate + description: Update certificate details for a given secret-group in a given organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessPatchSecretGroupCertificate' + + +components: + securitySchemes: + bearerAuth: # arbitrary name for the security scheme + type: http + scheme: bearer + bearerFormat: JWT + + responses: + UnauthorizedError: + description: Access token is missing or invalid + BadRequestError: + description: Bad request response + content: + application/json: + schema: + $ref: "#/components/schemas/errorsResponse" + NotFoundError: + description: resource not found + content: + application/json: + schema: + type: object + properties: + name: + type: string + message: + type: string + SuccessGetSecretGroupCertificatesCollection: + description: get secret-group certificates + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateSummaryCollection" + SuccessPostSecretGroupCertificate: + description: post secret-group certificates + content: + application/json: + schema: + type: object + properties: + message: + type: string + id: + type: string + SuccessGetSecretGroupCertificate: + description: get secret-group certificate response + content: + application/json: + schema: + $ref: "#/components/schemas/Certificate" + SuccessPutSecretGroupCertificate: + description: put secret-group certificates response + content: + application/json: + schema: + type: object + properties: + message: + type: string + SuccessPatchSecretGroupCertificate: + description: patch secret-group certificates response + content: + application/json: + schema: + type: object + properties: + message: + type: string + + schemas: + errorsResponse: + type: object + title: errorsResponse + properties: + errors: + type: array + items: + type: object + properties: + type: + type: string + title: type + dataPath: + type: string + title: dataPath + keyword: + type: string + title: keyword + schema: + type: string + title: schema + data: + type: string + title: data + message: + type: string + title: message + + CertificateSummaryCollection: + type: array + items: + $ref: "#/components/schemas/CertificateSummary" + + CertificateSummary: + type: object + properties: + name: + type: string + meta: + $ref: "#/components/schemas/Meta" + expirationDate: + type: string + type: + type: string + + Certificate: + type: object + properties: + name: + type: string + expirationDate: + type: string + meta: + $ref: "#/components/schemas/Meta" + type: + type: string + details: + $ref: "#/components/schemas/CertificateDetails" + certificateFileName: + type: string + + CertificatePostBody: + type: object + properties: + expirationDate: + type: string + description: > + Date on which this secret should expire. If not set, by default, it will be set to notAfter date of this certificate. + Once the secret expires, a grant can not be requested for it. + certStore: + type: string + format: binary + description: The file containing the certificate in PEM format + type: + type: string + description: Type of certificate supported + enum: + - PEM + name: + type: string + description: The name of the certificate + + CertificatePutBody: + type: object + properties: + expirationDate: + type: string + description: > + Date on which this secret should expire. If not set, by default, it will be set to notAfter date of this certificate. + Once the secret expires, a grant can not be requested for it. + certStore: + type: string + format: binary + description: The file containing the certificate in PEM format + type: + type: string + description: Type of certificate supported + enum: + - PEM + name: + type: string + description: The name of the certificate + + CertificatePatchBody: + type: object + example: > + { + "name": "", + "expirationDate": "" + } + + Meta: + type: object + properties: + id: + type: string + path: + type: string + + IssuerSubject: + type: object + properties: + commonName: + type: string + organizationName: + type: string + localityName: + type: string + organizationUnit: + type: string + state: + type: string + countryName: + type: string + + CertificateValidity: + type: object + properties: + notBefore: + type: string + notAfter: + type: string + + CertificateDetails: + type: object + properties: + issuer: + $ref: "#/components/schemas/IssuerSubject" + subject: + $ref: "#/components/schemas/IssuerSubject" + subjectAlternativeName: + type: array + description: Collection of subject alternative names from the SubjectAltName x509 extension + items: + type: string + version: + type: string + serialNumber: + type: string + description: Serial number assigned by the CA to this certificate, in hex format + signatureAlgorithm: + type: string + description: Name of the signature algorithm + publicKeyAlgorithm: + type: string + description: The standard algorithm name for the public key of this certificate + basicConstraints: + type: object + description: This identifies if the subject of the certificate is a CA + properties: + certificateAuthority: + type: boolean + description: If set to true, indicates that this is a CA certificate. + validity: + $ref: "#/components/schemas/CertificateValidity" + keyUsage: + type: array + description: A list of values defining the purpose of the public key i.e. the key usage extensions from this certificate + items: + type: string + extendedKeyUsage: + type: array + description: A list of values providing details about the extended key usage extensions from this certificate. + items: + type: string + certificateType: + type: string + description: The type of this certificate + + + diff --git a/spec/secretgroup_keystore.yml b/spec/secretgroup_keystore.yml new file mode 100644 index 0000000..65451f9 --- /dev/null +++ b/spec/secretgroup_keystore.yml @@ -0,0 +1,518 @@ +openapi: 3.0.0 +info: + title: Secret Group Keystore API + description: Secret Group Keystore API + version: 1.0.0 + +servers: + - url: https://anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub + - url: https://eu1.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub EU + - url: https://gov.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub GOV + +security: + - bearerAuth: [] + +paths: + /organizations/{orgId}/environments/{envId}/secretGroups/{secretGroupId}/keystores: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: secretGroupId + description: The secret group id + required: true + schema: + type: string + get: + operationId: GetSecretGroupKeystores + parameters: + - in: query + name: type + description: Filter the elements on the response to be of a specific type from {PEM, JKS, JCEKS, PKCS12} + required: false + schema: + type: string + enum: + - PEM + - JKS + - JCEKS + - PKCS12 + summary: Retrieves a secret-groups' collection of keystores. + description: Retrieves a secret-groups' collection of keystores. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroupKeystoresCollection' + post: + operationId: PostSecretGroupKeystores + parameters: + - in: query + name: allowExpiredCert + description: With 'true' to allow uploading expired certificates + required: true + schema: + type: boolean + summary: Create a secret-groups' keystore. + description: Create a secret-groups' keystore. + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/KeystoreReqBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '201': # status code + $ref: '#/components/responses/SuccessPostSecretGroupKeystore' + + /organizations/{orgId}/environments/{envId}/secretGroups/{secretGroupId}/keystores/{secretId}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: secretGroupId + description: The secret group id + required: true + schema: + type: string + - in: path + name: secretId + description: The keystore id + required: true + schema: + type: string + get: + operationId: GetSecretGroupKeystoreDetails + summary: Retrieve keystore details + description: Retrieves keystore details by id for a given secret group in a given organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroupKeystore' + put: + operationId: PutSecretGroupKeystore + parameters: + - in: query + name: allowExpiredCert + description: With 'true' to allow uploading expired certificates + required: true + schema: + type: boolean + summary: Update a given secret-group keystore + description: Update keystore details for a given secret-group in a given organization and environment + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/KeystoreReqBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessPutSecretGroupKeystore' + patch: + operationId: PatchSecretGroupKeystore + requestBody: + content: + application/json:: + schema: + $ref: "#/components/schemas/KeystorePatchBody" + summary: Update a given secret-group keystore + description: Update keystore details for a given secret-group in a given organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessPatchSecretGroupKeystore' + +components: + securitySchemes: + bearerAuth: # arbitrary name for the security scheme + type: http + scheme: bearer + bearerFormat: JWT + + responses: + UnauthorizedError: + description: Access token is missing or invalid + BadRequestError: + description: Bad request response + content: + application/json: + schema: + $ref: "#/components/schemas/errorsResponse" + NotFoundError: + description: resource not found + content: + application/json: + schema: + type: object + properties: + name: + type: string + message: + type: string + SuccessGetSecretGroupKeystoresCollection: + description: get secret-groups keystores response + content: + application/json: + schema: + $ref: "#/components/schemas/KeystoreSummaryCollection" + SuccessPostSecretGroupKeystore: + description: post secret-groups keystore response + content: + application/json: + schema: + type: object + properties: + message: + type: string + id: + type: string + SuccessGetSecretGroupKeystore: + description: get secret-group keystore details response + content: + application/json: + schema: + $ref: "#/components/schemas/Keystore" + SuccessPutSecretGroupKeystore: + description: put secret-group keystore details response + content: + application/json: + schema: + type: object + properties: + message: + type: string + SuccessPatchSecretGroupKeystore: + description: patch secret-group keystore details response + content: + application/json: + schema: + type: object + properties: + message: + type: string + + schemas: + errorsResponse: + type: object + title: errorsResponse + properties: + errors: + type: array + items: + type: object + properties: + type: + type: string + title: type + dataPath: + type: string + title: dataPath + keyword: + type: string + title: keyword + schema: + type: string + title: schema + data: + type: string + title: data + message: + type: string + title: message + + KeystoreReqBody: + oneOf: + - $ref: "#/components/schemas/KeystorePEMBody" + - $ref: "#/components/schemas/KeystoreOthersBody" + + KeystorePEMBody: + type: object + properties: + expirationDate: + nullable: true + type: string + format: date + description: > + Date on which this secret should expire. If not set, by default, it will be set to notAfter date of the public certificate from this keystore. + Once the secret expires, a grant can not be requested for it. + key: + type: string + format: binary + description: > + The encrypted private key. Required in case of PEM type. + name: + type: string + description: > + The name of this keystore instance. + keyPassphrase: + type: string + description: > + Passphrase with which private key for a particular alias is protected + certificate: + type: string + format: binary + description: > + The public certificate. + Required in the case of PEM type. + type: + type: string + enum: + - PEM + - JKS + - JCEKS + - PKCS12 + capath: + type: string + format: binary + description: > + The concatenated chain of CA certificates, except the leaf, leading up to the root CA. + Can only be set in case of PEM type. + + KeystoreOthersBody: + type: object + properties: + expirationDate: + nullable: true + type: string + format: date + description: > + Date on which this secret should expire. If not set, by default, it will be set to notAfter date of the public certificate from this keystore. + Once the secret expires, a grant can not be requested for it. + name: + type: string + description: > + The name of this keystore instance. + keystore: + title: keystoreFile + type: string + format: binary + description: > + File containing one or more certificate entries + Required in case of JKS, JCEKS and PKCS12 types + algorithm: + nullable: true + type: string + description: > + The algorithm used to initialize KeyManagerFactory + Required in case of JKS, JCEKS and PKCS12 types + keyPassphrase: + type: string + description: > + Passphrase with which private key for a particular alias is protected + storePassphrase: + type: string + description: > + Passphrase with which keystore is protected + Required in case of JKS, JCEKS and PKCS12 types + type: + type: string + enum: + - PEM + - JKS + - JCEKS + - PKCS12 + alias: + type: string + description: > + The alias name of the entry that contains the certificate. + Required in case of JKS, JCEKS and PKCS12 types + + KeystorePatchBody: + type: object + example: > + { + "name": "", + "expirationDate": "" + } + + KeystoreSummaryCollection: + type: array + items: + $ref: "#/components/schemas/KeystoreSummary" + + KeystoreSummary: + type: object + properties: + name: + type: string + meta: + $ref: "#/components/schemas/Meta" + expirationDate: + type: string + format: date + type: + type: string + + Keystore: + type: object + properties: + expirationDate: + type: string + format: date + keystoreFileName: + type: string + description: File name of the keystore that is stored in this secret + meta: + $ref: "#/components/schemas/Meta" + name: + type: string + algorithm: + type: string + description: Algorithm used to create the keystore manager factory which will make use of this keystore + details: + $ref: "#/components/schemas/KeystoreDetails" + type: + type: string + description: Type of keystore supported + alias: + type: string + description: The alias name of the entry that contains the certificate + certificateFileName: + type: string + description: The file name of the certificate file that is stored in this keystore + keyFileName: + type: string + description: The file name of the encrypted private key that is stored in this keystore + capathFileName: + type: string + description: The file name of the CA file that is stored in this keystore + + KeystoreDetails: + title: KeystoreDetails + type: object + description: Details about the public certificate and capath from the keystore + properties: + certificate: + $ref: "#/components/schemas/CertificateDetails" + capath: + $ref: "#/components/schemas/CertificatePath" + + Meta: + type: object + properties: + id: + type: string + path: + type: string + + IssuerSubject: + type: object + properties: + commonName: + type: string + organizationName: + type: string + localityName: + type: string + organizationUnit: + type: string + state: + type: string + countryName: + type: string + + CertificateValidity: + type: object + description: Details about validity period of this certificate + properties: + notBefore: + type: string + notAfter: + type: string + + CertificateDetails: + title: CertificateDetails + type: object + properties: + issuer: + $ref: "#/components/schemas/IssuerSubject" + subject: + $ref: "#/components/schemas/IssuerSubject" + subjectAlternativeName: + type: array + description: Collection of subject alternative names from the SubjectAltName x509 extension + items: + type: string + version: + type: string + serialNumber: + type: string + description: Serial number assigned by the CA to this certificate, in hex format + signatureAlgorithm: + type: string + description: Name of the signature algorithm + publicKeyAlgorithm: + type: string + description: The standard algorithm name for the public key of this certificate + basicConstraints: + type: object + description: This identifies if the subject of the certificate is a CA + properties: + certificateAuthority: + type: boolean + description: If set to true, indicates that this is a CA certificate. + validity: + $ref: "#/components/schemas/CertificateValidity" + keyUsage: + type: array + description: A list of values defining the purpose of the public key i.e. the key usage extensions from this certificate + items: + type: string + extendedKeyUsage: + type: array + description: A list of values providing details about the extended key usage extensions from this certificate. + items: + type: string + certificateType: + type: string + description: The type of this certificate + + CertificatePath: + title: CertificatePath + type: array + items: + $ref: "#/components/schemas/CertificateDetails" + + diff --git a/spec/secretgroup_tlscontext.yml b/spec/secretgroup_tlscontext.yml new file mode 100644 index 0000000..4e10319 --- /dev/null +++ b/spec/secretgroup_tlscontext.yml @@ -0,0 +1,822 @@ +openapi: 3.0.0 +info: + title: Secret Group Keystore API + description: Secret Group Keystore API + version: 1.0.0 + +servers: + - url: https://anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub + - url: https://eu1.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub EU + - url: https://gov.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub GOV + +security: + - bearerAuth: [] + +paths: + /organizations/{orgId}/environments/{envId}/secretGroups/{secretGroupId}/tlsContexts: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: secretGroupId + description: The secret group id + required: true + schema: + type: string + get: + operationId: GetSecretGroupTlsContexts + summary: Retrieves a secret-groups' collection of tls-contexts. + description: Retrieves a secret-groups' collection of tls-contexts. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroupTlsContextCollection' + post: + operationId: PostSecretGroupTlsContext + summary: Create a secret-groups' tls-context. + description: Create a secret-groups' tls-context. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TlsContextPostBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '201': # status code + $ref: '#/components/responses/SuccessPostSecretGroupTlsContext' + + /organizations/{orgId}/environments/{envId}/secretGroups/{secretGroupId}/tlsContexts/{secretId}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: secretGroupId + description: The secret group id + required: true + schema: + type: string + - in: path + name: secretId + description: The keystore id + required: true + schema: + type: string + get: + operationId: GetSecretGroupTlsContextDetails + summary: Retrieve tls-context details + description: Retrieves tls-context details by id for a given secret group in a given organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroupTlsContextDetails' + put: + operationId: PutSecretGroupTlsContext + summary: Update a given secret-group tls-context + description: Update tls-context details for a given secret-group in a given organization and environment + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/TlsContextPutBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessPutSecretGroupTlsContext' + patch: + operationId: PatchSecretGroupTlsContext + requestBody: + content: + application/json:: + schema: + $ref: "#/components/schemas/TlsContextPatchBody" + summary: Update a given secret-group tls-context + description: Update tls-context details for a given secret-group in a given organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessPatchSecretGroupTlsContext' + + +components: + securitySchemes: + bearerAuth: # arbitrary name for the security scheme + type: http + scheme: bearer + bearerFormat: JWT + + responses: + UnauthorizedError: + description: Access token is missing or invalid + BadRequestError: + description: Bad request response + content: + application/json: + schema: + $ref: "#/components/schemas/errorsResponse" + NotFoundError: + description: resource not found + content: + application/json: + schema: + type: object + properties: + name: + type: string + message: + type: string + SuccessGetSecretGroupTlsContextCollection: + description: get secret-groups tls-context response + content: + application/json: + schema: + $ref: "#/components/schemas/TlsContextSummaryCollection" + SuccessPostSecretGroupTlsContext: + description: post secret-groups tls-context response + content: + application/json: + schema: + type: object + properties: + message: + type: string + id: + type: string + SuccessGetSecretGroupTlsContextDetails: + description: get tls-context details response + content: + application/json: + schema: + $ref: "#/components/schemas/TlsContextDetails" + SuccessPutSecretGroupTlsContext: + description: put tls-context details response + content: + application/json: + schema: + type: object + properties: + message: + type: string + SuccessPatchSecretGroupTlsContext: + description: patch tls-context details response + content: + application/json: + schema: + type: object + properties: + message: + type: string + + schemas: + errorsResponse: + type: object + title: errorsResponse + properties: + errors: + type: array + items: + type: object + properties: + type: + type: string + title: type + dataPath: + type: string + title: dataPath + keyword: + type: string + title: keyword + schema: + type: string + title: schema + data: + type: string + title: data + message: + type: string + title: message + + TlsContextSummaryCollection: + type: array + items: + $ref: "#/components/schemas/TlsContextSummary" + + TlsContextSummary: + type: object + properties: + name: + type: string + meta: + $ref: "#/components/schemas/Meta" + expirationDate: + type: string + type: + type: string + + TlsContextDetails: + oneOf: + - $ref: "#/components/schemas/TlsContextSF" + - $ref: "#/components/schemas/TlsContextMule" + - $ref: "#/components/schemas/TlsContextFlexGateway" + + TlsContextPostBody: + description: > + The body differs depending on the type of the tls-context you want to create. + more information here: https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/secrets-manager/minor/1.6/console/method/%233344/ + oneOf: + - $ref: "#/components/schemas/TlsContextFlexGatewayBody" + - $ref: "#/components/schemas/TlsContextMuleBody" + - $ref: "#/components/schemas/TlsContextFlexGatewayBody" + + TlsContextPutBody: + description: > + The body differs depending on the type of the tls-context you want to create. + more information here: https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/secrets-manager/minor/1.6/console/method/%233344/ + oneOf: + - $ref: "#/components/schemas/TlsContextFlexGatewayBody" + - $ref: "#/components/schemas/TlsContextMuleBody" + - $ref: "#/components/schemas/TlsContextFlexGatewayBody" + + TlsContextPatchBody: + type: object + example: > + { + "name": "", + "expirationDate": "" + } + + TlsContextSfBody: + type: object + properties: + expirationDate: + type: string + description: > + Date on which this secret should expire. If not set, by default, it will be set to one year from the date on which this secret is created/updated. + Once the secret expires, a grant can not be requested for it. + name: + type: string + acceptableTlsVersions: + $ref: "#/components/schemas/AcceptableTlsVersionsSF" + acceptableCipherSuites: + $ref: "#/components/schemas/AcceptableCipherSuites" + mutualAuthentication: + $ref: "#/components/schemas/MutualAuthentication" + enableMutualAuthentication: + type: boolean + description: This flag is to enable client authentication. To set this flag to true, both keystore and truststore must be set. + target: + type: string + description: The target engine + enum: + - SecurityFabric + keystore: + description: > + Refers to a secret of type keystore. In most cases, ECDSA will double performance vs. a 2K RSA key. + Supported curves are secp521r1 (P-521), secp384r1 (P-384), and secp256r1 aka prime256v1 (P-256). + $ref: "#/components/schemas/KeystoreTruststorePath" + truststore: + description: Refers to a secret of type truststore. + $ref: "#/components/schemas/KeystoreTruststorePath" + + TlsContextMuleBody: + type: object + properties: + name: + type: string + expirationDate: + type: string + description: > + Date on which this secret should expire. If not set, by default, it will be set to one year from the date on which this secret is created/updated. + Once the secret expires, a grant can not be requested for it. + target: + type: string + description: The target engine. The enum type SecurityFabric is used for the Anypoint Security products. + enum: + - FlexGateway + - Mule + - SecurityFabric + keystore: + description: > + Refers to secret of type keystore. Except 'PEM', all other types of keystores are supported. + Even though this is marked as optional, at least one of this or truststore has to be set. + $ref: "#/components/schemas/KeystoreTruststorePath" + truststore: + description: > + Refers to secret of type truststore. Except 'PEM', all other types of truststores are supported. + Even though this is marked as optional, at least one of this or keystore has to be set. + $ref: "#/components/schemas/KeystoreTruststorePath" + cipherSuites: + type: array + description: List of enabled cipher suites for Mule target + items: + type: string + acceptableTlsVersions: + $ref: "#/components/schemas/AcceptableTlsVersionsMule" + insecure: + type: boolean + description: Setting this flag to true indicates that certificate validation should not be enforced, i.e. the truststore, even though set, is ignored at runtime. + + TlsContextFlexGatewayBody: + type: object + properties: + name: + type: string + expirationDate: + type: string + description: > + Date on which this secret should expire. If not set, by default, it will be set to one year from the date on which this secret is created/updated. + Once the secret expires, a grant can not be requested for it. + minTlsVersion: + type: string + description: Minimum TLS version supported. + enum: + - TLSv1.1 + - TLSv1.2 + - TLSv1.3 + maxTlsVersion: + type: string + description: Maximum TLS version supported. + enum: + - TLSv1.1 + - TLSv1.2 + - TLSv1.3 + target: + type: string + description: The target engine + enum: + - FlexGateway + alpnProtocols: + type: array + description: supported HTTP versions in the most-to-least preferred order. At least one version must be specified. + items: + type: string + enum: + - h2 + - http/1.1 + inboundSettings: + type: object + description: Properties that are applicable only when the TLS context is used to secure inbound traffic. + properties: + enableClientCertValidation: + type: boolean + description: flag that indicates whether the client certificate validation must be enforced. + default: false + outboundSettings: + type: object + description: Properties that are applicable only when the TLS context is used to secure outbound traffic. + properties: + skipServerCertValidation: + type: boolean + description: flag that indicates whether the server certificate validation must be skipped. + default: false + cipherSuites: + type: array + description: > + List of acceptable cipher suites for Flex Gateway target if min TLS version is < 1.3. If you are are not using the defaults and select individual ciphers, please select ciphers that match the configured keystore to ensure that TLS can setup a connection. + For a keystore with an RSA key (the most common type), select ciphers which contain the string RSA (there are some exceptions). + If using ECC ciphers, select ciphers which contain the string "ECDSA". TLS standards and documentation can be consulted for more background information. + items: + type: string + enum: + - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 + - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 + - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 + - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 + - TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 + - TLS_RSA_WITH_AES_128_GCM_SHA256 + - TLS_RSA_WITH_AES_256_GCM_SHA384 + - TLS_RSA_WITH_NULL_SHA + - TLS_RSA_WITH_AES_128_CBC_SHA + - TLS_RSA_WITH_AES_256_CBC_SHA + - TLS_PSK_WITH_AES_128_CBC_SHA + - TLS_PSK_WITH_AES_256_CBC_SHA + - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA + - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA + - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA + - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA + - TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA + - TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA + - TLS_RSA_WITH_3DES_EDE_CBC_SHA + keystore: + description: References to a 'PEM' type keystore. Other types of keystore are not supported. + $ref: "#/components/schemas/KeystoreTruststorePath" + truststore: + description: References to a 'PEM' type truststore. Other types of truststore are not supported. + $ref: "#/components/schemas/KeystoreTruststorePath" + + TlsContextSF: + type: object + properties: + name: + type: string + expirationDate: + type: string + meta: + $ref: "#/components/schemas/Meta" + acceptableTlsVersions: + $ref: "#/components/schemas/AcceptableTlsVersionsSF" + description: TLS versions supported, at least one should be set to true + target: + type: string + description: The target application + keystore: + $ref: "#/components/schemas/KeystoreTruststorePath" + description: Refers to a secret of type keystore + truststore: + description: Refers to a secret of type truststore + $ref: "#/components/schemas/KeystoreTruststorePath" + enableMutualAuthentication: + type: boolean + description: This flag is to enable client authentication + acceptableCipherSuites: + description: > + List of accepted cipher suites by Security Fabric target, at least one should be set to true. + If you are are not using the defaults and select individual ciphers, please select ciphers that match the configured keystore to ensure that TLS can setup a connection. + For a keystore with an RSA key (the most common type), select ciphers which contain the string RSA (there are some exceptions). If using ECC ciphers, select ciphers which contain the string "ECDSA". + TLS standards and documentation can be consulted for more background information. + $ref: "#/components/schemas/AcceptableCipherSuites" + mutualAuthentication: + description: Configuration for client authentication + $ref: "#/components/schemas/MutualAuthentication" + + TlsContextMule: + type: object + properties: + name: + type: string + expirationDate: + type: string + meta: + $ref: "#/components/schemas/Meta" + target: + type: string + keystore: + $ref: "#/components/schemas/KeystoreTruststorePath" + description: Refers to a secret of type keystore. Even though this is marked as optional, at least one of this or truststore will be set. + truststore: + $ref: "#/components/schemas/KeystoreTruststorePath" + description: Refers to a secret of type truststore. Even though this is marked as optional, at least one of this or keystore will be set. + cipherSuites: + type: array + description: List of enabled cipher suites for Mule target + items: + type: string + acceptableTlsVersions: + $ref: "#/components/schemas/AcceptableTlsVersionsMule" + description: TLS versions supported, at least one should be set to true + insecure: + type: boolean + description: Setting this flag to true indicates that certificate validation should not be enforced, i.e. the truststore, even though set, is ignored at runtime. + default: false + + TlsContextFlexGateway: + type: object + properties: + name: + type: string + expirationDate: + type: string + meta: + $ref: "#/components/schemas/Meta" + minTlsVersion: + type: string + description: Minimum TLS version supported. + maxTlsVersion: + type: string + description: Maximum TLS version supported. + target: + type: string + description: The target application + alpnProtocols: + type: array + description: supported HTTP versions in the most-to-least preferred order. At least one version must be specified. + items: + type: string + inboundSettings: + type: object + description: Properties that are applicable only when the TLS context is used to secure inbound traffic. + properties: + enableClientCertValidation: + type: boolean + description: flag that indicates whether the client certificate validation must be enforced. + outboundSettings: + type: object + description: Properties that are applicable only when the TLS context is used to secure outbound traffic. + properties: + skipServerCertValidation: + type: boolean + description: flag that indicates whether the server certificate validation must be skipped. + cipherSuites: + type: array + description: > + List of acceptable cipher suites for Flex Gateway target if min TLS version is < 1.3. + If you are are not using the defaults and select individual ciphers, please select ciphers that match the configured keystore to ensure that TLS can setup a connection. + For a keystore with an RSA key (the most common type), select ciphers which contain the string RSA (there are some exceptions). If using ECC ciphers, select ciphers which contain the string "ECDSA". + TLS standards and documentation can be consulted for more background information. + items: + type: string + keystore: + $ref: "#/components/schemas/KeystoreTruststorePath" + description: Refers to a secret of type keystore + truststore: + $ref: "#/components/schemas/KeystoreTruststorePath" + description: Refers to a secret of type truststore + + + KeystoreTruststorePath: + type: object + properties: + path: + type: string + description: Relative path of the secret to be referenced. + + MutualAuthentication: + type: object + properties: + certificatePolicies: + type: array + description: > + List of Object identifier (OID). + OIDs are intended to be globally unique. + They are formed by taking a unique numeric string (e.g. 1.3.5.7.9.24.68) and adding additional digits in a unique fashion (e.g. 1.3.5.7.9.24.68.1, 1.3.5.7.9.24.68.2, 1.3.5.7.9.24.68.1.1, etc.) An institution will acquire an arc (eg 1.3.5.7.9.24.68) and then extend the arc (called subarcs) as indicated above to create additional OID’s and arcs. + There is no limit to the length of an OID, and virtually no computational burden to having a long OID. + items: + type: string + certCheckingStrength: + type: string + description: allows application to control if strict or lax certificate checking will be performed during chain-of-trust processing + enum: + - Strict + - Lax + verificationDepth: + type: integer + default: 1 + description: maximum allowed chain length for the certificates + performDomainChecking: + type: boolean + description: Whether or not to perform domain checking + default: false + certificatePolicyChecking: + type: boolean + default: false + description: > + Controls certificate policy processing as defined in RFC 3280, 5280. A certificate can contain zero or more policies. + A policy is represented as an object identifier (OID). In an end entity certificate, this policy information indicate the policy under which the certificate has been issued and the purposes for which the certificate may be used. + In a CA certificate, this policy information limits the set of policies for certification paths that include this certificate. Applications with specific policy requirements are expected to have a list of those policies that they will accept and to compare the policy OIDs in the certificate to that list. + If this extension is critical, the path validation software MUST be able to interpret this extension (including the optional qualifier), or MUST reject the certificate + requireInitialExplicitPolicy: + type: boolean + description: Indicates if the path must be valid for at least one of the certificate policies in the user-initial-policy-set. + default: false + revocationChecking: + type: boolean + description: Indicates if certificate revocation checking should be enabled or not + default: false + revocationCheckingMethod: + type: string + description: Protocol used for certificate revocation checking. Must be set if revocationChecking is set to 'true'. + enum: + - CRL + crlDistributorConfig: + description: Reference to a secret of type crlDistributorConfig. Must be set if revocationCheckingMethod is set to 'CRL'. + $ref: "#/components/schemas/KeystoreTruststorePath" + requireCrlForAllCa: + type: boolean + description: Indicates if a valid CRL file must be in effect for every immediate and root Certificate Authority (CA) in the chain-of-trust + default: false + sendTruststore: + type: boolean + description: Should the truststore i.e. trusted certificate authorities be sent to far-end during mutual authentication + default: false + certificatePinning: + $ref: "#/components/schemas/CertificatePinning" + authenticationOverrides: + description: Override failing authentication when mutual authentication is being performed + $ref: "#/components/schemas/AuthenticationOverrides" + + + Meta: + type: object + properties: + id: + type: string + path: + type: string + + AcceptableCipherSuites: + type: object + description: > + List of accepted cipher suites by Security Fabric target, at least one should be set to true. If you are are not using the defaults and select individual ciphers, please select ciphers that match the configured keystore to ensure that TLS can setup a connection. + For a keystore with an RSA key (the most common type), select ciphers which contain the string RSA (there are some exceptions). If using ECC ciphers, select ciphers which contain the string "ECDSA". + TLS standards and documentation can be consulted for more background information. + properties: + aes128GcmSha256: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + aes128Sha256: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + aes256GcmSha384: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + aes256Sha256: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + dheRsaAes128GcmSha256: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + dheRsaAes128Sha256: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + dheRsaAes256GcmSha384: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + dheRsaAes256Sha256: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + ecdheEcdsaAes128GcmSha256: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + ecdheEcdsaAes128Sha1: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + ecdheEcdsaAes256GcmSha384: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + ecdheEcdsaAes256Sha1: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + ecdheRsaAes128GcmSha256: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + ecdheRsaAes128Sha1: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + ecdheRsaAes256GcmSha384: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + ecdheRsaAes256Sha1: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + ecdheEcdsaChacha20Poly1305: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + ecdheRsaChacha20Poly1305: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + dheRsaChacha20Poly1305: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + tlsAes256GcmSha384: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + tlsChacha20Poly1305Sha256: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + tlsAes128GcmSha256: + type: boolean + default: false + description: Allowed to be enabled only if tlsV1Dot2 is enabled. + + AuthenticationOverrides: + type: object + properties: + certificateBadFormat: + type: boolean + description: Allow processing of certificates with bad format + default: false + certificateBadSignature: + type: boolean + description: Allow processing of certificates with bad signature + default: false + certificateNotYetValid: + type: boolean + description: Allow processing of certificates that are not yet valid + default: false + certificateHasExpired: + type: boolean + description: Allow processing of certificates that are expired + default: false + allowSelfSigned: + type: boolean + description: Allow self signed certificates + default: false + certificateUnresolved: + type: boolean + description: Allow unresolved certificates + default: false + certificateUntrusted: + type: boolean + description: Allow untrusted certificates + default: false + invalidCa: + type: boolean + description: Allow invalid certificate authority certificates + default: false + invalidPurpose: + type: boolean + description: Allow certificates with invalid purpose + default: false + other: + type: boolean + description: Override any miscellaneous error condition encountered + default: false + + CertificatePinning: + type: object + properties: + performCertificatePinning: + type: boolean + certificatePinset: + description: Refers to a secret of type certificatePinset. Must be set if performCertificatePinning is set to 'true'. + $ref: "#/components/schemas/KeystoreTruststorePath" + + AcceptableTlsVersionsSF: + type: object + description: TLS versions supported, at least one should be set to true + properties: + tlsV1Dot1: + type: boolean + description: TLS version 1.1 + tlsV1Dot2: + type: boolean + description: TLS version 1.2 + tlsV1Dot3: + type: boolean + description: TLS version 1.3 + + AcceptableTlsVersionsMule: + type: object + description: TLS versions supported, at least one should be set to true + properties: + tlsV1Dot1: + type: boolean + description: TLS version 1.1 + tlsV1Dot2: + type: boolean + description: TLS version 1.2 + diff --git a/spec/secretgroup_truststore.yml b/spec/secretgroup_truststore.yml new file mode 100644 index 0000000..377db7d --- /dev/null +++ b/spec/secretgroup_truststore.yml @@ -0,0 +1,465 @@ +openapi: 3.0.0 +info: + title: Secret Group Keystore API + description: Secret Group Keystore API + version: 1.0.0 + +servers: + - url: https://anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub + - url: https://eu1.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub EU + - url: https://gov.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub GOV + +security: + - bearerAuth: [] + +paths: + /organizations/{orgId}/environments/{envId}/secretGroups/{secretGroupId}/truststores: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: secretGroupId + description: The secret group id + required: true + schema: + type: string + get: + operationId: GetSecretGroupTruststores + parameters: + - in: query + name: type + description: Filter the elements on the response to be of a specific type from {PEM, JKS, JCEKS, PKCS12} + required: false + schema: + type: string + enum: + - PEM + - JKS + - JCEKS + - PKCS12 + summary: Retrieves a secret-groups' collection of truststores. + description: Retrieves a secret-groups' collection of truststores. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroupTruststoresCollection' + post: + operationId: PostSecretGroupTruststore + parameters: + - in: query + name: allowExpiredCert + description: With 'true' to allow uploading expired certificates + required: true + schema: + type: boolean + summary: Create a secret-groups' truststore. + description: Create a secret-groups' truststore. + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/TruststoreReqBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '201': # status code + $ref: '#/components/responses/SuccessPostSecretGroupTruststore' + + /organizations/{orgId}/environments/{envId}/secretGroups/{secretGroupId}/truststores/{secretId}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: secretGroupId + description: The secret group id + required: true + schema: + type: string + - in: path + name: secretId + description: The truststore id + required: true + schema: + type: string + get: + operationId: GetSecretGroupTruststoreDetails + summary: Retrieve truststore details + description: Retrieves truststore details by id for a given secret group in a given organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroupTruststore' + put: + operationId: PutSecretGroupTruststore + parameters: + - in: query + name: allowExpiredCert + description: With 'true' to allow uploading expired certificates + required: true + schema: + type: boolean + summary: Update a given secret-group truststore + description: Update truststore details for a given secret-group in a given organization and environment + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/TruststoreReqBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessPutSecretGroupTruststore' + patch: + operationId: PatchSecretGroupTruststore + requestBody: + content: + application/json:: + schema: + $ref: "#/components/schemas/TruststorePatchBody" + summary: Update a given secret-group truststore + description: Update truststore details for a given secret-group in a given organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessPatchSecretGroupTruststore' + +components: + securitySchemes: + bearerAuth: # arbitrary name for the security scheme + type: http + scheme: bearer + bearerFormat: JWT + + responses: + UnauthorizedError: + description: Access token is missing or invalid + BadRequestError: + description: Bad request response + content: + application/json: + schema: + $ref: "#/components/schemas/errorsResponse" + NotFoundError: + description: resource not found + content: + application/json: + schema: + type: object + properties: + name: + type: string + message: + type: string + SuccessGetSecretGroupTruststoresCollection: + description: get secret-group truststores collection + content: + application/json: + schema: + $ref: "#/components/schemas/TruststoreSummaryCollection" + SuccessPostSecretGroupTruststore: + description: post secret-group truststore response + content: + application/json: + schema: + type: object + properties: + message: + type: string + id: + type: string + SuccessGetSecretGroupTruststore: + description: get secret-group trustsotre details response + content: + application/json: + schema: + $ref: "#/components/schemas/Truststore" + SuccessPutSecretGroupTruststore: + description: put secret-group truststore response + content: + application/json: + schema: + type: object + properties: + message: + type: string + SuccessPatchSecretGroupTruststore: + description: patch secret-group truststore response + content: + application/json: + schema: + type: object + properties: + message: + type: string + + + schemas: + errorsResponse: + type: object + title: errorsResponse + properties: + errors: + type: array + items: + type: object + properties: + type: + type: string + title: type + dataPath: + type: string + title: dataPath + keyword: + type: string + title: keyword + schema: + type: string + title: schema + data: + type: string + title: data + message: + type: string + title: message + + TruststoreReqBody: + oneOf: + - $ref: "#/components/schemas/TruststorePEMBody" + - $ref: "#/components/schemas/TruststoreOthersBody" + + TruststorePEMBody: + type: object + properties: + expirationDate: + type: string + description: > + Date on which this secret should expire. If not set, by default, it will be set to notAfter date of the public certificate from this keystore. + Once the secret expires, a grant can not be requested for it. + name: + type: string + description: The name of the truststore instance + type: + type: string + enum: + - PEM + trustStore: + type: string + format: binary + description: File containing one or more concatenated certificates in PEM format + + TruststoreOthersBody: + type: object + properties: + expirationDate: + type: string + description: > + Date on which this secret should expire. If not set, by default, it will be set to notAfter date of the public certificate from this keystore. + Once the secret expires, a grant can not be requested for it. + name: + type: string + description: The name of the truststore instance + type: + type: string + enum: + - JKS + - JCEKS + - PKCS12 + trustStore: + type: string + format: binary + description: File containing one or more trusted certificate entries + algorithm: + type: string + description: The algorithm used to initialize TrustManagerFactory + storePassphrase: + type: string + description: The passphrase with which the trustStore file is protected + + TruststorePatchBody: + type: object + example: > + { + "name": "", + "expirationDate": "" + } + + TruststoreSummaryCollection: + type: array + items: + $ref: "#/components/schemas/TruststoreSummary" + + TruststoreSummary: + type: object + properties: + name: + type: string + meta: + $ref: "#/components/schemas/Meta" + expirationDate: + type: string + type: + type: string + + Truststore: + type: object + properties: + name: + type: string + expirationDate: + type: string + meta: + $ref: "#/components/schemas/Meta" + type: + type: string + description: Type of truststore supported + details: + $ref: "#/components/schemas/TruststoreDetails" + truststoreFileName: + type: string + description: File name of the truststore that is stored in this secret + algorithm: + type: string + description: Algorithm used to create the truststore manager factory which will make use of this truststore + + TruststoreDetails: + type: object + description: Details about each of the trusted certificate from the truststore + properties: + certificateEntries: + type: array + items: + $ref: "#/components/schemas/CertificateEntry" + + Meta: + type: object + properties: + id: + type: string + path: + type: string + + IssuerSubject: + type: object + properties: + commonName: + type: string + organizationName: + type: string + localityName: + type: string + organizationUnit: + type: string + state: + type: string + countryName: + type: string + + + CertificateValidity: + type: object + description: Details about validity period of this certificate + properties: + notBefore: + type: string + notAfter: + type: string + + CertificateDetails: + type: object + properties: + issuer: + $ref: "#/components/schemas/IssuerSubject" + subject: + $ref: "#/components/schemas/IssuerSubject" + subjectAlternativeName: + type: array + description: Collection of subject alternative names from the SubjectAltName x509 extension + items: + type: string + version: + type: string + serialNumber: + type: string + description: Serial number assigned by the CA to this certificate, in hex format + signatureAlgorithm: + type: string + description: Name of the signature algorithm + publicKeyAlgorithm: + type: string + description: The standard algorithm name for the public key of this certificate + basicConstraints: + type: object + description: This identifies if the subject of the certificate is a CA + properties: + certificateAuthority: + type: boolean + description: If set to true, indicates that this is a CA certificate. + validity: + $ref: "#/components/schemas/CertificateValidity" + keyUsage: + type: array + description: A list of values defining the purpose of the public key i.e. the key usage extensions from this certificate + items: + type: string + extendedKeyUsage: + type: array + description: A list of values providing details about the extended key usage extensions from this certificate. + items: + type: string + certificateType: + type: string + description: The type of this certificate + + CertificateEntry: + type: object + properties: + alias: + type: string + description: Alias associated with the certificate entry + certificate: + $ref: "#/components/schemas/CertificateDetails" + + + + From c8f0f20ff92e8a5f3f3610b600310b79a777710f Mon Sep 17 00:00:00 2001 From: souf Date: Mon, 15 Jan 2024 08:59:09 +0100 Subject: [PATCH 41/61] updates titls and description for secretgroup apis --- spec/secretgroup_certificate.yml | 4 ++-- spec/secretgroup_tlscontext.yml | 4 ++-- spec/secretgroup_truststore.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/secretgroup_certificate.yml b/spec/secretgroup_certificate.yml index 68cd9f0..50f5948 100644 --- a/spec/secretgroup_certificate.yml +++ b/spec/secretgroup_certificate.yml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: - title: Secret Group Keystore API - description: Secret Group Keystore API + title: Secret Group Certificate API + description: Secret Group Certificate API version: 1.0.0 servers: diff --git a/spec/secretgroup_tlscontext.yml b/spec/secretgroup_tlscontext.yml index 4e10319..9768779 100644 --- a/spec/secretgroup_tlscontext.yml +++ b/spec/secretgroup_tlscontext.yml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: - title: Secret Group Keystore API - description: Secret Group Keystore API + title: Secret Group TLS Context API + description: Secret Group TLS Context API version: 1.0.0 servers: diff --git a/spec/secretgroup_truststore.yml b/spec/secretgroup_truststore.yml index 377db7d..0d11c4f 100644 --- a/spec/secretgroup_truststore.yml +++ b/spec/secretgroup_truststore.yml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: - title: Secret Group Keystore API - description: Secret Group Keystore API + title: Secret Group Truststore API + description: Secret Group Truststore API version: 1.0.0 servers: From 0a91ec4d86e21b4e41ab470e5f32a8439446ce8b Mon Sep 17 00:00:00 2001 From: souf Date: Mon, 15 Jan 2024 08:59:48 +0100 Subject: [PATCH 42/61] updates openapi generator version from v5.1.0 to v6.6.0 --- openapitools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapitools.json b/openapitools.json index 2fbe24b..147af1a 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,7 +2,7 @@ "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "5.1.0", + "version": "6.6.0", "generators": { "golang": { "generatorName": "go", From d5257a0c893973deeda1b19f13098121728576e1 Mon Sep 17 00:00:00 2001 From: souf Date: Mon, 15 Jan 2024 21:32:27 +0100 Subject: [PATCH 43/61] secretgroup_tlscontext: fixes issue with put and patch request --- spec/secretgroup_tlscontext.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/secretgroup_tlscontext.yml b/spec/secretgroup_tlscontext.yml index 9768779..7cc648a 100644 --- a/spec/secretgroup_tlscontext.yml +++ b/spec/secretgroup_tlscontext.yml @@ -107,7 +107,7 @@ paths: description: Update tls-context details for a given secret-group in a given organization and environment requestBody: content: - multipart/form-data: + application/json: schema: $ref: "#/components/schemas/TlsContextPutBody" responses: @@ -123,7 +123,7 @@ paths: operationId: PatchSecretGroupTlsContext requestBody: content: - application/json:: + application/json: schema: $ref: "#/components/schemas/TlsContextPatchBody" summary: Update a given secret-group tls-context @@ -265,7 +265,7 @@ components: The body differs depending on the type of the tls-context you want to create. more information here: https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/secrets-manager/minor/1.6/console/method/%233344/ oneOf: - - $ref: "#/components/schemas/TlsContextFlexGatewayBody" + - $ref: "#/components/schemas/TlsContextSfBody" - $ref: "#/components/schemas/TlsContextMuleBody" - $ref: "#/components/schemas/TlsContextFlexGatewayBody" @@ -274,7 +274,7 @@ components: The body differs depending on the type of the tls-context you want to create. more information here: https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/secrets-manager/minor/1.6/console/method/%233344/ oneOf: - - $ref: "#/components/schemas/TlsContextFlexGatewayBody" + - $ref: "#/components/schemas/TlsContextSfBody" - $ref: "#/components/schemas/TlsContextMuleBody" - $ref: "#/components/schemas/TlsContextFlexGatewayBody" From 072a13eba7f74ea7e77d113bb57c3c46c2fa56ee Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 16 Jan 2024 12:53:43 +0100 Subject: [PATCH 44/61] secretgroup_keystore: fixes issue on post request --- spec/secretgroup_keystore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/secretgroup_keystore.yml b/spec/secretgroup_keystore.yml index 65451f9..2bd8e8e 100644 --- a/spec/secretgroup_keystore.yml +++ b/spec/secretgroup_keystore.yml @@ -324,7 +324,7 @@ components: type: string description: > The name of this keystore instance. - keystore: + keyStore: title: keystoreFile type: string format: binary From 1cae456ea99cc3390c013e70a4d3a73b7a6eeaff Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 16 Jan 2024 13:13:33 +0100 Subject: [PATCH 45/61] truststore: fixes issues on post request --- spec/secretgroup_truststore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/secretgroup_truststore.yml b/spec/secretgroup_truststore.yml index 0d11c4f..ae025e7 100644 --- a/spec/secretgroup_truststore.yml +++ b/spec/secretgroup_truststore.yml @@ -305,7 +305,7 @@ components: - JKS - JCEKS - PKCS12 - trustStore: + truststore: type: string format: binary description: File containing one or more trusted certificate entries From 5706fcc70548c8f9ec0bfb1699f081902e155a3d Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 16 Jan 2024 15:08:54 +0100 Subject: [PATCH 46/61] truststore: fixes issues on post request --- spec/secretgroup_truststore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/secretgroup_truststore.yml b/spec/secretgroup_truststore.yml index ae025e7..0d11c4f 100644 --- a/spec/secretgroup_truststore.yml +++ b/spec/secretgroup_truststore.yml @@ -305,7 +305,7 @@ components: - JKS - JCEKS - PKCS12 - truststore: + trustStore: type: string format: binary description: File containing one or more trusted certificate entries From 6882a295c9cd1d73fc8ac07aa07c72b1f498c642 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 17 Jan 2024 14:57:43 +0100 Subject: [PATCH 47/61] secretgroup_tlscontext: fixes issue with the GetSecretGroupTlsContextDetails by changing from oneOf to a simple object containing all possible attributes --- spec/secretgroup_tlscontext.yml | 243 ++++++++++++-------------------- 1 file changed, 89 insertions(+), 154 deletions(-) diff --git a/spec/secretgroup_tlscontext.yml b/spec/secretgroup_tlscontext.yml index 7cc648a..4221f4a 100644 --- a/spec/secretgroup_tlscontext.yml +++ b/spec/secretgroup_tlscontext.yml @@ -255,10 +255,78 @@ components: type: string TlsContextDetails: - oneOf: - - $ref: "#/components/schemas/TlsContextSF" - - $ref: "#/components/schemas/TlsContextMule" - - $ref: "#/components/schemas/TlsContextFlexGateway" + type: object + properties: + target: + type: string + description: The target application + enum: + - SecurityFabric + - Mule + - FlexGateway + name: + type: string + expirationDate: + type: string + meta: + $ref: "#/components/schemas/Meta" + keystore: + $ref: "#/components/schemas/SecretPath" + description: Refers to a secret of type keystore + truststore: + description: Refers to a secret of type truststore + $ref: "#/components/schemas/SecretPath" + enableMutualAuthentication: + type: boolean + description: This flag is to enable client authentication + mutualAuthentication: + $ref: "#/components/schemas/MutualAuthentication" + description: Configuration for client authentication + acceptableCipherSuites: + $ref: "#/components/schemas/AcceptableCipherSuites" + description: > + List of accepted cipher suites by Security Fabric target, at least one should be set to true. + If you are are not using the defaults and select individual ciphers, please select ciphers that match the configured keystore to ensure that TLS can setup a connection. + For a keystore with an RSA key (the most common type), select ciphers which contain the string RSA (there are some exceptions). If using ECC ciphers, select ciphers which contain the string "ECDSA". + TLS standards and documentation can be consulted for more background information. + acceptableTlsVersions: + $ref: "#/components/schemas/AcceptableTlsVersions" + description: TLS versions supported, at least one should be set to true + cipherSuites: + type: array + description: List of enabled cipher suites for Mule target + items: + type: string + insecure: + type: boolean + description: Setting this flag to true indicates that certificate validation should not be enforced, i.e. the truststore, even though set, is ignored at runtime. + default: false + minTlsVersion: + type: string + description: Minimum TLS version supported. + maxTlsVersion: + type: string + description: Maximum TLS version supported. + alpnProtocols: + type: array + description: supported HTTP versions in the most-to-least preferred order. At least one version must be specified. + items: + type: string + inboundSettings: + type: object + description: Properties that are applicable only when the TLS context is used to secure inbound traffic. + properties: + enableClientCertValidation: + type: boolean + description: flag that indicates whether the client certificate validation must be enforced. + outboundSettings: + type: object + description: Properties that are applicable only when the TLS context is used to secure outbound traffic. + properties: + skipServerCertValidation: + type: boolean + description: flag that indicates whether the server certificate validation must be skipped. + TlsContextPostBody: description: > @@ -297,7 +365,7 @@ components: name: type: string acceptableTlsVersions: - $ref: "#/components/schemas/AcceptableTlsVersionsSF" + $ref: "#/components/schemas/AcceptableTlsVersions" acceptableCipherSuites: $ref: "#/components/schemas/AcceptableCipherSuites" mutualAuthentication: @@ -314,10 +382,10 @@ components: description: > Refers to a secret of type keystore. In most cases, ECDSA will double performance vs. a 2K RSA key. Supported curves are secp521r1 (P-521), secp384r1 (P-384), and secp256r1 aka prime256v1 (P-256). - $ref: "#/components/schemas/KeystoreTruststorePath" + $ref: "#/components/schemas/SecretPath" truststore: description: Refers to a secret of type truststore. - $ref: "#/components/schemas/KeystoreTruststorePath" + $ref: "#/components/schemas/SecretPath" TlsContextMuleBody: type: object @@ -340,19 +408,19 @@ components: description: > Refers to secret of type keystore. Except 'PEM', all other types of keystores are supported. Even though this is marked as optional, at least one of this or truststore has to be set. - $ref: "#/components/schemas/KeystoreTruststorePath" + $ref: "#/components/schemas/SecretPath" truststore: description: > Refers to secret of type truststore. Except 'PEM', all other types of truststores are supported. Even though this is marked as optional, at least one of this or keystore has to be set. - $ref: "#/components/schemas/KeystoreTruststorePath" + $ref: "#/components/schemas/SecretPath" cipherSuites: type: array description: List of enabled cipher suites for Mule target items: type: string acceptableTlsVersions: - $ref: "#/components/schemas/AcceptableTlsVersionsMule" + $ref: "#/components/schemas/AcceptableTlsVersions" insecure: type: boolean description: Setting this flag to true indicates that certificate validation should not be enforced, i.e. the truststore, even though set, is ignored at runtime. @@ -442,131 +510,12 @@ components: - TLS_RSA_WITH_3DES_EDE_CBC_SHA keystore: description: References to a 'PEM' type keystore. Other types of keystore are not supported. - $ref: "#/components/schemas/KeystoreTruststorePath" + $ref: "#/components/schemas/SecretPath" truststore: description: References to a 'PEM' type truststore. Other types of truststore are not supported. - $ref: "#/components/schemas/KeystoreTruststorePath" - - TlsContextSF: - type: object - properties: - name: - type: string - expirationDate: - type: string - meta: - $ref: "#/components/schemas/Meta" - acceptableTlsVersions: - $ref: "#/components/schemas/AcceptableTlsVersionsSF" - description: TLS versions supported, at least one should be set to true - target: - type: string - description: The target application - keystore: - $ref: "#/components/schemas/KeystoreTruststorePath" - description: Refers to a secret of type keystore - truststore: - description: Refers to a secret of type truststore - $ref: "#/components/schemas/KeystoreTruststorePath" - enableMutualAuthentication: - type: boolean - description: This flag is to enable client authentication - acceptableCipherSuites: - description: > - List of accepted cipher suites by Security Fabric target, at least one should be set to true. - If you are are not using the defaults and select individual ciphers, please select ciphers that match the configured keystore to ensure that TLS can setup a connection. - For a keystore with an RSA key (the most common type), select ciphers which contain the string RSA (there are some exceptions). If using ECC ciphers, select ciphers which contain the string "ECDSA". - TLS standards and documentation can be consulted for more background information. - $ref: "#/components/schemas/AcceptableCipherSuites" - mutualAuthentication: - description: Configuration for client authentication - $ref: "#/components/schemas/MutualAuthentication" - - TlsContextMule: - type: object - properties: - name: - type: string - expirationDate: - type: string - meta: - $ref: "#/components/schemas/Meta" - target: - type: string - keystore: - $ref: "#/components/schemas/KeystoreTruststorePath" - description: Refers to a secret of type keystore. Even though this is marked as optional, at least one of this or truststore will be set. - truststore: - $ref: "#/components/schemas/KeystoreTruststorePath" - description: Refers to a secret of type truststore. Even though this is marked as optional, at least one of this or keystore will be set. - cipherSuites: - type: array - description: List of enabled cipher suites for Mule target - items: - type: string - acceptableTlsVersions: - $ref: "#/components/schemas/AcceptableTlsVersionsMule" - description: TLS versions supported, at least one should be set to true - insecure: - type: boolean - description: Setting this flag to true indicates that certificate validation should not be enforced, i.e. the truststore, even though set, is ignored at runtime. - default: false - - TlsContextFlexGateway: - type: object - properties: - name: - type: string - expirationDate: - type: string - meta: - $ref: "#/components/schemas/Meta" - minTlsVersion: - type: string - description: Minimum TLS version supported. - maxTlsVersion: - type: string - description: Maximum TLS version supported. - target: - type: string - description: The target application - alpnProtocols: - type: array - description: supported HTTP versions in the most-to-least preferred order. At least one version must be specified. - items: - type: string - inboundSettings: - type: object - description: Properties that are applicable only when the TLS context is used to secure inbound traffic. - properties: - enableClientCertValidation: - type: boolean - description: flag that indicates whether the client certificate validation must be enforced. - outboundSettings: - type: object - description: Properties that are applicable only when the TLS context is used to secure outbound traffic. - properties: - skipServerCertValidation: - type: boolean - description: flag that indicates whether the server certificate validation must be skipped. - cipherSuites: - type: array - description: > - List of acceptable cipher suites for Flex Gateway target if min TLS version is < 1.3. - If you are are not using the defaults and select individual ciphers, please select ciphers that match the configured keystore to ensure that TLS can setup a connection. - For a keystore with an RSA key (the most common type), select ciphers which contain the string RSA (there are some exceptions). If using ECC ciphers, select ciphers which contain the string "ECDSA". - TLS standards and documentation can be consulted for more background information. - items: - type: string - keystore: - $ref: "#/components/schemas/KeystoreTruststorePath" - description: Refers to a secret of type keystore - truststore: - $ref: "#/components/schemas/KeystoreTruststorePath" - description: Refers to a secret of type truststore - + $ref: "#/components/schemas/SecretPath" - KeystoreTruststorePath: + SecretPath: type: object properties: path: @@ -593,12 +542,11 @@ components: - Lax verificationDepth: type: integer - default: 1 description: maximum allowed chain length for the certificates performDomainChecking: type: boolean - description: Whether or not to perform domain checking default: false + description: Whether or not to perform domain checking certificatePolicyChecking: type: boolean default: false @@ -609,35 +557,32 @@ components: If this extension is critical, the path validation software MUST be able to interpret this extension (including the optional qualifier), or MUST reject the certificate requireInitialExplicitPolicy: type: boolean - description: Indicates if the path must be valid for at least one of the certificate policies in the user-initial-policy-set. default: false + description: Indicates if the path must be valid for at least one of the certificate policies in the user-initial-policy-set. revocationChecking: type: boolean - description: Indicates if certificate revocation checking should be enabled or not default: false + description: Indicates if certificate revocation checking should be enabled or not revocationCheckingMethod: type: string description: Protocol used for certificate revocation checking. Must be set if revocationChecking is set to 'true'. - enum: - - CRL crlDistributorConfig: description: Reference to a secret of type crlDistributorConfig. Must be set if revocationCheckingMethod is set to 'CRL'. - $ref: "#/components/schemas/KeystoreTruststorePath" + $ref: "#/components/schemas/SecretPath" requireCrlForAllCa: type: boolean - description: Indicates if a valid CRL file must be in effect for every immediate and root Certificate Authority (CA) in the chain-of-trust default: false + description: Indicates if a valid CRL file must be in effect for every immediate and root Certificate Authority (CA) in the chain-of-trust sendTruststore: type: boolean - description: Should the truststore i.e. trusted certificate authorities be sent to far-end during mutual authentication default: false + description: Should the truststore i.e. trusted certificate authorities be sent to far-end during mutual authentication certificatePinning: $ref: "#/components/schemas/CertificatePinning" authenticationOverrides: description: Override failing authentication when mutual authentication is being performed $ref: "#/components/schemas/AuthenticationOverrides" - Meta: type: object properties: @@ -793,9 +738,9 @@ components: type: boolean certificatePinset: description: Refers to a secret of type certificatePinset. Must be set if performCertificatePinning is set to 'true'. - $ref: "#/components/schemas/KeystoreTruststorePath" + $ref: "#/components/schemas/SecretPath" - AcceptableTlsVersionsSF: + AcceptableTlsVersions: type: object description: TLS versions supported, at least one should be set to true properties: @@ -809,14 +754,4 @@ components: type: boolean description: TLS version 1.3 - AcceptableTlsVersionsMule: - type: object - description: TLS versions supported, at least one should be set to true - properties: - tlsV1Dot1: - type: boolean - description: TLS version 1.1 - tlsV1Dot2: - type: boolean - description: TLS version 1.2 From bebadd5b62d2d0cf398e0e4eb5698b4739fee572 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 17 Jan 2024 17:40:14 +0100 Subject: [PATCH 48/61] adds secretrgroup crl --- spec/secretgroup_crl_distributor_configs.yml | 303 +++++++++++++++++++ 1 file changed, 303 insertions(+) create mode 100644 spec/secretgroup_crl_distributor_configs.yml diff --git a/spec/secretgroup_crl_distributor_configs.yml b/spec/secretgroup_crl_distributor_configs.yml new file mode 100644 index 0000000..c92b97a --- /dev/null +++ b/spec/secretgroup_crl_distributor_configs.yml @@ -0,0 +1,303 @@ +openapi: 3.0.0 +info: + title: Secret Group Keystore API + description: Secret Group Keystore API + version: 1.0.0 + +servers: + - url: https://anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub + - url: https://eu1.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub EU + - url: https://gov.anypoint.mulesoft.com/secrets-manager/api/v1/ + description: Anypoint Cloudhub GOV + +security: + - bearerAuth: [] + +paths: + /organizations/{orgId}/environments/{envId}/secretGroups/{secretGroupId}/crlDistributorConfigs: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: secretGroupId + description: The secret group id + required: true + schema: + type: string + get: + operationId: GetSecretGroupCrlDistribCfgsList + summary: Retrieves a secret-groups' collection of crl-distributor-configs. + description: Retrieves a secret-groups' collection of crl-distributor-configs. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroupCrlDitribCfgCollection' + post: + operationId: PostSecretGroupCrlDistribCfgs + summary: Create a secret-groups' crl-distributor-configs. + description: Create a secret-groups' crl-distributor-configs. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CrlDistribCfgsReqBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '201': # status code + $ref: '#/components/responses/SuccessPostSecretGroupCrlDistribCfgs' + + /organizations/{orgId}/environments/{envId}/secretGroups/{secretGroupId}/crlDistributorConfigs/{secretId}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: secretGroupId + description: The secret group id + required: true + schema: + type: string + - in: path + name: secretId + description: The crl distributor configurations id + required: true + schema: + type: string + get: + operationId: GetSecretGroupCrlDistribCfgsDetails + summary: Retrieve crl-distributor-configs details + description: Retrieves crl-distributor-configs details by id for a given secret group in a given organization and environment + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetSecretGroupCrlDitribCfgDetails' + put: + operationId: PutSecretGroupTlsContext + summary: Update a given secret-group tls-context + description: Update tls-context details for a given secret-group in a given organization and environment + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CrlDistribCfgsReqBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '400': + $ref: '#/components/responses/BadRequestError' + '200': # status code + $ref: '#/components/responses/SuccessPutSecretGroupCrlDitribCfg' + +components: + securitySchemes: + bearerAuth: # arbitrary name for the security scheme + type: http + scheme: bearer + bearerFormat: JWT + + responses: + UnauthorizedError: + description: Access token is missing or invalid + BadRequestError: + description: Bad request response + content: + application/json: + schema: + $ref: "#/components/schemas/errorsResponse" + NotFoundError: + description: resource not found + content: + application/json: + schema: + type: object + properties: + name: + type: string + message: + type: string + SuccessGetSecretGroupCrlDitribCfgCollection: + description: get secret-groups crl-distributor-configs collection response + content: + application/json: + schema: + $ref: "#/components/schemas/CrlDistribCfgSummaryCollection" + SuccessPostSecretGroupCrlDistribCfgs: + description: post secret-group crl-distributor-configs response + content: + application/json: + schema: + type: object + properties: + message: + type: string + id: + type: string + SuccessGetSecretGroupCrlDitribCfgDetails: + description: get secret-group crl-distributor-configs details response + content: + application/json: + schema: + $ref: "#/components/schemas/CrlDistribCfgsDetails" + SuccessPutSecretGroupCrlDitribCfg: + description: put secret-group crl-distributor-configs response + content: + application/json: + schema: + type: object + properties: + message: + type: string + + schemas: + errorsResponse: + type: object + title: errorsResponse + properties: + errors: + type: array + items: + type: object + properties: + type: + type: string + title: type + dataPath: + type: string + title: dataPath + keyword: + type: string + title: keyword + schema: + type: string + title: schema + data: + type: string + title: data + message: + type: string + title: message + + CrlDistribCfgSummaryCollection: + type: array + items: + $ref: "#/components/schemas/CrlDistribCfgSummary" + + CrlDistribCfgSummary: + type: object + properties: + name: + type: string + meta: + $ref: "#/components/schemas/Meta" + expirationDate: + type: string + format: date + + CrlDistribCfgsDetails: + type: object + properties: + completeCrlIssuerUrl: + type: string + description: URL from where complete CRL file is retrieved + frequency: + type: integer + description: How frequently should the distributor site be checked for new crl files(in minutes) + expirationDate: + type: string + meta: + description: Metadata of a secret + $ref: "#/components/schemas/Meta" + name: + type: string + distributorCertificate: + description: Refers to secret of type certificate + $ref: "#/components/schemas/SecretPath" + deltaCrlIssuerUrl: + description: URL from where the changes in CRL file can be retrieved + type: string + caCertificate: + description: Refers to secret of type certificate + $ref: "#/components/schemas/SecretPath" + + CrlDistribCfgsReqBody: + type: object + properties: + expirationDate: + type: string + description: > + Date on which this secret should expire. If not set, by default, it will be set to one year from the date on which this secret is created/updated. + Once the secret expires, a grant can not be requested for it. + completeCrlIssuerUrl: + type: string + description: URL where complete CRL file should be retrieved + frequency: + type: integer + description: How frequently should the distributor site be checked for new crl files(in minutes) + name: + type: string + distributorCertificate: + description: > + Refers to a secret of type certificate. This certificate is used to check integrity of retrieved CRL files. + If not defined the retrieved CRL file will be used without signature verification step being performed. + $ref: "#/components/schemas/SecretPath" + deltaCrlIssuerUrl: + type: string + caCertificate: + description: > + Refers to a secret of type certificate. + Select the CA certificate associated with the retrieved CRL file. + If selected, the retrieved CRL file may contain revoked and/or held certificates issued by this CA. + The CA subject name is obtained as part of the CRL file that is retrieved. However, the CRL distributor that issued and signed the CRL file may not be the issuing CA. + If this CA certificate is encountered during chain-of-trust processing then a CRL file for this CA must have been successfully retrieved, validated and still in affect (not expired) or the chain-of trust processing fails depending on how the 'Require CRL for all CAs' flag setting configured as described below. + * If the TLS Context secret has the 'Require CRL for all CAs' flag set to false, then the CA certificate should be selected. If not selected then prior to successful retrieval and processing of the CRL file there exists a window of time when a revoked CA certificate could be considered valid in chain-of-trust processing. + * Else if its set to true, then its not necessary to select the CA certificate. + $ref: "#/components/schemas/SecretPath" + + + Meta: + type: object + properties: + id: + type: string + path: + type: string + + SecretPath: + type: object + properties: + path: + type: string + description: Relative path of the secret to be referenced. + From a59970a4a7f91cb0921b5488562a27ae66bc5f60 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 17 Jan 2024 17:42:18 +0100 Subject: [PATCH 49/61] secretgroup_crl_distributor_configs: updates title and description --- spec/secretgroup_crl_distributor_configs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/secretgroup_crl_distributor_configs.yml b/spec/secretgroup_crl_distributor_configs.yml index c92b97a..87c5583 100644 --- a/spec/secretgroup_crl_distributor_configs.yml +++ b/spec/secretgroup_crl_distributor_configs.yml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: - title: Secret Group Keystore API - description: Secret Group Keystore API + title: Secret Group CRL Distributor Configs API + description: Secret Group CRL Distributor Configs API version: 1.0.0 servers: From 3ff1dd5d076a625691d93faf44a82829c1f0ab23 Mon Sep 17 00:00:00 2001 From: souf Date: Mon, 22 Jan 2024 13:26:26 +0100 Subject: [PATCH 50/61] adds apim_policy --- spec/apim_policy.yml | 788 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 788 insertions(+) create mode 100644 spec/apim_policy.yml diff --git a/spec/apim_policy.yml b/spec/apim_policy.yml new file mode 100644 index 0000000..87d2e74 --- /dev/null +++ b/spec/apim_policy.yml @@ -0,0 +1,788 @@ +openapi: 3.0.0 +info: + title: API Manager Policy API + description: API Manager Policy API + version: 1.0.0 + +servers: + - url: https://anypoint.mulesoft.com/apimanager/ + description: Anypoint Cloudhub + - url: https://eu1.anypoint.mulesoft.com/apimanager/ + description: Anypoint Cloudhub EU + - url: https://gov.anypoint.mulesoft.com/apimanager/ + description: Anypoint Cloudhub GOV + +security: + - bearerAuth: [] + +paths: + /api/v1/organizations/{orgId}/automated-policies: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + get: + operationId: GetOrgAutomatedPolicies + parameters: + - name: environmentId + in: query + description: A environment id + required: false + schema: + type: string + summary: Retrieve all automated policies of a given organization + description: Retrieves all automated policies of a given organization and optionally environment. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetOrgAutomatedPolicies' + + /apimanager/api/v1/organizations/{orgId}/custom-policy-templates: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + get: + operationId: GetOrgCustomPolicyTemplates + parameters: + - name: query + in: query + description: Search criteria. + required: false + schema: + type: string + - name: offset + in: query + description: Skip over a number of elements by specifying an offset value for the query. + required: false + schema: + type: integer + - name: ascending + in: query + description: Order for sorting. + required: false + schema: + type: boolean + - name: sort + in: query + description: Property to sort by. + required: false + schema: + type: string + - name: limit + in: query + description: Limit the number of elements on the response. + required: false + schema: + type: integer + summary: Retrieve all or part of custom policy templates of a given organization + description: Retrieves all or part of custom policy templates of a given organization. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetOrgCustomPolicyTemplates' + + /apimanager/xapi/v1/organizations/{orgId}/exchange-policy-templates: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + get: + operationId: GetOrgExchangePolicyTemplates + parameters: + - name: environmentId + in: query + description: The environment id. + required: false + schema: + type: string + - name: splitModel + in: query + description: Whether to include asset split model. + required: false + schema: + type: boolean + - name: latest + in: query + description: include only latest versions. + required: false + schema: + type: boolean + - name: apiInstanceId + in: query + description: include only templates used for api instance id. + required: false + schema: + type: string + - name: includeConfiguration + in: query + description: whether to include configuration. + required: false + schema: + type: boolean + - name: automatedOnly + in: query + description: whether to include automated policies only. + required: false + schema: + type: boolean + summary: Retrieve all or part of exchange policy templates of a given organization + description: Retrieves all or part of exchange policy templates of a given organization. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetOrgExchangePolicyTemplates' + + /apimanager/xapi/v1/organizations/{orgId}/exchange-policy-templates/{groupId}/{assetId}/{assetVersion}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: groupId + description: The group Id + required: true + schema: + type: string + - in: path + name: assetId + description: The asset Id + required: true + schema: + type: string + - in: path + name: assetVersion + description: The asset version + required: true + schema: + type: string + get: + operationId: GetOrgExchangePolicyTemplateDetails + parameters: + - name: includeAllVersions + in: query + description: Whether to include all versions of the asset. + required: false + schema: + type: string + - name: splitModel + in: query + description: Whether to include asset split model. + required: false + schema: + type: boolean + summary: Retrieve details of exchange policy template of a given organization + description: Retrieve details of exchange policy template of a given organization. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetOrgExchangePolicyTemplateDetails' + + /apimanager/api/v1/organizations/{orgId}/environments/{envId}/apis/{apiId}/policies: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment Id + required: true + schema: + type: string + - in: path + name: apiId + description: The api manager instance Id + required: true + schema: + type: string + get: + operationId: GetApimPolicies + summary: Retrieve all of api manager instance policies. + description: Retrieve all of api manager instance policies in a given organization and environment. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetApimPolicies' + post: + operationId: PostApimPolicy + summary: Create an api manager instance policy. + description: Create an api manager instance policy in a given organization and environment. + requestBody: + description: policy content + content: + application/json: + schema: + $ref: "#/components/schemas/ApimPolicyBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '201': # status code + $ref: '#/components/responses/SuccessPostApimPolicy' + + /apimanager/api/v1/organizations/{orgId}/environments/{envId}/apis/{apiId}/policies/{apiPolicyId}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment Id + required: true + schema: + type: string + - in: path + name: apiId + description: The api manager instance Id + required: true + schema: + type: string + - in: path + name: apiPolicyId + description: The api manager instance policy Id + required: true + schema: + type: string + get: + operationId: GetApimPolicy + summary: Retrieve a specific api manager instance policy. + description: Retrieve a specific api manager instance policy in a given organization and environment. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessGetApimPolicy' + patch: + operationId: PatchApimPolicy + summary: Update a specific api manager instance policy. + description: Update a specific api manager instance policy in a given organization and environment. + requestBody: + description: policy content + content: + application/json: + schema: + $ref: "#/components/schemas/ApimPolicyBody" + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessPatchApimPolicy' + delete: + operationId: DeleteApimPolicy + summary: Delete a specific api manager instance policy. + description: Delete a specific api manager instance policy in a given organization and environment. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '200': # status code + $ref: '#/components/responses/SuccessDeleteApimPolicy' + +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + + responses: + UnauthorizedError: + description: Access token is missing or invalid + BadRequestError: + description: Bad request response + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorsResponse" + NotFoundError: + description: resource not found + content: + application/json: + schema: + type: object + properties: + name: + type: string + message: + type: string + SuccessGetOrgAutomatedPolicies: + description: collection of automated policies + content: + application/json: + schema: + $ref: "#/components/schemas/AutomatedPolicyCollection" + SuccessGetOrgCustomPolicyTemplates: + description: list of custom policy templates + # TODO: finish schema + SuccessGetOrgExchangePolicyTemplates: + description: list of exchange policy templates + content: + application/json: + schema: + $ref: "#/components/schemas/ExchangePolicyTemplateCollection" + SuccessGetOrgExchangePolicyTemplateDetails: + description: exchange policy template details + content: + application/json: + schema: + $ref: "#/components/schemas/ExchangePolicyTemplateDetails" + SuccessGetApimPolicies: + description: list api manager policies + content: + application/json: + schema: + $ref: "#/components/schemas/ApimPolicyCollection" + SuccessPostApimPolicy: + description: create api manager policy + content: + application/json: + schema: + $ref: "#/components/schemas/ApimPolicy" + SuccessGetApimPolicy: + description: get specific api manager policy + content: + application/json: + schema: + $ref: "#/components/schemas/ApimPolicy" + SuccessPatchApimPolicy: + description: patch specific api manager policy + content: + application/json: + schema: + $ref: "#/components/schemas/ApimPolicy" + SuccessDeleteApimPolicy: + description: delete specific api manager policy + + schemas: + ErrorsResponse: + type: object + title: errorsResponse + properties: + errors: + type: array + items: + type: object + properties: + type: + type: string + title: type + dataPath: + type: string + title: dataPath + keyword: + type: string + title: keyword + schema: + type: string + title: schema + data: + type: string + title: data + message: + type: string + title: message + + AutomatedPolicyCollection: + type: object + properties: + automatedPolicies: + type: array + items: + $ref: "#/components/schemas/AutomatedPolicy" + total: + type: integer + + AutomatedPolicy: + type: object + properties: + audit: + $ref: "#/components/schemas/Audit" + id: + type: integer + ruleOfApplication: + type: object + properties: + environmentId: + type: string + organizationId: + type: string + groupId: + type: string + assetId: + type: string + assetVersion: + type: string + configurationData: + type: object + pointcutData: + nullable: true + order: + type: integer + disabled: + type: boolean + implementationAssets: + type: array + items: + $ref: "#/components/schemas/ImplementationAsset" + + ExchangePolicyTemplateCollection: + type: array + items: + $ref: "#/components/schemas/ExchangePolicyTemplate" + + ExchangePolicyTemplate: + type: object + properties: + audit: + $ref: "#/components/schemas/Audit" + id: + type: integer + groupId: + type: string + assetId: + type: string + version: + type: string + name: + type: string + description: + type: string + type: + type: string + isOOTB: + type: boolean + stage: + type: string + status: + type: string + yamlMd5: + type: string + jarMd5: + type: string + orgId: + type: string + minMuleVersion: + type: string + supportedPoliciesVersions: + type: string + category: + type: string + violationCategory: + type: string + resourceLevelSupported: + type: boolean + encryptionSupported: + type: boolean + standalone: + type: boolean + requiredCharacteristics: + type: array + items: + type: string + identityManagement: + type: object + required: + - type + properties: + type: + type: string + providedCharacteristics: + type: array + items: + type: string + ramlSnippet: + type: string + ramlV1Snippet: + type: string + oasV2Snippet: + type: string + oasV3Snippet: + type: string + applicable: + type: boolean + configuration: + type: array + items: + $ref: "#/components/schemas/PolicyConfiguration" + + ExchangePolicyTemplateDetails: + type: object + properties: + audit: + $ref: "#/components/schemas/Audit" + id: + type: integer + groupId: + type: string + assetId: + type: string + version: + type: string + name: + type: string + description: + type: string + type: + type: string + isOOTB: + type: boolean + stage: + type: string + status: + type: string + yamlMd5: + type: string + jarMd5: + nullable: true + type: string + orgId: + type: string + minMuleVersion: + nullable: true + type: string + schemaId: + type: string + configuration: + type: object + properties: + title: + type: string + type: + type: string + description: + type: string + properties: + type: object + required: + type: array + items: + type: string + unevaluatedProperties: + type: boolean + '@context': + type: object + properties: + config: + type: string + '$id': + type: string + '$schema': + type: string + category: + type: string + providedCharacteristics: + type: array + items: + type: string + requiredCharacteristics: + type: array + items: + type: string + interfaceScope: + type: array + items: + type: string + violationCategory: + type: string + interfaceTransformation: + type: array + items: + type: string + allVersions: + type: array + items: + type: object + properties: + groupId: + type: string + assetId: + type: string + version: + type: string + splitAssetModel: + type: boolean + supportedJavaVersions: + type: array + items: + nullable: true + type: string + + ApimPolicyCollection: + type: array + items: + $ref: "#/components/schemas/ApimPolicy" + + ApimPolicy: + type: object + properties: + audit: + $ref: "#/components/schemas/Audit" + masterOrganizationId: + type: string + organizationId: + type: string + id: + type: integer + policyTemplateId: + type: string + configurationData: + type: object + order: + type: integer + disabled: + type: boolean + pointcutData: + nullable: true + type: string + groupId: + type: string + assetId: + type: string + assetVersion: + type: string + type: + type: string + apiId: + type: integer + + ApimPolicyBody: + type: object + properties: + configurationData: + type: object + apiVersionId: + type: integer + pointcutData: + nullable: true + type: string + policyTemplateId: + type: integer + groupId: + type: string + assetId: + type: string + assetVersion: + type: string + + PolicyConfiguration: + type: object + properties: + propertyName: + type: string + name: + type: string + description: + type: string + type: + type: string + options: + type: array + items: + type: object + properties: + name: + type: string + value: + oneOf: + - type: string + - type: boolean + - type: integer + optional: + type: boolean + defaultValue: + oneOf: + - type: string + - type: boolean + - type: integer + sensitive: + type: boolean + allowMultiple: + type: boolean + configuration: + type: array + items: + type: object + properties: + propertyName: + type: string + type: + type: string + + ImplementationAsset: + type: object + properties: + name: + type: string + assetId: + type: string + groupId: + type: string + version: + type: string + technology: + type: string + releaseNotes: + type: string + organizationId: + type: string + minRuntimeVersion: + type: string + + Audit: + type: object + properties: + created: + type: object + properties: + date: + type: string + updated: + type: object + properties: + date: + type: string + + + + + + From d5d032d635e604bb70f2e42687248791cc508290 Mon Sep 17 00:00:00 2001 From: souf Date: Mon, 22 Jan 2024 13:27:27 +0100 Subject: [PATCH 51/61] apim_policy: fixes issue on the path --- spec/apim_policy.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/apim_policy.yml b/spec/apim_policy.yml index 87d2e74..381d9ed 100644 --- a/spec/apim_policy.yml +++ b/spec/apim_policy.yml @@ -43,7 +43,7 @@ paths: '200': # status code $ref: '#/components/responses/SuccessGetOrgAutomatedPolicies' - /apimanager/api/v1/organizations/{orgId}/custom-policy-templates: + /api/v1/organizations/{orgId}/custom-policy-templates: parameters: - in: path name: orgId @@ -94,7 +94,7 @@ paths: '200': # status code $ref: '#/components/responses/SuccessGetOrgCustomPolicyTemplates' - /apimanager/xapi/v1/organizations/{orgId}/exchange-policy-templates: + /xapi/v1/organizations/{orgId}/exchange-policy-templates: parameters: - in: path name: orgId @@ -151,7 +151,7 @@ paths: '200': # status code $ref: '#/components/responses/SuccessGetOrgExchangePolicyTemplates' - /apimanager/xapi/v1/organizations/{orgId}/exchange-policy-templates/{groupId}/{assetId}/{assetVersion}: + /xapi/v1/organizations/{orgId}/exchange-policy-templates/{groupId}/{assetId}/{assetVersion}: parameters: - in: path name: orgId @@ -202,7 +202,7 @@ paths: '200': # status code $ref: '#/components/responses/SuccessGetOrgExchangePolicyTemplateDetails' - /apimanager/api/v1/organizations/{orgId}/environments/{envId}/apis/{apiId}/policies: + /api/v1/organizations/{orgId}/environments/{envId}/apis/{apiId}/policies: parameters: - in: path name: orgId @@ -251,7 +251,7 @@ paths: '201': # status code $ref: '#/components/responses/SuccessPostApimPolicy' - /apimanager/api/v1/organizations/{orgId}/environments/{envId}/apis/{apiId}/policies/{apiPolicyId}: + /api/v1/organizations/{orgId}/environments/{envId}/apis/{apiId}/policies/{apiPolicyId}: parameters: - in: path name: orgId From e99b67e740de3b3f2852b8523ca7d6e4cc4f396e Mon Sep 17 00:00:00 2001 From: souf Date: Mon, 22 Jan 2024 13:28:27 +0100 Subject: [PATCH 52/61] apim_policy: updates delete status response --- spec/apim_policy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/apim_policy.yml b/spec/apim_policy.yml index 381d9ed..830646f 100644 --- a/spec/apim_policy.yml +++ b/spec/apim_policy.yml @@ -314,7 +314,7 @@ paths: $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' - '200': # status code + '204': # status code $ref: '#/components/responses/SuccessDeleteApimPolicy' components: From ca21dbd4f2f2480804bcf576cc988f2234a7d287 Mon Sep 17 00:00:00 2001 From: souf Date: Mon, 22 Jan 2024 14:01:09 +0100 Subject: [PATCH 53/61] apim_policy: update post and patch post body --- spec/apim_policy.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/spec/apim_policy.yml b/spec/apim_policy.yml index 830646f..18e284d 100644 --- a/spec/apim_policy.yml +++ b/spec/apim_policy.yml @@ -689,19 +689,14 @@ components: properties: configurationData: type: object - apiVersionId: - type: integer - pointcutData: - nullable: true - type: string - policyTemplateId: - type: integer groupId: type: string assetId: type: string assetVersion: type: string + order: + type: integer PolicyConfiguration: type: object From 92029e446ab8b0b178d18a382213eb4bbf0c6d2b Mon Sep 17 00:00:00 2001 From: souf Date: Mon, 22 Jan 2024 14:10:50 +0100 Subject: [PATCH 54/61] apim_policy: adds enable/disable policy --- spec/apim_policy.yml | 88 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/spec/apim_policy.yml b/spec/apim_policy.yml index 18e284d..60c525f 100644 --- a/spec/apim_policy.yml +++ b/spec/apim_policy.yml @@ -317,6 +317,82 @@ paths: '204': # status code $ref: '#/components/responses/SuccessDeleteApimPolicy' + /xapi/v1/organizations/{orgId}/environments/{envId}/apis/{apiId}/policies/{apiPolicyId}/disable: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment Id + required: true + schema: + type: string + - in: path + name: apiId + description: The api manager instance Id + required: true + schema: + type: string + - in: path + name: apiPolicyId + description: The api manager instance policy Id + required: true + schema: + type: string + post: + operationId: DisableApimPolicy + summary: Disable a specific api manager instance policy. + description: Disable a specific api manager instance policy in a given organization and environment. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '201': # status code + $ref: '#/components/responses/SuccessDisableApimPolicy' + + /xapi/v1/organizations/{orgId}/environments/{envId}/apis/{apiId}/policies/{apiPolicyId}/enable: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment Id + required: true + schema: + type: string + - in: path + name: apiId + description: The api manager instance Id + required: true + schema: + type: string + - in: path + name: apiPolicyId + description: The api manager instance policy Id + required: true + schema: + type: string + post: + operationId: EnableApimPolicy + summary: Enable a specific api manager instance policy. + description: Enable a specific api manager instance policy in a given organization and environment. + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '201': # status code + $ref: '#/components/responses/SuccessEnableApimPolicy' + components: securitySchemes: bearerAuth: @@ -391,6 +467,18 @@ components: $ref: "#/components/schemas/ApimPolicy" SuccessDeleteApimPolicy: description: delete specific api manager policy + SuccessDisableApimPolicy: + description: disable specific api manager policy + content: + application/json: + schema: + $ref: "#/components/schemas/ApimPolicy" + SuccessEnableApimPolicy: + description: enable specific api manager policy + content: + application/json: + schema: + $ref: "#/components/schemas/ApimPolicy" schemas: ErrorsResponse: From 89522ce7b91620cfde4306e2d74d3049b69b0431 Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 23 Jan 2024 09:23:22 +0100 Subject: [PATCH 55/61] apim_policy: updates --- spec/apim_policy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/apim_policy.yml b/spec/apim_policy.yml index 60c525f..0b39961 100644 --- a/spec/apim_policy.yml +++ b/spec/apim_policy.yml @@ -608,8 +608,6 @@ components: type: string identityManagement: type: object - required: - - type properties: type: type: string From 96501e21944fa1f12238061874901caf470ff559 Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 23 Jan 2024 10:25:35 +0100 Subject: [PATCH 56/61] apim_policy: updates --- spec/apim_policy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/apim_policy.yml b/spec/apim_policy.yml index 0b39961..5f51187 100644 --- a/spec/apim_policy.yml +++ b/spec/apim_policy.yml @@ -185,7 +185,7 @@ paths: description: Whether to include all versions of the asset. required: false schema: - type: string + type: boolean - name: splitModel in: query description: Whether to include asset split model. From d2762f5af6d117a102d12bedb2c55fb92349be6b Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 23 Jan 2024 18:18:05 +0100 Subject: [PATCH 57/61] apim_policies: updates the pointcutData format --- spec/apim_policy.yml | 173 ++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 111 deletions(-) diff --git a/spec/apim_policy.yml b/spec/apim_policy.yml index 5f51187..f23d575 100644 --- a/spec/apim_policy.yml +++ b/spec/apim_policy.yml @@ -226,6 +226,13 @@ paths: operationId: GetApimPolicies summary: Retrieve all of api manager instance policies. description: Retrieve all of api manager instance policies in a given organization and environment. + parameters: + - in: query + name: fullInfo + required: false + schema: + type: boolean + default: false responses: '401': $ref: '#/components/responses/UnauthorizedError' @@ -440,7 +447,7 @@ components: content: application/json: schema: - $ref: "#/components/schemas/ExchangePolicyTemplateDetails" + $ref: "#/components/schemas/ExchangePolicyTemplate" SuccessGetApimPolicies: description: list api manager policies content: @@ -542,7 +549,7 @@ components: configurationData: type: object pointcutData: - nullable: true + $ref: "#/components/schemas/PointcutData" order: type: integer disabled: @@ -629,90 +636,6 @@ components: type: array items: $ref: "#/components/schemas/PolicyConfiguration" - - ExchangePolicyTemplateDetails: - type: object - properties: - audit: - $ref: "#/components/schemas/Audit" - id: - type: integer - groupId: - type: string - assetId: - type: string - version: - type: string - name: - type: string - description: - type: string - type: - type: string - isOOTB: - type: boolean - stage: - type: string - status: - type: string - yamlMd5: - type: string - jarMd5: - nullable: true - type: string - orgId: - type: string - minMuleVersion: - nullable: true - type: string - schemaId: - type: string - configuration: - type: object - properties: - title: - type: string - type: - type: string - description: - type: string - properties: - type: object - required: - type: array - items: - type: string - unevaluatedProperties: - type: boolean - '@context': - type: object - properties: - config: - type: string - '$id': - type: string - '$schema': - type: string - category: - type: string - providedCharacteristics: - type: array - items: - type: string - requiredCharacteristics: - type: array - items: - type: string - interfaceScope: - type: array - items: - type: string - violationCategory: - type: string - interfaceTransformation: - type: array - items: - type: string allVersions: type: array items: @@ -724,18 +647,20 @@ components: type: string version: type: string - splitAssetModel: - type: boolean - supportedJavaVersions: - type: array - items: - nullable: true - type: string ApimPolicyCollection: - type: array - items: - $ref: "#/components/schemas/ApimPolicy" + oneOf: + - type: array + title: "ApimPolicyCollecion" + items: + $ref: "#/components/schemas/ApimPolicy" + - type: object + title: "ApimPolicyFullCollecion" + properties: + policies: + type: array + items: + $ref: "#/components/schemas/ApimPolicyFull" ApimPolicy: type: object @@ -757,8 +682,7 @@ components: disabled: type: boolean pointcutData: - nullable: true - type: string + $ref: "#/components/schemas/PointcutData" groupId: type: string assetId: @@ -770,6 +694,33 @@ components: apiId: type: integer + ApimPolicyFull: + type: object + properties: + policyTemplateId: + type: string + type: + type: string + policyId: + type: integer + version: + type: integer + order: + type: integer + pointcutData: + $ref: "#/components/schemas/PointcutData" + configuration: + type: object + template: + type: object + properties: + groupId: + type: string + assetId: + type: string + assetVersion: + type: string + ApimPolicyBody: type: object properties: @@ -783,6 +734,19 @@ components: type: string order: type: integer + pointcutData: + $ref: "#/components/schemas/PointcutData" + + PointcutData: + nullable: true + type: array + items: + type: object + properties: + methodRegex: + type: string + uriTemplateRegex: + type: string PolicyConfiguration: type: object @@ -799,21 +763,8 @@ components: type: array items: type: object - properties: - name: - type: string - value: - oneOf: - - type: string - - type: boolean - - type: integer optional: type: boolean - defaultValue: - oneOf: - - type: string - - type: boolean - - type: integer sensitive: type: boolean allowMultiple: From a389e6205e0e9eafd1f7336e6d24a5289be27959 Mon Sep 17 00:00:00 2001 From: souf Date: Wed, 24 Jan 2024 10:04:14 +0100 Subject: [PATCH 58/61] apim_policy: updates pointcutDate schema --- spec/apim_policy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/apim_policy.yml b/spec/apim_policy.yml index f23d575..93136a6 100644 --- a/spec/apim_policy.yml +++ b/spec/apim_policy.yml @@ -742,6 +742,7 @@ components: type: array items: type: object + title: PointcutDataItem properties: methodRegex: type: string From 0fd4d79b030f0f67544098808e7dce38d3479725 Mon Sep 17 00:00:00 2001 From: souf Date: Thu, 25 Jan 2024 08:38:45 +0100 Subject: [PATCH 59/61] apim_policy: updates patch body to use open schema. --- spec/apim_policy.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/spec/apim_policy.yml b/spec/apim_policy.yml index 93136a6..cd44df3 100644 --- a/spec/apim_policy.yml +++ b/spec/apim_policy.yml @@ -1,4 +1,4 @@ -openapi: 3.0.0 +openapi: 3.0.3 info: title: API Manager Policy API description: API Manager Policy API @@ -304,7 +304,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ApimPolicyBody" + $ref: "#/components/schemas/ApimPolicyPatchBody" responses: '401': $ref: '#/components/responses/UnauthorizedError' @@ -737,8 +737,15 @@ components: pointcutData: $ref: "#/components/schemas/PointcutData" + ApimPolicyPatchBody: + type: object + description: > + is the same as ApimPolicyBody, but since we had some issue generating a struct that puts nil to pointcutData. + We chose to leave this unspecified for an optimum coverage. + PointcutData: nullable: true + title: PointcutDataArray type: array items: type: object From a938b9f1a31b69e85442d09b4a0f70e5d540525a Mon Sep 17 00:00:00 2001 From: souf Date: Tue, 30 Jan 2024 13:32:46 +0100 Subject: [PATCH 60/61] apim: fixes issue linked to creation and update of flexgateway and api manager instances --- spec/apim.yml | 107 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 69 insertions(+), 38 deletions(-) diff --git a/spec/apim.yml b/spec/apim.yml index 0d979ab..621d757 100644 --- a/spec/apim.yml +++ b/spec/apim.yml @@ -5,18 +5,18 @@ info: version: 1.0.0 servers: - - url: https://anypoint.mulesoft.com/apimanager/api/v1/ + - url: https://anypoint.mulesoft.com/apimanager description: Anypoint Cloudhub - - url: https://eu1.anypoint.mulesoft.com/apimanager/api/v1/ + - url: https://eu1.anypoint.mulesoft.com/apimanager description: Anypoint Cloudhub EU - - url: https://gov.anypoint.mulesoft.com/apimanager/api/v1/ + - url: https://gov.anypoint.mulesoft.com/apimanager description: Anypoint Cloudhub GOV security: - bearerAuth: [] paths: - /organizations/{orgId}/environments/{envId}/apis: + /api/v1/organizations/{orgId}/environments/{envId}/apis: parameters: - in: path name: orgId @@ -121,25 +121,8 @@ paths: $ref: '#/components/responses/BadRequestError' '200': # status code $ref: '#/components/responses/SuccessGetApimInstanceCollection' - post: - operationId: PostApimInstance - summary: Creates an API Manager Instance - description: Creates an API Manager Instance in a given environment. Connected Apps require the scope "Manage APIs Configuration". - requestBody: - description: 'Post API Manager Instance Body' - content: - application/json: - schema: - $ref: '#/components/schemas/ApimInstancePostBody' - responses: - '401': - $ref: '#/components/responses/UnauthorizedError' - '400': - $ref: '#/components/responses/BadRequestError' - '201': # status code - $ref: '#/components/responses/SuccessPostApimInstance' - /organizations/{orgId}/environments/{envId}/apis/{envApiId}: + /api/v1/organizations/{orgId}/environments/{envId}/apis/{envApiId}: parameters: - in: path name: orgId @@ -191,6 +174,70 @@ paths: $ref: '#/components/responses/NotFoundError' '200': # status code $ref: '#/components/responses/SuccessGetApimInstanceDetails' + delete: + operationId: DeleteApimInstance + summary: Delete a specific API Manager Instance + description: Delete a specific API Manager Instance in a specific environment and organization. Connected Apps require the scope "Manage APIs Configuration". + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '204': + $ref: '#/components/responses/SuccessDeleteApimInstance' + + /xapi/v1/organizations/{orgId}/environments/{envId}/apis: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + post: + operationId: PostApimInstance + summary: Creates an API Manager Instance + description: Creates an API Manager Instance in a given environment. Connected Apps require the scope "Manage APIs Configuration". + requestBody: + description: 'Post API Manager Instance Body' + content: + application/json: + schema: + $ref: '#/components/schemas/ApimInstancePostBody' + responses: + '401': + $ref: '#/components/responses/UnauthorizedError' + '400': + $ref: '#/components/responses/BadRequestError' + '201': # status code + $ref: '#/components/responses/SuccessPostApimInstance' + + /xapi/v1/organizations/{orgId}/environments/{envId}/apis/{envApiId}: + parameters: + - in: path + name: orgId + description: The organization Id + required: true + schema: + type: string + - in: path + name: envId + description: The environment id + required: true + schema: + type: string + - in: path + name: envApiId + description: The api manager instance id for a given environment + required: true + schema: + type: string patch: operationId: PatchApimInstance parameters: @@ -223,17 +270,6 @@ paths: $ref: '#/components/responses/NotFoundError' '200': # status code $ref: '#/components/responses/SuccessPatchApimInstance' - delete: - operationId: DeleteApimInstance - summary: Delete a specific API Manager Instance - description: Delete a specific API Manager Instance in a specific environment and organization. Connected Apps require the scope "Manage APIs Configuration". - responses: - '401': - $ref: '#/components/responses/UnauthorizedError' - '404': - $ref: '#/components/responses/NotFoundError' - '204': - $ref: '#/components/responses/SuccessDeleteApimInstance' components: securitySchemes: @@ -511,7 +547,6 @@ components: type: boolean lastActiveDate: type: string - format: date-time nullable: true endpointUri: type: string @@ -642,7 +677,6 @@ components: nullable: true lastActiveDate: type: string - format: date-time nullable: true isCloudHub: type: string @@ -756,13 +790,11 @@ components: properties: date: type: string - format: date-time updated: type: object properties: date: type: string - format: date-time Deployment: title: Deployment @@ -796,7 +828,6 @@ components: nullable: true updatedDate: type: string - format: date-time type: type: string expectedStatus: From 2925f10ff855a493c857047810d14bebdde85bcf Mon Sep 17 00:00:00 2001 From: souf Date: Mon, 5 Feb 2024 11:44:40 +0100 Subject: [PATCH 61/61] connected_app: updates paths to adds org --- spec/connected_app.yml | 164 +++++++++++++++++++++++++++++------------ 1 file changed, 115 insertions(+), 49 deletions(-) diff --git a/spec/connected_app.yml b/spec/connected_app.yml index 3f76013..783c4aa 100644 --- a/spec/connected_app.yml +++ b/spec/connected_app.yml @@ -1,30 +1,72 @@ openapi: 3.0.1 info: title: Connected App API - description: Description of the Connected App API + description: Description of the Connected App API version: 1.0.0 servers: - url: https://anypoint.mulesoft.com/accounts/api/ - description: Anypoint Cloudhub + description: Anypoint Cloudhub - url: https://eu1.anypoint.mulesoft.com/accounts/api/ description: Anypoint Cloudhub EU - url: https://gov.anypoint.mulesoft.com/accounts/api/ description: Anypoint Cloudhub GOV security: - - bearerAuth: [] + - bearerAuth: [] paths: /connectedApplications: get: - description: Returns all connected apps + operationId: GetAllConnectedApps + description: Get all connected applications for the organization + parameters: + - in: query + name: includeUsage + description: flag to indicate whether to return usage statistics + required: false + schema: + type: boolean + - in: query + name: orgId + description: Provide an orgId to get all clients from other organization + required: false + schema: + type: string + - in: query + name: offset + description: The number of records to omit from the response. + required: false + schema: + type: integer + - in: query + name: limit + description: Maximum records to retrieve per request. + required: false + schema: + type: integer + - in: query + name: search + description: A search string to use for case-insensitive partial matches on all object properties. + required: false + schema: + type: string responses: '401': $ref: '#/components/responses/UnauthorizedError' '200': $ref: '#/components/responses/SuccessListConnApps' + + /organizations/{orgId}/connectedApplications: + parameters: + - name: orgId + in: path + description: The ID of the organization + required: true + schema: + type: string post: - description: create a Connected App + operationId: CreateConnectedApp + description: Create a new connected application requestBody: content: application/json: @@ -38,30 +80,46 @@ paths: '201': $ref: '#/components/responses/SuccessPostConnApps' - /connectedApplications/{connAppId}: + + /organizations/{orgId}/connectedApplications/{connAppId}: + parameters: + - name: orgId + in: path + description: The ID of the organization + required: true + schema: + type: string + - name: connAppId + in: path + description: The ID of the connected app + required: true + schema: + type: string get: - description: Returns all connected apps + operationId: GetConnectedApp + description: Get a single connected application parameters: - - name: connAppId - in: path - description: The ID of the connected app - required: true + - in: query + name: includeUsage + description: flag to indicate whether to return usage statistics + required: false schema: - type: string + type: boolean responses: '401': $ref: '#/components/responses/UnauthorizedError' '200': $ref: '#/components/responses/SuccessGetConnApps' patch: - description: patches a Connected App + operationId: UpdateConnectedApp + description: Patches a single connected application parameters: - - name: connAppId - in: path - description: The ID of the connected app - required: true - schema: - type: string + - in: query + name: resetSecret + description: Asks service to reset secret as part of this operation + required: false + schema: + type: boolean requestBody: content: application/json: @@ -75,44 +133,52 @@ paths: '200': $ref: '#/components/responses/SuccessPatchConnApps' delete: - description: deletes a Connected App - parameters: - - name: connAppId - in: path - description: The ID of the connected app - required: true - schema: - type: string + operationId: DeleteConnectedApp + description: Deletes a single connected application responses: '401': $ref: '#/components/responses/UnauthorizedError' '204': $ref: '#/components/responses/SuccessDeleteConnApps' - /connectedApplications/{connAppId}/scopes: + /organizations/{orgId}/connectedApplications/{connAppId}/scopes: + parameters: + - name: orgId + in: path + description: The ID of the organization + required: true + schema: + type: string + - name: connAppId + in: path + description: The ID of the connected app + required: true + schema: + type: string get: - description: Returns all scopes of a Connected App + operationId: GetConnectedAppScopes + description: Retrieves context-aware scopes assigned to the connected application parameters: - - name: connAppId - in: path - description: The ID of the connected app - required: true + - in: query + name: offset + description: The number of records to omit from the response. + required: false schema: - type: string + type: integer + - in: query + name: limit + description: Maximum records to retrieve per request. + required: false + schema: + type: integer responses: '401': $ref: '#/components/responses/UnauthorizedError' '200': $ref: '#/components/responses/SuccessGetConnAppScopes' put: - description: replace a Connected App scopes - parameters: - - name: connAppId - in: path - description: The ID of the connected app - required: true - schema: - type: string + operationId: UpdateConnectedAppScopes + description: Replaces the entire list of context-aware scopes assigned to the connected application requestBody: content: application/json: @@ -146,12 +212,12 @@ components: properties: status: type: integer - title: the response status code + title: the response status code default: 400 message: type: string title: the error message - example: A sample message here + example: A sample message here SuccessListConnApps: description: Success response @@ -168,20 +234,20 @@ components: total: type: integer title: total - + SuccessPostConnApps: description: Success post response content: application/json: schema: - $ref: '#/components/schemas/connectedAppRespExt' - + $ref: '#/components/schemas/connectedAppRespExt' + SuccessGetConnApps: description: Success get response content: application/json: schema: - $ref: '#/components/schemas/connectedAppRespExt' + $ref: '#/components/schemas/connectedAppRespExt' SuccessPatchConnApps: description: Success patch response @@ -189,7 +255,7 @@ components: application/json: schema: $ref: '#/components/schemas/connectedAppRespExt' - + SuccessDeleteConnApps: description: Success delete response