-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Json service registry #232
base: develop
Are you sure you want to change the base?
Conversation
- Add method find_next_serviceID - Add method escape_dots - Add const SERVICE_REGISTRY for service path
Set properties in config templates which are used within the cas specific templates that you can find etc/cas/services/templates.
The attributes defined in allowedAttributes are statically set without the option to configure them. The attributes defined are now set in the DefaultAttributeReleasePolicy.json
# Conflicts: # CHANGELOG.md # app/src/main/java/de/triology/cas/oidc/services/CesOAuthServiceFactory.java # app/src/main/java/de/triology/cas/services/CesServiceManagerConfiguration.java # app/src/main/java/de/triology/cas/services/CesServicesManagerStage.java # app/src/main/java/de/triology/cas/services/CesServicesSpringConfiguration.java # app/src/main/java/de/triology/cas/services/RegistryEtcd.java # app/src/main/java/de/triology/cas/services/attributes/ReturnMappedAttributesPolicy.java # app/src/test/java/de/triology/cas/services/CesServicesManagerStageDevelopmentTest.java # app/src/test/java/de/triology/cas/services/CesServicesManagerStageProductiveTest.java # app/src/test/java/de/triology/cas/services/CesServicesManagerTest.java # app/src/test/java/de/triology/cas/services/attributes/ReturnMappedAttributesPolicyTest.java # docs/gui/release_notes_de.md # docs/gui/release_notes_en.md # resources/etc/cas/config/cas.properties.tpl
… BatsTests and add a check
# Now replace the random secret in the generated JSON with your extracted secret | ||
if [ -n "$secret" ]; then | ||
# Assume the created file name format is <app>-<id>.json | ||
json_output_file=$(ls -1 "$SERVICE_REGISTRY_PRODUCTION"/${app}-*.json | head -n 1) # Get the most recently created file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could get the the Service_ID as output from the create-sa.sh
-call a few lines above.
This we do not need to "guess" the newest file
fi | ||
fi | ||
|
||
echo "Service configuration for $app created." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we delete the migrated Service form the Dogu-Config?
This way, we could remove the service_accounts/migrated
-config, because when there are no services to migrate it will do nothing
if [ -n "${LOGOUT_URI+x}" ]; then | ||
echo "Removing service_accounts/${TYPE}/${SERVICE}/logout_uri key..." | ||
doguctl config --rm "service_accounts/${TYPE}/${SERVICE}/logout_uri" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be removed?
FQDN=$(doguctl config -g fqdn) | ||
# escape fqdn to use it within regex | ||
EFQDN=$(escapeDots "$FQDN") | ||
SERVICE_ID=$(findNextServiceID "$SERVICE_REGISTRY_PRODUCTION") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to find a "next" ServiceID?
Can there be more than one JSON-File per service?
- Einheitliche Verwendung von Service-Accounts sowohl in einer Multinode- als auch Singlenode-Umgebung. | ||
|
||
### 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about already installed dogus, that do not use CAS-ServiceAccounts?
If I undersrand it correctly, there is currenlty no migration to create service-json.files
Legacy cas service have not been migrated when explicit cas service accounts has been introduces, as they have been accepted as breaking change in multinode. cas service are now migrated to etcd under the key /config/cas/service_accounts/cas/<app>/created
doguctl config remove in while-loop leads to exiting the loop to early ignore exit-code of wget while checking if a dogu is installed Co-authored-by: Nico Franzeck <[email protected]>
Resolve #221
Resolve #228