Zum Hauptinhalt springen
Version: rolling

Creating New Users in Keycloak for OpenCloud

This guide explains how to create new users in Keycloak for OpenCloud, including "User Light" without personal spaces. While OpenCloud currently does not have a built-in "invite external user" feature, this functionality can be replicated using Keycloak.

Background​

One of the most frequently requested features by administrators has been support for guest or external users. Previously, this was discussed as adding external users during the sharing process. These users were provisioned on the fly and received an invite link.

Although OpenCloud does not natively support this method, similar functionality can be achieved using Keycloak for user management.

Assign Admin Permissions in Keycloak​

To manage users and groups for OpenCloud, you need a user with administrative privileges in the Keycloak realm.

  • Log in to Keycloak as an admin.
  • Navigate to the OpenCloud realm
  • Assign the appropriate client roles (such as manage-users and view-users) from the realm-management client to grant the user the required administrative permissions.

Example: A user named dennis is granted user-management permissions in Keycloak.

Add admin roles to user

Once assigned, the user can log in as a Realm Administrator and access user and group management.

Add New User with standard rights (no Space)​

With admin permissions, you can now create users and groups:

  • Login in Keycloak OpenCloud Realm with the user who has admin rights under https://keycloak.YOUR.DOMAIN/admin/openCloud/console/#/openCloud

  • Navigate to the "Users" section in the Keycloak Admin Console

  • Click Add User

    Add user
  • Fill in the required user details (e.g., username, email)

    Fill out user information
  • Optionally assign the user to one or more groups.

  • Click on "Create"

  • Set an initial password

Set initial user password
hinweis

In the imported opencloud-compose Keycloak realm, opencloudGuest is included in the default realm roles. When OIDC role assignment is enabled and this role is mapped to OpenCloud's "User Light" role, new users do not receive a personal space by default.

To change the default roles assigned to new users, navigate to Realm settings → User registration in the Keycloak Admin Console and update the default role assignments.

First Login Experience for the "User Light"​

When a "User Light" logs in for the first time, prompts depend on the account and Keycloak realm settings:

  • Users assigned a temporary password must choose a new password.
  • Keycloak may request profile updates when required by realm settings.
  • Email verification is requested only when enabled or required in Keycloak.

After successful login, newly created users assigned the "User Light" role do not receive a personal space by default, fulfilling the guest user requirement.

Guest login

Optional: Enable Self Registration​

You can allow users to register themselves without manual creation.

To enable self-registration:

  • Log in to Keycloak as an admin.
  • Go to the Login settings in the OpenCloud realm.
  • Enable the User Registration option.
Enable self registration

Self Registration Flow​

  • Users see a Register option on the login screen.
Register Button
  • They complete the registration form.
Fill out the registration form

After logging in, the user has now the "User Light" Role with no personal Space.

Summary​

By leveraging Keycloak:

  • You can create and manage guest users for OpenCloud.
  • Guest users can log in without receiving a personal space.
  • You can streamline the process with self-registration.

This setup provides a flexible and scalable way to manage external and lightweight users in OpenCloud through Keycloak.