diff --git a/CHANGELOG.md b/CHANGELOG.md index 64014de1c..42d29e54a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 1.6.0-RC4 + +### Change + +- Connector Technical Integration page - connector configuration details added + +### Bugfix + +- App Management page access permission changed to add_apps +- Certificate Management page - approval/decline button only available for "pending" credential requests +- Permission validation 'Credential Mgmt' page activated + ## 1.6.0-RC3 ### Change diff --git a/package.json b/package.json index 393aa1d69..0117a518c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@catena-x/portal-frontend", - "version": "v1.6.0-RC3", + "version": "v1.6.0-RC4", "description": "Catena-X Portal Frontend", "author": "Catena-X Contributors", "license": "Apache-2.0", @@ -26,7 +26,7 @@ ] }, "dependencies": { - "@catena-x/portal-shared-components": "^2.0.11", + "@catena-x/portal-shared-components": "^2.0.13", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@hookform/error-message": "^2.0.1", 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..499c53b43 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -454,7 +454,23 @@ "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}}", + "clickhere": "click here" + } + }, "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..1b0c8745f 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -453,7 +453,23 @@ "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}}", + "clickhere": "click here" + } + }, "helpText": "Get some help", + "helpTextNew": "Details Connector Configuration", "headertitle": "Connector Registration", "subheadertitle": "Connector", "tabletitle": "Onboarded Connectors", 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 && ( + <> + + + + )} ), }, 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; diff --git a/src/components/pages/EdcConnector/ConfigurationDetailsOverlay.tsx b/src/components/pages/EdcConnector/ConfigurationDetailsOverlay.tsx new file mode 100644 index 000000000..ed096f251 --- /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.clickhere' + )} + + + + {t( + 'content.edcconnector.configurationDetails.orderList.clientSecret' + )}{' '} + + window.open( + t( + 'content.edcconnector.configurationDetails.orderList.clientSecretLink' + ), + '_blank' + ) + } + > + {t( + 'content.edcconnector.configurationDetails.orderList.clickhere' + )} + + + {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 && ( + + )}