Michael Stingl d2d33e4d48 Harmonize Keycloak Client Configurations with Built-in IdP (#589)
* Harmonize Keycloak client configurations with built-in IdP

This change makes the Keycloak client configurations consistent with the built-in IdP:

1. Standardized client IDs to match built-in IdP:
   - web (unchanged)
   - OpenCloudDesktop (was random ID)
   - OpenCloudAndroid (was random ID)
   - OpenCloudIOS (was random ID)
   - Cyberduck (simplified ID)

2. Updated domain names to use .eu consistently:
   - Changed from opencloud.com to opencloud.eu for mobile apps
   - Changed from hardcoded domains to templated {{OC_URL}} values

3. Updated redirect URIs to match built-in IdP format:
   - Added specific callback paths for web client
   - Removed wildcarded ports for desktop client

4. Changed mobile/desktop clients to public clients (equivalent to native app type)

5. Enhanced docker-entrypoint-override.sh to handle {{OC_URL}} template variables

These changes ensure a consistent authentication experience regardless of
whether users are using the built-in IdP or Keycloak.

* Harmonize Keycloak client configuration with client JSONs

Update the realm configuration to match the client configuration JSON files:

1. Update client IDs to match client JSON files:
   - Changed 'xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69' to 'OpenCloudDesktop'
   - Changed 'e4rAsNUSIUs0lF4nbv9FmCeUkTlV9GdgTLDH1b5uie7syb90SzEVrbN7HIpmWJeD' to 'OpenCloudAndroid'
   - Changed 'mxd5OQDk6es5LzOzRvidJNfXLUZS2oN3oUFeXPP8LpPrhx3UroJFduGEYIBOxkY1' to 'OpenCloudIOS'

2. Fix additional client properties:
   - Fix client names: Use proper capitalization for all clients
   - Fix OAuth redirect URIs for Android and iOS to use .eu domain
   - Fix Desktop URIs by removing wildcard asterisks
   - Update post-logout redirect URIs to match client JSONs
   - Set publicClient flag to true for all mobile/desktop clients

These changes ensure that when the realm is imported during deployment,
the client configurations will match the client JSONs exactly.

* Update web client configuration in Keycloak realm

Harmonize the web client configuration in the realm:
- Add 'OpenCloud Web App' client name
- Change URLs to use {{OC_URL}} template variables
- Update redirect URIs to use specific paths instead of wildcard
- Set backchannel logout URL to use templated URL

This completes the harmonization of all client configurations in the realm.

* Revert template variable approach in Keycloak configuration

Reverted templating changes to match upstream conventions:

1. Removed template variable handling from docker-entrypoint-override.sh
   - Removed {{OC_URL}} replacement, keeping only domain replacement

This maintains compatibility with the upstream approach of using direct URLs
with domain substitution instead of template variables.

* Fix remaining old client ID references in role mappings

Updated the remaining references to old client IDs in the role mappings section:
- xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69 → OpenCloudDesktop
- e4rAsNUSIUs0lF4nbv9FmCeUkTlV9GdgTLDH1b5uie7syb90SzEVrbN7HIpmWJeD → OpenCloudAndroid
- mxd5OQDk6es5LzOzRvidJNfXLUZS2oN3oUFeXPP8LpPrhx3UroJFduGEYIBOxkY1 → OpenCloudIOS

This ensures all client ID references throughout the realm configuration are
consistent and use the simplified IDs.
2025-04-07 17:54:13 +02:00
2025-03-12 12:22:13 +05:45
2025-04-03 14:16:51 +02:00
2025-04-02 09:17:05 +02:00
2025-03-25 09:52:08 +01:00
2025-03-31 14:23:19 +02:00
2025-04-02 09:17:05 +02:00
2025-03-27 14:54:24 +01:00
2025-01-28 18:03:12 +01:00
2025-04-04 12:04:44 +02:00
2025-04-07 12:40:48 +05:45
2025-01-15 11:14:42 +01:00
2025-03-13 14:04:14 +01:00
2025-04-04 12:04:44 +02:00
2025-04-07 11:53:17 +05:45
2025-03-26 20:51:01 +01:00
2025-02-11 14:16:46 +01:00
2025-02-04 11:29:46 +01:00
2025-03-13 14:04:14 +01:00
2025-01-17 17:21:23 +01:00
2025-01-27 16:29:43 +01:00
2025-03-13 16:10:00 +01:00
2025-03-26 15:25:09 +01:00

OpenCloud logo

status-badge Matrix License

Server Backend

Tip

For general information about OpenCloud and how to install please visit OpenCloud on Github and OpenCloud GmbH.

This the main repository of the OpenCloud server. It contains the golang codebase for the backend services.

Getting Involved

The OpenCloud server is released under Apache 2.0. The project is very happy to receive contributions in all forms. Start hacking now 😃

Build OpenCloud

To build the backend, follow these instructions:

Generate the assets needed by e.g. the web UI and the builtin IDP

make generate

Then compile the opencloud binary

make -C opencloud build

That will produce the binary opencloud/bin/opencloud. It can be started as a local test instance right away with a two step command:

opencloud/bin/opencloud init && opencloud/bin/opencloud server

This creates a server configuration (by default in $HOME/.opencloud) and starts the server.

For more setup- and installation options consult the Development Documentation.

Contribute

We very much appreciate contributions from the community. Please refer to our Contribution Guidelines on how to get started.

Technology

Important information for contributors about the technology in use.

Authentication

The OpenCloud backend authenticates users via OpenID Connect using either an external IdP like Keycloak or the embedded LibreGraph Connect identity provider.

Database

The OpenCloud backend does not use a database. It stores all data in the filesystem. By default, the root directory of the backend is $HOME/.opencloud/.

Security

If you find a security related issue, please contact security@opencloud.eu immediately.

Description
This is the main repository of the OpenCloud server. It contains the golang codebase for the backend services.
Readme Apache-2.0 327 MiB
Languages
Go 48.4%
Gherkin 36.5%
PHP 12.4%
JavaScript 1.3%
Makefile 0.7%
Other 0.5%