From 29c5f3e0f91dbd43179b2fb43632b8147aad8c5a Mon Sep 17 00:00:00 2001 From: Patrick Schauer Date: Tue, 10 Dec 2024 11:11:14 +0100 Subject: [PATCH 1/3] feat(ClientIdUtils): use connectorId as clientId as it is --- .../authorityportal/web/utils/idmanagement/ClientIdUtils.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/utils/idmanagement/ClientIdUtils.kt b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/utils/idmanagement/ClientIdUtils.kt index b851e8f18..7d7295c84 100644 --- a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/utils/idmanagement/ClientIdUtils.kt +++ b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/utils/idmanagement/ClientIdUtils.kt @@ -26,8 +26,6 @@ class ClientIdUtils { fun generateFromConnectorId(connectorId: String): String { return connectorId - .replace(".", "-") - .lowercase(Locale.getDefault()) } fun exists(clientId: String): Boolean { From e9934e215d62945bbb0efeae1fb7cfc67ffcf305 Mon Sep 17 00:00:00 2001 From: Patrick Schauer Date: Tue, 10 Dec 2024 11:11:44 +0100 Subject: [PATCH 2/3] test: make sure that connectorId equals clientId --- .../web/tests/services/connector/CaasManagementApiServiceTest.kt | 1 + .../services/connector/ConnectorManagementApiServiceTest.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/CaasManagementApiServiceTest.kt b/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/CaasManagementApiServiceTest.kt index ad4f121bc..c5c7da3b1 100644 --- a/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/CaasManagementApiServiceTest.kt +++ b/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/CaasManagementApiServiceTest.kt @@ -154,6 +154,7 @@ class CaasManagementApiServiceTest { .withOffsetDateTimeComparator() .withStrictTypeChecking() .isEqualTo(expected.copy()) + assertThat(actual.connectorId).isEqualTo(actual.clientId) } @Test diff --git a/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt b/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt index c235aa4ab..e9d38f8a3 100644 --- a/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt +++ b/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt @@ -547,6 +547,7 @@ class ConnectorManagementApiServiceTest { .withOffsetDateTimeComparator() .withStrictTypeChecking() .isEqualTo(expected.copy()) + assertThat(actual.connectorId).isEqualTo(actual.clientId) } @Test From dc5b68a109139fdce93df1b7a9569a6d11c81c80 Mon Sep 17 00:00:00 2001 From: Patrick Schauer Date: Tue, 10 Dec 2024 11:32:51 +0100 Subject: [PATCH 3/3] docs: update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9f651b71..f5f95cd15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md). - Fixed an issue wherein it was possible to bypass the CaaS request limit in an organization ([PR #384](https://github.com/sovity/authority-portal/pull/384)) - Fixed an issue wherein a user registration could fail due to a mismatch of the internal database and the Keycloak database - Fixed an issue where entries in the connector overview would randomly switch places ([PR #386](https://github.com/sovity/authority-portal/pull/386)) +- Changed Client ID generation for Connectors & Central Components ([#327](https://github.com/sovity/authority-portal/issues/327)) ### Known issues