From a23bae1b1726f0e4c220a5a8b5eb85519ba84a7b Mon Sep 17 00:00:00 2001 From: ms895784 <143127779+ms895784@users.noreply.github.com> Date: Fri, 15 Sep 2023 08:33:41 -0400 Subject: [PATCH] Private/ms895784/more ux fixups (#3071) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * GH6883 review comments (#3072) Signed-off-by: alexandr cumarav * feat: register gateway to additional discovery service (#3068) * chore: move babel to dev, modify webpack config, spring security Signed-off-by: achmelo * fix: Integration tests for new Cloud Gateway routing (#3044) * Added routing integration tests, and some fixes Signed-off-by: Elena Kubantseva * More integration tests and fixes Signed-off-by: Elena Kubantseva * Addressed review comments Signed-off-by: Elena Kubantseva --------- Signed-off-by: Elena Kubantseva Signed-off-by: achmelo * chore: update dependencies (#3048) * chore: move babel to dev, modify webpack config, spring security Signed-off-by: achmelo * update npm lock Signed-off-by: achmelo * old component update Signed-off-by: achmelo --------- Signed-off-by: achmelo * remove dependency from spring enabler (#3052) Signed-off-by: Pablo Hernán Carle Co-authored-by: Pablo Hernán Carle Signed-off-by: achmelo * [skip ci] Update version Signed-off-by: achmelo * [Gradle Release plugin] [skip ci] Before tag commit 'v2.10.15'. Signed-off-by: achmelo * [Gradle Release plugin] Create new version: 'v2.11.0-SNAPSHOT'. Signed-off-by: achmelo * [skip ci] Update version Signed-off-by: achmelo * [Gradle Release plugin] [skip ci] Before tag commit 'v2.11.0'. Signed-off-by: achmelo * [Gradle Release plugin] Create new version: 'v2.11.1-SNAPSHOT'. Signed-off-by: achmelo * chore: Update UI per suggestions from UX + add keyboard shortcuts - Mike (#3053) * chore[ui]: Update UI per suggestions from UX (#3047) * chore[ui]: Update UI per suggestions from UX Update screens to closer align to figma. Signed-off-by: Mike Simpson * style inputs and focus and hover --------- Signed-off-by: Mike Simpson Co-authored-by: Andrea Tabone <39694626+taban03@users.noreply.github.com> * wip Signed-off-by: at670475 * fix zowe ui Signed-off-by: at670475 * address sonar complains Signed-off-by: at670475 * add tests Signed-off-by: at670475 * add test Signed-off-by: at670475 * add test Signed-off-by: at670475 * fix dev mode and navbar Signed-off-by: at670475 --------- Signed-off-by: Mike Simpson Signed-off-by: at670475 Co-authored-by: ms895784 <143127779+ms895784@users.noreply.github.com> Signed-off-by: achmelo * GH2883 Move ServicesInfoService to the apiml-common (#3056) Signed-off-by: alexandr cumarav Co-authored-by: alexandr cumarav Signed-off-by: achmelo * feat: verify service SSO support from API ML (#3054) * feat(gateway): Reformatted and changed messages a little bit, also changed the container to use sets instead of a list Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> * feat(gateway): Work on SSO verification Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> * feat(gateway): Fixed style problems Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> * feat(gateway): Fixed tests Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> * feat(gateway): Coverage Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> * feat(gateway): fixed warnings Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> * feat(gateway): fixed integration tests Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> * feat(gateway): small refactoring Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> * feat(gateway): removed some files from PR Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> * feat(gateway): addressed some comments Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> --------- Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> Signed-off-by: achmelo * register GW into 2 DS with one being primary for auth, service info,.. Signed-off-by: achmelo * wrapper for discovery clients Signed-off-by: achmelo * feat: Forward client certificate from central gateway to domain gateway in request header (#3046) * Add new filter for re-sending auth source. Signed-off-by: Petr Weinfurt * add license text Signed-off-by: Petr Weinfurt * Read certificate from request header Signed-off-by: at670475 * add integration test Signed-off-by: at670475 * add header to test Signed-off-by: at670475 * add unit test Signed-off-by: at670475 * add error to the log Signed-off-by: at670475 * optmize code and check for certificate in the attibute Signed-off-by: at670475 * Add certificate signature to the additional header Signed-off-by: Petr Weinfurt * Add public rest endpoint to provide JWK set. Signed-off-by: Petr Weinfurt * WellKnownRestController and tests Signed-off-by: Petr Weinfurt * add licenses Signed-off-by: Petr Weinfurt * Add simple integration test Signed-off-by: Petr Weinfurt * Add integration tests for well-known endpoint. Signed-off-by: Petr Weinfurt * Add some javadoc. Signed-off-by: Petr Weinfurt * Fix integration test Signed-off-by: Petr Weinfurt * validate cert Signed-off-by: at670475 * Simplify retrieving the public key. Signed-off-by: Petr Weinfurt * Fix for integration tests Signed-off-by: Petr Weinfurt * Cloud gateway provides certificate chain on public endpoint (instead of public key). Certificate is sent in Client-Cert header. Signed-off-by: Petr Weinfurt * Cloud gateway implementation fixes Signed-off-by: Petr Weinfurt * Categorize certs filter WIP Signed-off-by: Petr Weinfurt * Merge with master branch Signed-off-by: Petr Weinfurt * Fix casting exception Signed-off-by: Petr Weinfurt * Cleanup. Add log messages. Signed-off-by: Petr Weinfurt * Fixes Signed-off-by: Petr Weinfurt * Add tests for CategorizeCertsFilter Signed-off-by: Petr Weinfurt * Add CertificateValidatorTest Signed-off-by: Petr Weinfurt * Add caching trusted certificates Signed-off-by: Petr Weinfurt * Fix message types Signed-off-by: Petr Weinfurt * Add javadoc Signed-off-by: Petr Weinfurt * remove unnecessary dependency Signed-off-by: Petr Weinfurt * Prepare SSL Auth for integration test. Signed-off-by: Petr Weinfurt * Remove obsolete test Signed-off-by: Petr Weinfurt * Add new runtime variables to start.sh files. Signed-off-by: Petr Weinfurt * Add new options to manifest.yaml files Signed-off-by: Petr Weinfurt * fix integration test Signed-off-by: Petr Weinfurt * Update IT Signed-off-by: Petr Weinfurt * Update keystore for IT Signed-off-by: Petr Weinfurt * Update error messages Signed-off-by: Petr Weinfurt * Update common name in the certificate Signed-off-by: Petr Weinfurt * Update common name in the certificate Signed-off-by: Petr Weinfurt * Update common name in the certificate Signed-off-by: Petr Weinfurt * Update common name in the certificate Signed-off-by: Petr Weinfurt * Add tests for CategorizeCertsFilter Signed-off-by: Petr Weinfurt * Add CA certificate to keystore Signed-off-by: Petr Weinfurt * Add unit tests Signed-off-by: Petr Weinfurt * disable forwarded cert in gateway on localhost Signed-off-by: Petr Weinfurt * Resolve code review Signed-off-by: Petr Weinfurt * Increase coverage Signed-off-by: Petr Weinfurt * Externalize the update public keys function to the CategorizeCertsFilter. Update tests. Signed-off-by: Petr Weinfurt * Increase coverage. Signed-off-by: Petr Weinfurt --------- Signed-off-by: Petr Weinfurt Signed-off-by: at670475 Co-authored-by: Andrea Tabone Co-authored-by: achmelo <37397715+achmelo@users.noreply.github.com> Signed-off-by: achmelo * chore: add media icon and change link color (#3057) --------- Signed-off-by: at670475 Signed-off-by: Pablo Hernán Carle Co-authored-by: Pablo Hernán Carle Co-authored-by: Pablo Carle Signed-off-by: achmelo * fix unregistering Signed-off-by: achmelo * cleanup Signed-off-by: achmelo * IT for multiple registration Signed-off-by: achmelo * revert reading of DC list to original version Signed-off-by: achmelo * revert checkstyle Signed-off-by: achmelo * REMOVE! hardcode DS url for test Signed-off-by: achmelo * run new job only Signed-off-by: achmelo * skip tests Signed-off-by: achmelo * styles Signed-off-by: achmelo * align with original CITests Signed-off-by: achmelo * add metrics service test Signed-off-by: achmelo * Revert "run new job only" This reverts commit 530047e09a93a0eabc9130f5f8c5e4a113fdc0b7. Signed-off-by: achmelo * fix: Fixes for API Catalog standalone mode (#3050) --------- Signed-off-by: Pablo Hernán Carle Co-authored-by: Pablo Hernán Carle Signed-off-by: achmelo * fix: header in api portal (#3059) Signed-off-by: Pablo Hernán Carle Co-authored-by: Pablo Hernán Carle Signed-off-by: achmelo * verify registration with second DS Signed-off-by: achmelo * hardcode discovery host Signed-off-by: achmelo * revert local auth provider Signed-off-by: achmelo * getting the list of discovery services from configuration Signed-off-by: sj895092 Signed-off-by: achmelo * create bean conditionally Signed-off-by: achmelo * changed the name from discoveryServiceUrlsList to centralRegistryUrls Signed-off-by: sj895092 Signed-off-by: achmelo * Changed name of a variable to url Signed-off-by: sj895092 Signed-off-by: achmelo * enable second registration in CITests Signed-off-by: achmelo * default value must be empty Signed-off-by: achmelo * revert logging level Signed-off-by: achmelo * fix styles Signed-off-by: achmelo * code review, store unit test reports Signed-off-by: achmelo * increase test coverage Signed-off-by: achmelo * add licenses Signed-off-by: achmelo * AOP check is done also inside getTargetObject Signed-off-by: achmelo * remove empty test Signed-off-by: achmelo * code review Signed-off-by: achmelo * Revert "code review" This reverts commit 5cad7edd5af7047aa181a1feabd51c1fff24dd49. * shutdown discoveryclient in test Signed-off-by: achmelo * Revert "Revert "code review"" This reverts commit 956dbd67 Signed-off-by: achmelo * skip test Signed-off-by: achmelo * debug system exit Signed-off-by: achmelo * return test Signed-off-by: achmelo * remove debugging Signed-off-by: achmelo * remove system exit Signed-off-by: achmelo * separate startup check from build Signed-off-by: achmelo --------- Signed-off-by: achmelo Signed-off-by: Elena Kubantseva Signed-off-by: Pablo Hernán Carle Signed-off-by: Mike Simpson Signed-off-by: at670475 Signed-off-by: alexandr cumarav Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> Signed-off-by: Petr Weinfurt Signed-off-by: sj895092 Co-authored-by: Elena Kubantseva Co-authored-by: Pablo Carle Co-authored-by: Pablo Hernán Carle Co-authored-by: Zowe Robot Co-authored-by: Andrea Tabone <39694626+taban03@users.noreply.github.com> Co-authored-by: ms895784 <143127779+ms895784@users.noreply.github.com> Co-authored-by: cumarav <142503314+cumarav@users.noreply.github.com> Co-authored-by: alexandr cumarav Co-authored-by: matejpopda <20053580+matejpopda@users.noreply.github.com> Co-authored-by: Petr Weinfurt Co-authored-by: Andrea Tabone Co-authored-by: sj895092 * feat: Add centralRegistryUrls config parameter to zowe.yaml (#3069) * (feat) Add centralRegistryUrls config parameter to zowe.yaml Signed-off-by: Petr Weinfurt * Add cert forwarding configuration to schema Signed-off-by: Petr Weinfurt * Add cert forwarding configuration to schema Signed-off-by: Petr Weinfurt * add mock services to prevent shutdown of gateway Signed-off-by: achmelo --------- Signed-off-by: Petr Weinfurt Signed-off-by: achmelo Co-authored-by: achmelo <37397715+achmelo@users.noreply.github.com> Co-authored-by: achmelo * chore: Update dependencies to avoid vulnerabilities V2 (#3074) Signed-off-by: Pavel Jareš * chore: Add html-loader in webpack config (#3073) * Add html loader to build html files Signed-off-by: at670475 * add html-loader as dev-dependency Signed-off-by: at670475 * remove comment Signed-off-by: at670475 * custom-logo could have double slashes Signed-off-by: Pablo Hernán Carle * fix url Signed-off-by: Pablo Hernán Carle --------- Signed-off-by: at670475 Signed-off-by: Pablo Hernán Carle Co-authored-by: Pablo Hernán Carle * chore[ui]: Update UI per suggestions from UX Update screens with notes from jan/mirek Signed-off-by: Mike Simpson * style fab button * rebase * flex direction column footer * unbroke the dashboard footer, now details has too many scrollbars * Supress more swagger details * Feeback in own component, hide license on details * Footer wrapping better, hide feedback button on small screens * mobile navigations * changed favicon * fix menu animation, move open/close fn * img size * wip changes for tiles? * Looks ok on small, not so good on big * flexing tiles * lint fixup * Hardcode tech docs, param for feedback * remove margin on techdoc in mobile menu * more feedback tweaks * fixed up header to be img text img * fix flex issues, mobile zowe links, footer tweaks * text align * merge * fix scroll issue * fix lint error * cleanup swagger param spacing * space between try it out button and param header, space between params, hide example * Make brett happier with fonts * Pivot from provided html for to custom react form for feedback --------- Signed-off-by: alexandr cumarav Signed-off-by: achmelo Signed-off-by: Elena Kubantseva Signed-off-by: Pablo Hernán Carle Signed-off-by: Mike Simpson Signed-off-by: at670475 Signed-off-by: matejpopda <20053580+matejpopda@users.noreply.github.com> Signed-off-by: Petr Weinfurt Signed-off-by: sj895092 Signed-off-by: Pavel Jareš Co-authored-by: cumarav <142503314+cumarav@users.noreply.github.com> Co-authored-by: achmelo <37397715+achmelo@users.noreply.github.com> Co-authored-by: Elena Kubantseva Co-authored-by: Pablo Carle Co-authored-by: Pablo Hernán Carle Co-authored-by: Zowe Robot Co-authored-by: Andrea Tabone <39694626+taban03@users.noreply.github.com> Co-authored-by: alexandr cumarav Co-authored-by: matejpopda <20053580+matejpopda@users.noreply.github.com> Co-authored-by: Petr Weinfurt Co-authored-by: Andrea Tabone Co-authored-by: sj895092 Co-authored-by: achmelo Co-authored-by: Pavel Jareš <58428711+pj892031@users.noreply.github.com> Co-authored-by: Brian Lee --- .github/workflows/ci-tests.yml | 11 +- .github/workflows/containers.yml | 9 + .run/GatewayApplication.run.xml | 1 - README.md | 20 +- api-catalog-ui/frontend/config-overrides.js | 4 + api-catalog-ui/frontend/package-lock.json | 24200 +++++++++++++++- api-catalog-ui/frontend/package.json | 5 +- api-catalog-ui/frontend/public/favicon.ico | Bin 1150 -> 15406 bytes .../src/assets/images/ExternalLink.svg | 3 + .../frontend/src/assets/images/hamburger.svg | 3 + .../src/assets/images/square-envelope.svg | 11 + .../frontend/src/assets/images/xmark.svg | 10 + .../frontend/src/assets/images/zowe.png | Bin 0 -> 973 bytes .../frontend/src/assets/scss/_media.scss | 75 +- .../frontend/src/assets/scss/_mixin.scss | 11 + .../src/assets/scss/_theme_default.scss | 22 +- .../frontend/src/components/App/App.jsx | 14 +- .../frontend/src/components/App/_app.scss | 68 +- .../src/components/Dashboard/Dashboard.jsx | 43 +- .../src/components/Dashboard/_dashboard.scss | 55 +- .../src/components/DetailPage/DetailPage.jsx | 15 +- .../components/DetailPage/_detailPage.scss | 15 +- .../src/components/DetailPage/_models.scss | 5 + .../FeedbackButton/FeedbackButton.css | 296 + .../FeedbackButton/FeedbackButton.jsx | 82 + .../FeedbackButton/FeedbackButton.test.jsx | 271 + .../FeedbackButtonContainer.jsx | 23 + .../FeedbackButtonContainer.test.jsx | 72 + .../FeedbackButton/_feedbackButton.scss | 0 .../components/FeedbackForm/FeedbackForm.jsx | 357 + .../components/FeedbackForm/FeedbackForm.scss | 57 + .../src/components/Footer/_footer.scss | 70 +- .../frontend/src/components/Header/Header.jsx | 65 +- .../src/components/Header/_header.scss | 82 +- .../src/components/ServiceTab/ServiceTab.jsx | 34 +- .../ServicesNavigationBar.jsx | 17 +- .../src/components/Swagger/SwaggerUI.jsx | 29 +- .../src/components/Swagger/_swagger.scss | 49 +- .../frontend/src/components/Tile/Tile.jsx | 95 +- .../frontend/src/components/Tile/_tile.scss | 34 +- .../frontend/src/utils/utilFunctions.js | 11 +- .../zowe/apiml/product/web/HttpConfig.java | 4 + build.gradle | 4 + config/local/gateway-service.yml | 2 + .../src/main/resources/bin/start.sh | 3 + .../gateway/config/DiscoveryClientConfig.java | 62 +- .../config/DiscoveryClientWrapper.java | 29 + .../controllers/CacheServiceController.java | 2 +- .../discovery/ApimlDiscoveryClient.java | 2 +- .../gateway/security/service/JwtSecurity.java | 4 +- .../service/zosmf/AbstractZosmfService.java | 23 +- .../src/main/resources/application.yml | 4 + .../config/DiscoveryClientBeanTest.java | 51 + .../config/DiscoveryClientWrapperTest.java | 38 + .../src/test/resources/application.yml | 1 + gradle/versions.gradle | 12 +- integration-tests/build.gradle | 21 +- .../DiscoveryServiceRegistrationTest.java | 40 + .../zowe/apiml/util/config/ConfigReader.java | 4 +- .../config/DiscoveryServiceConfiguration.java | 2 + .../util/requests/ha/HADiscoveryRequests.java | 7 +- .../apiml/util/service/DiscoveryUtils.java | 12 +- .../environment-configuration-attls.yml | 2 + .../environment-configuration-docker.yml | 2 + .../environment-configuration-ha.yml | 4 +- .../resources/environment-configuration.yml | 2 + schemas/cloud-gateway-schema.json | 15 +- schemas/gateway-schema.json | 15 + 68 files changed, 26334 insertions(+), 277 deletions(-) create mode 100644 api-catalog-ui/frontend/src/assets/images/ExternalLink.svg create mode 100644 api-catalog-ui/frontend/src/assets/images/hamburger.svg create mode 100644 api-catalog-ui/frontend/src/assets/images/square-envelope.svg create mode 100644 api-catalog-ui/frontend/src/assets/images/xmark.svg create mode 100644 api-catalog-ui/frontend/src/assets/images/zowe.png create mode 100644 api-catalog-ui/frontend/src/components/FeedbackButton/FeedbackButton.css create mode 100644 api-catalog-ui/frontend/src/components/FeedbackButton/FeedbackButton.jsx create mode 100644 api-catalog-ui/frontend/src/components/FeedbackButton/FeedbackButton.test.jsx create mode 100644 api-catalog-ui/frontend/src/components/FeedbackButton/FeedbackButtonContainer.jsx create mode 100644 api-catalog-ui/frontend/src/components/FeedbackButton/FeedbackButtonContainer.test.jsx create mode 100644 api-catalog-ui/frontend/src/components/FeedbackButton/_feedbackButton.scss create mode 100644 api-catalog-ui/frontend/src/components/FeedbackForm/FeedbackForm.jsx create mode 100644 api-catalog-ui/frontend/src/components/FeedbackForm/FeedbackForm.scss create mode 100644 gateway-service/src/main/java/org/zowe/apiml/gateway/config/DiscoveryClientWrapper.java create mode 100644 gateway-service/src/test/java/org/zowe/apiml/gateway/config/DiscoveryClientBeanTest.java create mode 100644 gateway-service/src/test/java/org/zowe/apiml/gateway/config/DiscoveryClientWrapperTest.java create mode 100644 integration-tests/src/test/java/org/zowe/apiml/functional/gateway/DiscoveryServiceRegistrationTest.java diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index d625180fc1..cdc49346b1 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -28,7 +28,10 @@ jobs: - name: Build with Gradle run: > - ./gradlew clean build runStartUpCheck --info --scan -Partifactory_user=${{ secrets.ARTIFACTORY_USERNAME }} -Partifactory_password=${{ secrets.ARTIFACTORY_PASSWORD }} + ./gradlew clean build --info --scan + - name: Run startup check + run: > + ./gradlew runStartUpCheck --info --scan - name: Store results uses: actions/upload-artifact@v2 if: always() @@ -36,5 +39,11 @@ jobs: name: CITests-${{ env.JOB_ID }} path: | integration-tests/build/reports/** + gateway-service/build/reports/** + api-catalog-services/build/reports/** + caching-service/build/reports/** + cloud-gateway-service/build/reports/** + discovery-service/build/reports/** + metrics-service/build/reports/** - uses: ./.github/actions/teardown diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 43086a452e..0a74edb39a 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -55,12 +55,19 @@ jobs: image: ghcr.io/balhar-jakub/discovery-service:${{ github.run_id }}-${{ github.run_number }} volumes: - /api-defs:/api-defs + discovery-service-2: + image: ghcr.io/balhar-jakub/discovery-service:${{ github.run_id }}-${{ github.run_number }} + volumes: + - /api-defs:/api-defs + env: + APIML_SERVICE_HOSTNAME: discovery-service-2 gateway-service: image: ghcr.io/balhar-jakub/gateway-service:${{ github.run_id }}-${{ github.run_number }} env: APIML_SECURITY_AUTH_JWT_CUSTOMAUTHHEADER: customJwtHeader APIML_SECURITY_AUTH_PASSTICKET_CUSTOMUSERHEADER: customUserHeader APIML_SECURITY_AUTH_PASSTICKET_CUSTOMAUTHHEADER: customPassticketHeader + APIML_SERVICE_CENTRALREGISTRYURLS: https://discovery-service-2:10011/eureka mock-services: image: ghcr.io/balhar-jakub/mock-services:${{ github.run_id }}-${{ github.run_number }} metrics-service: @@ -156,6 +163,8 @@ jobs: APIML_SERVICE_FORWARDCLIENTCERTENABLED: true discoverable-client: image: ghcr.io/balhar-jakub/discoverable-client:${{ github.run_id }}-${{ github.run_number }} + mock-services: + image: ghcr.io/balhar-jakub/mock-services:${{ github.run_id }}-${{ github.run_number }} steps: - uses: actions/checkout@v3 diff --git a/.run/GatewayApplication.run.xml b/.run/GatewayApplication.run.xml index a2e7d831ad..b90d5cf323 100644 --- a/.run/GatewayApplication.run.xml +++ b/.run/GatewayApplication.run.xml @@ -8,7 +8,6 @@