diff --git a/CHANGELOG.md b/CHANGELOG.md index bc581333..00bb91c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v7.0.8-7] - 2024-12-16 +### Fixed +- Fix post upgrade script when no service account is defined [#242] +- Remove hashes from validated service url [#238] + - Makes cockpit dogu links available again + ## [v7.0.8-6] - 2024-11-25 ### Fixed - Prevent logging of invalid login credentials [#233] diff --git a/Dockerfile b/Dockerfile index c387e196..9cefe7fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ RUN apk update && apk add wget && wget -O "apache-tomcat-${TOMCAT_VERSION}.tar. FROM registry.cloudogu.com/official/java:21.0.4-4 LABEL NAME="official/cas" \ - VERSION="7.0.8-6" \ + VERSION="7.0.8-7" \ maintainer="hello@cloudogu.com" ARG TOMCAT_VERSION diff --git a/app/src/main/java/de/triology/cas/services/CesServiceMatchingStrategy.java b/app/src/main/java/de/triology/cas/services/CesServiceMatchingStrategy.java index e464b4bc..5f48c688 100644 --- a/app/src/main/java/de/triology/cas/services/CesServiceMatchingStrategy.java +++ b/app/src/main/java/de/triology/cas/services/CesServiceMatchingStrategy.java @@ -21,7 +21,7 @@ public class CesServiceMatchingStrategy implements ServiceMatchingStrategy { @Override public boolean matches(final Service service, final Service serviceToMatch) { try { - val thisUrl = removePortFromUrl(URLDecoder.decode(service.getId(), StandardCharsets.UTF_8)); + val thisUrl = removeHashRoutingFromUrl(removePortFromUrl(URLDecoder.decode(service.getId(), StandardCharsets.UTF_8))); val serviceUrl = removePortFromUrl(URLDecoder.decode(serviceToMatch.getId(), StandardCharsets.UTF_8)); LOGGER.debug("Decoded urls and comparing [{}] with [{}]", thisUrl, serviceUrl); @@ -35,4 +35,8 @@ public boolean matches(final Service service, final Service serviceToMatch) { private String removePortFromUrl(String service) { return service.replaceFirst(":\\d+", ""); } + + private String removeHashRoutingFromUrl(String service) { + return service.split("#")[0]; + } } diff --git a/docs/gui/release_notes_de.md b/docs/gui/release_notes_de.md index 7f46faed..3d1150c1 100644 --- a/docs/gui/release_notes_de.md +++ b/docs/gui/release_notes_de.md @@ -4,9 +4,17 @@ Im Folgenden finden Sie die Release Notes für das CAS-Dogu. Technische Details zu einem Release finden Sie im zugehörigen [Changelog](https://docs.cloudogu.com/de/docs/dogus/cas/CHANGELOG/). -## [Unreleased] +## Release 7.0.8-7 +- Es wurde ein technischer Fehler behoben, bei dem der Upgrade-Prozess unterbrochen wurde +- Es wurde ein technischer Fehler behoben, bei dem das Cockpit-Dopu unter bestimmten Bedinungen nicht augerufen werden konnte + +## Release 7.0.8-6 +- Invalide Anmeldedaten werden nicht mehr geloggt + +## Release 7.0.8-5 - Das Dogu wurde intern auf eine JSON Registry umgestellt, wodurch sich die Logik zum Anlegen und Löschen von Service-Accounts geändert hat. - Einheitliche Verwendung von Service-Accounts sowohl in einer Multinode- als auch Singlenode-Umgebung. +- Behebung des Bugs, dass ein Upgrade abbricht, wenn keine Serviceaccounts vorhanden sind. ### Breaking Change - Neu zu installierende Dogus müssen explizit die Erstellung eines Serviceaccounts im CAS über die dogu.json anfordern. Weitere Informationen hierfür finden Sie in der [Entwicklerdokumentation](https://github.com/cloudogu/dogu-development-docs/blob/main/docs/important/relevant_functionalities_de.md#authentifizierung) diff --git a/docs/gui/release_notes_en.md b/docs/gui/release_notes_en.md index ab0fa9f3..42a95172 100644 --- a/docs/gui/release_notes_en.md +++ b/docs/gui/release_notes_en.md @@ -4,9 +4,17 @@ Below you will find the release notes for CAS-Dogu. Technical details on a release can be found in the corresponding [Changelog](https://docs.cloudogu.com/de/docs/dogus/cas/CHANGELOG/). -## [Unreleased] +## Release 7.0.8-7 +- Fixed a technical bug where the upgrade process was interrupted +- Fixed a technical bug where the cockpit dogu could not be called under certain conditions + +## Release 7.0.8-6 +- Invalid login data are no longer logged + +## Release 7.0.8-5 - The Dogu has been internally converted to a JSON registry, which has changed the logic for creating and deleting service accounts. - Consistent use of service accounts in both multinode and singlenode environments. +- Fixed the bug that cancels an upgrade if no service accounts are available. ### Breaking Change - Newly installed dogus must explicitly request the creation of a service account in the CAS via dogu.json. Further information on this can be found in the [developer documentation](https://github.com/cloudogu/dogu-development-docs/blob/main/docs/important/relevant_functionalities_en.md#authentifizierung) diff --git a/dogu.json b/dogu.json index 6a587e8f..61ebe7fe 100644 --- a/dogu.json +++ b/dogu.json @@ -1,6 +1,6 @@ { "Name": "official/cas", - "Version": "7.0.8-6", + "Version": "7.0.8-7", "DisplayName": "Central Authentication Service", "Description": "The Central Authentication Service (CAS) is a single sign-on protocol for the web.", "Url": "https://apereo.github.io/cas", diff --git a/package.json b/package.json index fbc4dacb..bde0aa84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ces-style-generator", - "version": "7.0.8-6", + "version": "7.0.8-7", "description": "Npm project to use ces-theme to generate styling", "main": "index.js", "directories": { diff --git a/resources/post-upgrade.sh b/resources/post-upgrade.sh index b0d38c2b..a178506e 100755 --- a/resources/post-upgrade.sh +++ b/resources/post-upgrade.sh @@ -166,7 +166,14 @@ migrateServicesFromETCD() { declare -A secrets declare -A logout_uris - keys=$(doguctl ls service_accounts) + keys=$(doguctl ls service_accounts) || exit_code=$? + exit_code=${exit_code:-0} + + if [[ $exit_code -ne 0 ]]; then + echo "did not find any service_accounts, skipping service migration..." + doguctl config "service_accounts/migrated" "true" + return 0 + fi # Loop through keys representing service values for key in $keys; do