From d38935d87eef8d2548fe1d64ce543dd8df1928c6 Mon Sep 17 00:00:00 2001 From: Manojava Koushik <111366021+manojava-gk@users.noreply.github.com> Date: Tue, 25 Jul 2023 18:21:19 +0530 Subject: [PATCH 1/7] bugfix(connector): remove subscriptionId from technicalUserId attribute and pass empty (#164) --- src/components/pages/EdcConnector/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/pages/EdcConnector/index.tsx b/src/components/pages/EdcConnector/index.tsx index bf49b641a..95af08ec7 100644 --- a/src/components/pages/EdcConnector/index.tsx +++ b/src/components/pages/EdcConnector/index.tsx @@ -154,7 +154,7 @@ const EdcConnector = () => { } else if (selectedService.type === ConnectType.MANAGED_CONNECTOR) { // body.append('providerBpn', data.ConnectorBPN) body.append('subscriptionId', data.ConnectorSubscription.subscriptionId) - body.append('technicalUserId', data.ConnectorSubscription.subscriptionId) + body.append('technicalUserId', '') await createManagedConnector(body) .unwrap() .then(() => showOverlay(true)) From 6c0c3625ef8f8facc8f59f9e27a598d095eb7d5f Mon Sep 17 00:00:00 2001 From: Phil Schneider Date: Tue, 25 Jul 2023 15:35:03 +0200 Subject: [PATCH 2/7] release: bump version for v1.6.0-RC3 (#165) --- CHANGELOG.md | 16 ++++++++++++++++ package.json | 2 +- .../Subscription/SubscriptionElements.tsx | 4 +--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1073f21e..64014de1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## 1.6.0-RC3 + +### Change + +- App Subscription Management + - Activation Approval Overlay (enhanced by customer name, bpn, technical user permission, appId) +- Technical User Management + - support managed tech user with app information +- Connector Registration + - managed connector option only available for app/service provider + - info message added for inactive select scenario + +### Bugfix + +- Managed connector registration api call - technicalUserID string empty instead of submitting the subscriptionID + ## 1.6.0-RC2 ### Change diff --git a/package.json b/package.json index c6143dfa6..7a91dc09c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@catena-x/portal-frontend", - "version": "v1.6.0-RC2", + "version": "1.6.0-RC3", "description": "Catena-X Portal Frontend", "author": "Catena-X Contributors", "license": "Apache-2.0", diff --git a/src/components/shared/templates/Subscription/SubscriptionElements.tsx b/src/components/shared/templates/Subscription/SubscriptionElements.tsx index 0a6b69244..a3085dfc7 100644 --- a/src/components/shared/templates/Subscription/SubscriptionElements.tsx +++ b/src/components/shared/templates/Subscription/SubscriptionElements.tsx @@ -27,9 +27,7 @@ import { Tooltips, Chip, } from '@catena-x/portal-shared-components' -import { - SubscriptionContent, -} from 'features/appSubscription/appSubscriptionApiSlice' +import { SubscriptionContent } from 'features/appSubscription/appSubscriptionApiSlice' import NoItems from 'components/pages/NoItems' import './Subscription.scss' import AppSubscriptionDetailOverlay from 'components/pages/AppSubscription/AppSubscriptionDetailOverlay' From 5fa6906de06ff45da4e4b927ed91f54e5c2d06c6 Mon Sep 17 00:00:00 2001 From: Phil Schneider Date: Tue, 25 Jul 2023 15:44:36 +0200 Subject: [PATCH 3/7] release(1.6.0-RC3): bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7a91dc09c..393aa1d69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@catena-x/portal-frontend", - "version": "1.6.0-RC3", + "version": "v1.6.0-RC3", "description": "Catena-X Portal Frontend", "author": "Catena-X Contributors", "license": "Apache-2.0", From db0d0c70d4861094f39efa17c56c0cdb4cfffcbd Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:20:52 +0530 Subject: [PATCH 4/7] feat(card responsive): made card responsive in usermanagemtn (#171) --- src/components/pages/AppOverview/AppOverview.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/pages/AppOverview/AppOverview.scss b/src/components/pages/AppOverview/AppOverview.scss index c4a52aed7..d25ee2a1e 100644 --- a/src/components/pages/AppOverview/AppOverview.scss +++ b/src/components/pages/AppOverview/AppOverview.scss @@ -55,6 +55,7 @@ flex-wrap: wrap; gap: 20px; width: 1140px; + max-width: 100%; margin: 0px auto; padding-bottom: 40px; From fdf184c9a78f8b668f9c2d68f80e64d7ed5f4672 Mon Sep 17 00:00:00 2001 From: Manojava Koushik <111366021+manojava-gk@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:21:22 +0530 Subject: [PATCH 5/7] bugfix(config): change app management page role (#169) --- src/types/Config.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/Config.tsx b/src/types/Config.tsx index 0e4d97758..20b68c030 100644 --- a/src/types/Config.tsx +++ b/src/types/Config.tsx @@ -202,7 +202,7 @@ export const ALL_PAGES: IPage[] = [ }, { name: PAGES.APP_MANAGEMENT, - role: ROLES.SERVICEMANAGEMENT_VIEW, + role: ROLES.APPMANAGEMENT_VIEW, element: , }, { From f1075cee2c5f710dc915474c0cd16f26a27f30a3 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:21:46 +0530 Subject: [PATCH 6/7] feat(ssi credential): add status for pending state only (#168) --- .../AdminCredentialElements.tsx | 56 +++++++++++-------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/src/components/pages/AdminCredential/AdminCredentialElements.tsx b/src/components/pages/AdminCredential/AdminCredentialElements.tsx index fe8a32e2f..27361b993 100644 --- a/src/components/pages/AdminCredential/AdminCredentialElements.tsx +++ b/src/components/pages/AdminCredential/AdminCredentialElements.tsx @@ -34,6 +34,7 @@ import { download } from 'utils/downloadUtils' import { useFetchNewDocumentByIdMutation } from 'features/appManagement/apiSlice' import { error, success } from 'services/NotifyService' import { uniqueId } from 'lodash' +import { SubscriptionStatus } from 'features/apps/apiSlice' export interface DummyData { date: string @@ -95,6 +96,7 @@ export default function AdminCredentialElements() { status === StatusType.APPROVE ? success(t('content.adminCertificate.approvedMessage')) : error(t('content.adminCertificate.declinedMessage')) + setRefresh(Date.now()) }) .catch(() => { error(t('content.adminCertificate.errorMessage')) @@ -165,28 +167,38 @@ export default function AdminCredentialElements() { flex: 2.5, renderCell: ({ row }: { row: CredentialData }) => ( <> - - + {row.participantStatus === SubscriptionStatus.PENDING && ( + <> + + + + )} ), }, From a4557454dd1bca116247425f8b4751daea57ad4e Mon Sep 17 00:00:00 2001 From: Manojava Koushik <111366021+manojava-gk@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:22:20 +0530 Subject: [PATCH 7/7] updates(connector): update content and help link (#162) --- public/index.html | 2 +- scripts/inject-dynamic-env.sh | 4 +- src/assets/locales/de/main.json | 15 ++ src/assets/locales/en/main.json | 15 ++ .../ConfigurationDetailsOverlay.tsx | 156 ++++++++++++++++++ .../pages/EdcConnector/EdcConnector.scss | 10 ++ src/components/pages/EdcConnector/index.tsx | 12 ++ .../shared/frame/PictureWithText/index.tsx | 22 +++ src/features/connector/connectorApiSlice.ts | 9 + src/services/EnvironmentService.ts | 4 + 10 files changed, 246 insertions(+), 3 deletions(-) create mode 100644 src/components/pages/EdcConnector/ConfigurationDetailsOverlay.tsx diff --git a/public/index.html b/public/index.html index 3f4b360c6..e1dcf0356 100644 --- a/public/index.html +++ b/public/index.html @@ -30,7 +30,7 @@
diff --git a/scripts/inject-dynamic-env.sh b/scripts/inject-dynamic-env.sh index 36202884d..215d2323a 100644 --- a/scripts/inject-dynamic-env.sh +++ b/scripts/inject-dynamic-env.sh @@ -19,8 +19,8 @@ # SPDX-License-Identifier: Apache-2.0 ############################################################### -custom_env_vars='{PORTAL_ASSETS_URL:"'$PORTAL_ASSETS_URL'",PORTAL_BACKEND_URL:"'$PORTAL_BACKEND_URL'",CENTRALIDP_URL:"'$CENTRALIDP_URL'",BPDM_API_URL:"'$BPDM_API_URL'",SEMANTICS_URL:"'$SEMANTICS_URL'"}' -custom_env_vars_anchor='{PORTAL_ASSETS_URL:"http://localhost:3000/assets",PORTAL_BACKEND_URL:"https://portal-backend.dev.demo.catena-x.net",CENTRALIDP_URL:"https://centralidp.dev.demo.catena-x.net/auth",BPDM_API_URL:"https://partners-pool.dev.demo.catena-x.net/api",SEMANTICS_URL:"https://semantics.dev.demo.catena-x.net"}' +custom_env_vars='{PORTAL_ASSETS_URL:"'$PORTAL_ASSETS_URL'",PORTAL_BACKEND_URL:"'$PORTAL_BACKEND_URL'",CENTRALIDP_URL:"'$CENTRALIDP_URL'",BPDM_API_URL:"'$BPDM_API_URL'",SEMANTICS_URL:"'$SEMANTICS_URL'",MANAGED_IDENTITY_WALLETS_NEW_URL:"'$MANAGED_IDENTITY_WALLETS_NEW_URL'"}' +custom_env_vars_anchor='{PORTAL_ASSETS_URL:"http://localhost:3000/assets",PORTAL_BACKEND_URL:"https://portal-backend.dev.demo.catena-x.net",CENTRALIDP_URL:"https://centralidp.dev.demo.catena-x.net/auth",BPDM_API_URL:"https://partners-pool.dev.demo.catena-x.net/api",SEMANTICS_URL:"https://semantics.dev.demo.catena-x.net",MANAGED_IDENTITY_WALLETS_NEW_URL:"https://managed-identity-wallets-new.dev.demo.catena-x.net"}' index_html_reference=`cat /usr/share/nginx/html/index.html.reference` index_html=${index_html_reference//$custom_env_vars_anchor/$custom_env_vars} echo "$index_html" > /usr/share/nginx/html/index.html diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index 3829be999..249824749 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -454,7 +454,22 @@ "owned": "Owned", "managed": "Managed" }, + "configurationDetails": { + "title": "Connector Configuration for authentication flow", + "description": "Your edc instance need to get connected to the catena-x identity provider for the technical user authentication flow to fetch the user token and authenticate against the MIW. Additionally the MIW endpoint, authority BPN and your technical user need to get configured/set to ensure that the connection works correctly.", + "orderList": { + "title": "Below you can find the relevant details regarding all those values", + "centralAuth": "* central auth url: https:{{env}}/realms/CX-Central/protocol/openid-connect/token", + "clientId": "* client id: client id of your existing or newly created tech user - details how to: ", + "clientIdLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md", + "clientSecret": "* client secret: client id of your existing or newly created tech user - details how to: ", + "clientSecretLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md", + "authorityBpn": "* authority bpn: {{bpn}}", + "miwUrl": "* miw url: https:{{managedIdentityWalletApiBase}}" + } + }, "helpText": "Get some help", + "helpTextNew": "Details Connector Configuration", "headertitle": "Connector Registration", "subheadertitle": "Connector", "tabletitle": "Onboarded Connectors", diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index d6d90ea73..2b39b1792 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -453,7 +453,22 @@ "owned": "Owned", "managed": "Managed" }, + "configurationDetails": { + "title": "Connector Configuration for authentication flow", + "description": "Your edc instance need to get connected to the catena-x identity provider for the technical user authentication flow to fetch the user token and authenticate against the MIW. Additionally the MIW endpoint, authority BPN and your technical user need to get configured/set to ensure that the connection works correctly.", + "orderList": { + "title": "Below you can find the relevant details regarding all those values", + "centralAuth": "* central auth url: https:{{env}}/realms/CX-Central/protocol/openid-connect/token", + "clientId": "* client id: client id of your existing or newly created tech user - details how to: ", + "clientIdLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md", + "clientSecret": "* client secret: client id of your existing or newly created tech user - details how to: ", + "clientSecretLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md", + "authorityBpn": "* authority bpn: {{bpn}}", + "miwUrl": "* miw url: https:{{managedIdentityWalletApiBase}}" + } + }, "helpText": "Get some help", + "helpTextNew": "Details Connector Configuration", "headertitle": "Connector Registration", "subheadertitle": "Connector", "tabletitle": "Onboarded Connectors", diff --git a/src/components/pages/EdcConnector/ConfigurationDetailsOverlay.tsx b/src/components/pages/EdcConnector/ConfigurationDetailsOverlay.tsx new file mode 100644 index 000000000..21ddc4b78 --- /dev/null +++ b/src/components/pages/EdcConnector/ConfigurationDetailsOverlay.tsx @@ -0,0 +1,156 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 BMW Group AG + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +import { Trans, useTranslation } from 'react-i18next' +import { + Dialog, + DialogContent, + DialogHeader, + Typography, +} from '@catena-x/portal-shared-components' +import { useFetchOperatorBpnQuery } from 'features/connector/connectorApiSlice' +import { + getCentralIdp, + getManagedIdentityWalletsNewBase, +} from 'services/EnvironmentService' +import './EdcConnector.scss' + +interface ConfigurationDetailsOverlayProps { + openDialog: boolean + handleOverlayClose: () => void +} + +const ConfigurationDetailsOverlay = ({ + openDialog = false, + handleOverlayClose, +}: ConfigurationDetailsOverlayProps) => { + const { t } = useTranslation() + const { data } = useFetchOperatorBpnQuery() + + return ( +
+ + { + handleOverlayClose() + }} + /> + + + {t('content.edcconnector.configurationDetails.orderList.title')} + + + + {t( + 'content.edcconnector.configurationDetails.orderList.centralAuth' + )} + + + + + {t('content.edcconnector.configurationDetails.orderList.clientId')}{' '} + + window.open( + t( + 'content.edcconnector.configurationDetails.orderList.clientSecretLink' + ), + '_blank' + ) + } + > + {t( + 'content.edcconnector.configurationDetails.orderList.clientSecretLink' + )} + + + + {t( + 'content.edcconnector.configurationDetails.orderList.clientSecret' + )}{' '} + + window.open( + t( + 'content.edcconnector.configurationDetails.orderList.clientSecretLink' + ), + '_blank' + ) + } + > + {t( + 'content.edcconnector.configurationDetails.orderList.clientSecretLink' + )} + + + {data && ( + + + {t( + 'content.edcconnector.configurationDetails.orderList.authorityBpn' + )} + + + )} + + + {t('content.edcconnector.configurationDetails.orderList.miwUrl')} + + + + +
+ ) +} + +export default ConfigurationDetailsOverlay diff --git a/src/components/pages/EdcConnector/EdcConnector.scss b/src/components/pages/EdcConnector/EdcConnector.scss index 96fcc4b8a..3b230cf91 100644 --- a/src/components/pages/EdcConnector/EdcConnector.scss +++ b/src/components/pages/EdcConnector/EdcConnector.scss @@ -51,3 +51,13 @@ margin-bottom: 0px; } } + +.detailsBodyText { + margin-bottom: 10px !important; + margin-left: 20px !important; +} + +.detailsBodyLink { + cursor: pointer; + color: #0f71cb; +} diff --git a/src/components/pages/EdcConnector/index.tsx b/src/components/pages/EdcConnector/index.tsx index 95af08ec7..79bdb1ebb 100644 --- a/src/components/pages/EdcConnector/index.tsx +++ b/src/components/pages/EdcConnector/index.tsx @@ -53,6 +53,7 @@ import CreateDapsRegistration from './AddConnectorOverlay/components/CreateDapsR import { SuccessErrorType } from 'features/admin/appuserApiSlice' import { ManagedConnectorTableColumns } from './edcManagedConnectorTableColumns' import { OwnConnectorTableColumns } from './edcOwnConnectorTableColumns' +import ConfigurationDetailsOverlay from './ConfigurationDetailsOverlay' const EdcConnector = () => { const { t } = useTranslation() @@ -88,6 +89,10 @@ const EdcConnector = () => { const [createDapsModalOpen, setCreateDapsModalOpen] = useState(false) useState(false) const [triggerDaps] = useTriggerDapsMutation() + const [ + viewConfigurationDetailsOverlayOpen, + setViewConfigurationDetailsOverlayOpen, + ] = useState(false) const onStepChange = () => { setAddConnectorOverlayCurrentStep(0) @@ -287,6 +292,10 @@ const EdcConnector = () => { loading={loading} onStepChange={onStepChange} /> + setViewConfigurationDetailsOverlayOpen(false)} + /> { text={'content.edcconnector.imagetext'} onHelpButtonClicked={() => onHelpButtonClicked()} onButtonClicked={() => setAddConnectorOverlayOpen(true)} + onNewHelpButtonClicked={() => + setViewConfigurationDetailsOverlayOpen(true) + } />
diff --git a/src/components/shared/frame/PictureWithText/index.tsx b/src/components/shared/frame/PictureWithText/index.tsx index 2ead4484f..8ee552d51 100644 --- a/src/components/shared/frame/PictureWithText/index.tsx +++ b/src/components/shared/frame/PictureWithText/index.tsx @@ -30,6 +30,7 @@ type PictureWithTextProps = { text: string onButtonClicked?: () => void onHelpButtonClicked?: () => void + onNewHelpButtonClicked?: () => void } export default function PictureWithText({ @@ -37,6 +38,7 @@ export default function PictureWithText({ text, onButtonClicked, onHelpButtonClicked, + onNewHelpButtonClicked, }: PictureWithTextProps) { const { t } = useTranslation() @@ -65,6 +67,26 @@ export default function PictureWithText({ > {t('content.edcconnector.helpText')} + {onNewHelpButtonClicked && ( + + )}