Skip to main content

Users

XO 5 · XO 6
This page describes user management in the XO 5 interface. XO 6 currently lists users (with their groups and tokens); creating and editing them still happens here. See what lives where.

Xen Orchestra involves three distinct notions of "user account". Make sure you are looking at the right one:

  • XOA system accounts: the Linux accounts (xoa, root) of the appliance itself, used for SSH and console access. See First login.
  • XO application users: the accounts inside the Xen Orchestra web application. This is what this page is about.
  • XO 6 / REST API roles: XO 6 introduces a new RBAC model (ACL v2) with roles and fine-grained privileges. See the ACL v2 page.

There are 2 types of XO users:

  • admins, with all rights on all connected resources
  • users, with no rights by default
note

Local user accounts should be avoided in production environments. LDAP authentication is strongly recommended for centralized credential management.

Authentication

Xen Orchestra supports various types of user authentication, internal or even external thanks to the usage of the Passport library.

tip

Any account created by an external authentication process (LDAP, SSO...) will be a user without any permission. Also, you don't have to create an external user by yourself: it will be created automatically in Xen Orchestra after its first connection.

Built-in

This is the default method. Creating a user is very simple:

  1. Go into the Settings view, select "Users"
  2. You can create a user or an admin, with their password (or generate one)
zoomed detailThe Users settings view, with the creation form on top and the list of existing accounts below
The Users settings view, with the creation form on top and the list of existing accounts below

By default, a user won't have any permissions. At the opposite, an admin will have all rights.

OTP Authentication (2FA)

Xen Orchestra supports Time-based One-Time Password (TOTP) to provide an additional layer of security for your user account. When enabled, you will be required to provide a temporary code from an authentication app in addition to your standard credentials during login.

Enabling TOTP

To activate two-factor authentication on your account:

  1. Go to your profile settings.

  2. At the top of the screen, go to the OTP authentication field and toggle the switch to the On position.

    zoomed detailThe user profile page, with the OTP authentication toggle at the top
    The user profile page, with the OTP authentication toggle at the top
  3. A window will appear displaying a QR code:

    zoomed detailThe QR code modal shown when enabling TOTP on a user account
    The QR code modal shown when enabling TOTP on a user account
  4. Open your preferred authentication app on your mobile device and scan the QR code.

  5. The app will generate a temporary 6-digit code.

  6. Enter this code into the OTP code field in the Xen Orchestra window.

  7. Click OK to validate and finalize the activation.

note

Once activated, any future login attempts will prompt you for a new code generated by your application.

Disabling TOTP

To disable this feature, return to your profile settings and toggle the OTP authentication switch to Off. You will be asked to provide a final OTP code to confirm the deactivation.

LDAP

XO currently supports connections to LDAP directories, like Open LDAP or Active Directory, through the auth-ldap plugin.

  1. Access the plugin:
    1. Navigate to the Settings → Plugins screen.
    2. Locate the auth-ldap plugin by scrolling or using the search bar.
  2. Configure LDAP settings:
    1. Click the + button for the LDAP plugin.
      A list of settings appears:

      zoomed detailThe auth-ldap plugin settings: URI, certificates, base, credentials, user filter and ID attribute
      The auth-ldap plugin settings: URI, certificates, base, credentials, user filter and ID attribute
    2. Fill in the required fields based on your LDAP server details: the URI of the server, the Base where users are looked for, the User filter and the ID attribute (which must be unique and stable, e.g. dn). Optional fields cover failover URIs, certificate authorities and certificate checking, StartTLS and the credentials used to search the directory.

  3. Save and activate:
    1. Click Save configuration.
    2. To check if the plugin is activated, activate the toggle switch next to the auth-ldap plugin name.
      The switch should now appear green.

Common LDAP Filters

LDAP Filters allow you to properly match your user. Finding the right filter is no easy task, and it entirely depends on your LDAP configuration.

Still, here is a list of common filters:

  • '(uid={{name}})' is usually the default filter for Open LDAP.
  • '(cn={{name}})', '(sAMAccountName={{name}})', '(sAMAccountName={{name}}@<domain>)' or even '(userPrincipalName={{name}})' are widely used for Active Directory.
    Please check with your AD Admin to find the right one.

Once configured, users can authenticate using their LDAP credentials. Upon a successful initial login, the user's account will appear in the XO user list.

Group Synchronization

The LDAP plugin allows for the synchronization of user groups.

  1. Access group synchronization settings

    To configure the synchronization:

    1. Go to the Synchronize groups section.
    2. Check the box called Fill information (optional).
      A list of text fields appear.
    3. Fill out the fields according to the picture below:
    zoomed detailThe Synchronize groups section of the auth-ldap plugin, with base, filter, ID and display name attributes
    The Synchronize groups section of the auth-ldap plugin, with base, filter, ID and display name attributes
  2. Basic group settings:

    • Base and Filter: Similar to the user configuration. The plugin needs an entry point in the directory and a filter to find the groups.
    • ID attribute: The attribute used by the plugin to uniquely identify each group. The ID attribute must be unique across groups and not change over time.
      On each synchronization, the plugin will compare LDAP groups with XO groups, then try to match them based on this attribute and create or update XO groups if necessary.
    • Display name attribute: Set the attribute used as the group's name in Xen Orchestra.
  3. Members mapping:

This part of the configuration is used to determine which LDAP users belong to which LDAP groups.

For example, here's an LDAP directory:

User:

objectClass: Person
cn: Bruce Wayne
uid: 347
...

Group:

objectClass: Group
cn: heroes
displayName: Heroes
gid: 456
member: 347
member: 348
...

The plugin needs to know that Bruce Wayne is part of the heroes group. To do so, you need to set 2 entries in the configuration:

  • Group attribute: the name of the group attribute that is used to list users within a group. In this example, it would be member.
  • User attribute: the name of the user attribute that is used to reference users in groups. In this example, it would be uid since 347, 348, etc. are user uids.

Save the configuration and you're good to go. From now on, every time an LDAP user logs into XO, the plugin will automatically create or update that user's groups and add them to those groups.

Importing all groups manually

If you need to import all the groups at once, you can do so from Settings → Groups → Synchronize LDAP Groups.
This can be useful if you want to assign ACLs on groups without having to wait for a member of the group to log in.

tip

Importing the groups won't import their members. Users will still be imported one by one when they log in for the first time.

tip

To find the LDAP users, enter this filter in the users table: authProviders:ldap?.

Troubleshooting

If users can authenticate but group memberships are not reflected:

  1. Verify Your Group Filter

    Check if your LDAP group filter is too restrictive. By default, the filter should match all relevant groups.

    Example of a broad filter:

    (objectclass=posixGroup)

    If you are using a more specific filter, ensure that it correctly matches your intended groups. For instance, if you only sync a specific group, it may look like this:

    (&(objectclass=posixGroup)(cn=group1))

    This filter will only synchronize group1. To sync all groups, remove the (cn=group1) condition.

  2. Verify that the Group Attribute and User Attribute in the plugin configuration match the corresponding attributes in your LDAP directory.

  3. Ensure that the ID Attribute for both users and groups is unique and correctly specified.

  4. Check XO logs for any synchronization errors and adjust configurations accordingly.

OpenID Connect

Overview

The OpenID Connect (OIDC) plugin (auth-oidc) allows Xen Orchestra to integrate with identity providers that support the OIDC protocol.

In this section, you'll learn:

  • how users can log in with OpenID Connect
  • how administrators can configure the plugin to suit their needs

Prerequisites

  • Make sure your identity provider supports OpenID Connect.

User Workflow

Log In with OpenID Connect

On the Xen Orchestra login page, click Sign in with OpenID Connect

zoomed detailThe XO login page with the Sign in with OpenID Connect button
The XO login page with the Sign in with OpenID Connect button

You'll be redirected to the login page of your internal portal. Once authenticated on it, you will be redirected to the Xen Orchestra home page.

Administrator Guide

Set Up the OpenID Connect Plugin

You can set up the auth-oidc plugin directly in Xen Orchestra:

  1. Go to SettingsPlugins.
  2. Find the auth-oidc plugin in the list.
  3. Click + next to the plugin name to expand the configuration options.
zoomed detailThe auth-oidc plugin configuration: auto-discovery URL, client identifier and client secret
The auth-oidc plugin configuration: auto-discovery URL, client identifier and client secret
Required Configuration

Fill in the mandatory fields: the Client identifier (key) and Client secret from your identity provider. You also need to tell the plugin where to find your provider's endpoints, either way:

  • Auto-discovery URL: the OIDC discovery URL provided by your identity provider (the simplest option), or
  • the Advanced section, by filling the Authorization URL, Issuer, Token URL and User info URL manually.
Advanced Configuration (Optional)

To access advanced options:

  1. Check Fill information (optional) to reveal additional fields.
  2. Complete the fields as needed:
    • Callback URL: the redirect URI for OIDC responses (defaults to /signin/oidc/callback).
    • Username field: the field to use as the XO username, e.g. displayName, username or email (defaults to username).
    • Scopes: the scopes from which to request profile information, separated by whitespace (defaults to profile; the openid scope is implicitly included).
Save and Activate the Plugin
  1. Once everything is configured, click Save configuration.
  2. Toggle the switch next to the auth-oidc plugin name to enable it. This will:
    • Activate the plugin immediately.
    • Ensure it loads automatically when the Xen Orchestra server restarts.
Enabling Passkeys in XOA with Keycloak
Generating certificates

To support passkeys in XOA, the Keycloak server must expose its OIDC endpoints over HTTPS. The TLS certificates used by Keycloak must satisfy the following conditions:

  • Common Name (CN): The CN of the certificate has to match the DNS name that clients will use to reach Keycloak.
  • SubjectAltName (SAN): The certificate must contain a SAN entry with the same DNS name.
  • Certificate chain: The certificate must be issued by a trusted CA. The auth-oidc plugin does not accept self-signed certificates that lack a proper chain of trust.
info

The TLS certificate must match the domain that will be used as the Relying Party ID (RP ID). The RP ID cannot be an IP address; it must be the DNS name that appears in the certificate's CN or SAN.

Here is a certificate that meets these requirements:

Version: 3 (0x02)
Serial number: 7096756171258138755 (0x627cbe2335671083)
Algorithm ID: SHA256withRSA
Issuer
CN = poc
Subject
CN = keycloak.poc.local
Fingerprints
...
extKeyUsage :
serverAuth
subjectAltName :
dns: keycloak.poc.local

With this configuration, Keycloak can participate in passkey authentication flows that XOA expects, and the auth-oidc plugin will correctly validate the TLS connection.

Trust the Keycloak cert in XOA
  1. Place the CA certificate used to sign Keycloak's cert on the xo-server host (e.g., /etc/ssl/poc.crt).
  2. Edit the xo-server systemd service at /etc/systemd/system/xo-server.service to add the environment variable NODE_EXTRA_CA_CERTS:
xoa: xo-server unit with the extra CA certificate
# cat /etc/systemd/system/xo-server.service
# systemd service for XO-Server.
# [Unit]
# Description= XO Server
# After=network-online.target
# [Service]
# ExecStart=/usr/local/bin/xo-server
# Restart=always
# SyslogIdentifier=xo-server
# TimeoutStopSec=4s
# Environment="NODE_EXTRA_CA_CERTS=/etc/ssl/poc.crt"
# [Install]
# WantedBy=multi-user.target
Configuring Keycloak
  1. Select your realm.
  • Open Admin console → Manage realms and choose the realm you use with XOA.
  1. Enable required actions.
  • Go to Authentication → Required Actions.
  • Check Webauthn Register and Webauthn Register Passwordless.
  1. Choose the WebAuthn authenticator.
  • In Authentication → Flows, edit the login flow you use (e.g., browser).
  • Add WebAuthn Authenticator as an Alternative (or replace the current authenticator with it).
zoomed detailThe Keycloak browser flow details, with the WebAuthn Authenticator step added as an alternative
The Keycloak browser flow details, with the WebAuthn Authenticator step added as an alternative
  1. Disable OTP if not needed
  • If you want only Password + Yubikey for MFA, delete or disable the OTP Form from the flow.

These settings allow users to register and log in with FIDO2 (passkeys) while keeping a password + Yubikey MFA option.

Sample
  1. Initiate the OIDC authentication request from the XOA client to Keycloak.

    zoomed detailXOA redirecting the OIDC authentication request to Keycloak
    XOA redirecting the OIDC authentication request to Keycloak
  2. The user supplies their username and password at the Keycloak login screen.

    zoomed detailThe Keycloak login screen asking for username and password
    The Keycloak login screen asking for username and password
  3. After credential validation, Keycloak presents a second-factor challenge (User Verification or User Presence) that requires the user to press their Yubikey to complete the authentication.

    zoomed detailThe Keycloak second-factor challenge waiting for the security key
    The Keycloak second-factor challenge waiting for the security key

SAML

The auth-saml plugin allows SAML users to authenticate to Xen Orchestra.

The first time a user signs in, XO will create a new XO user with the same identifier.

Configuration

warning

When registering your Xen Orchestra instance to your identity provider, you must configure its callback URL to https://<xo.company.net>/signin/saml/callback!

In the "Settings" then "Plugins" view, expand the SAML plugin configuration. Then provide the needed fields:

zoomed detailThe auth-saml plugin configuration: certificate, entry point, issuer and username field
The auth-saml plugin configuration: certificate, entry point, issuer and username field
  • Certificate: copy/paste the identity provider's certificate.
  • Entry point: entry point of the identity provider.
  • Issuer: issuer string to supply to the identity provider.
  • Username field: field to use as the XO username. Try http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress if you are using Microsoft Entra ID (Azure Active Directory).

Optional settings let you disable the requested authentication context (known to help with Active Directory), force re-authentication, and require signed assertions or signed responses.

Save the configuration and then activate the plugin (button on top).

warning

Since XO 5.111.1, you need to configure signature for Document and Assertion in your SAML Identity Provider: either the response or the assertion must be signed.

  • Keycloak: In Client Settings, Signature and Encryption, check "Sign Documents" and "Sign Assertion".
  • Azure: In SAML Signing Certificate options, select Sign SAML response and assertion.
  • Google Workspace: In the Service Provider details, check the Signed response box.

Vendor specific

Google Workspace

Google documents its SAML setup on support.google.com. Use the screenshots below as a reference as how to set up SAML with Google Workspace.

  1. Sign in to your Google Workspace Admin Dashboard.
  2. Go to Apps/Web and mobile apps
  3. Click Add app and select Add custom SAML app.
  4. Give your app a name and optionally a description.
  5. To see how the fields should be filled out, refer to the screenshots below.
note

Right now even when the authorization is successful, you will be redirected to the https://xo.company.net/signin page. However, just browse directly into the bare URL https://xo.company.net, and you'll now be logged in and can use the XO dashboard.

tip

If you get a certificate error, try to add a newline at the bottom of the Certificate field in Xen Orchestra.

The first login will create the user inside XO, as a non-privileged user. An administrator then has to promote the user to the appropriate group. (XO: Settings/Users).

zoomed detailThe Google Workspace custom SAML app details, side by side with the matching XO plugin fields
The Google Workspace custom SAML app details, side by side with the matching XO plugin fields

Also make sure to adjust the SAML attribute mapping in the Google Workspace configuration. (Primary email -> email)

zoomed detailThe Google Workspace SAML attribute mapping, with Primary email mapped to email
The Google Workspace SAML attribute mapping, with Primary email mapped to email

GitHub

The auth-github plugin allows any GitHub user to authenticate to Xen Orchestra.

The first time a user signs in, XO will create a new XO user with the same identifier (i.e. GitHub name), with user permissions. An existing admin will need to apply the appropriate permissions for your environment.

First you need to configure a new app in your GitHub account. Go to your GitHub settings > "Developer Settings" > "OAuth Apps" > "New OAuth App".

  1. Name your GitHub application under "Application Name".
  2. Enter your Xen Orchestra URL (or IP) under "Homepage URL"
  3. Add your "Authorization callback URL" (for example, https://homepageUrl/signin/github/callback)
zoomed detailThe GitHub OAuth App registration form, with the XO homepage and callback URLs filled in
The GitHub OAuth App registration form, with the XO homepage and callback URLs filled in

When you get your Client ID and your Client secret, you can configure them in the GitHub plugin inside the "Settings/Plugins" view of Xen Orchestra. They are the only two fields to fill in.

zoomed detailThe auth-github plugin configuration, with the Client ID and Client secret fields
The auth-github plugin configuration, with the Client ID and Client secret fields

Be sure to activate the plugin after you save the configuration (button on top). When it's done, you'll see a link in the login view, this is where you'll go to authenticate:

zoomed detailThe XO login page with the GitHub sign in link below the credentials form
The XO login page with the GitHub sign in link below the credentials form

Google

The auth-google plugin allows Google users to authenticate to Xen Orchestra.

The first time a user signs in, XO will create a new XO user with the same identifier, without any permissions.

Creating the Google project

Go to Google's Credentials page and create a new project:

zoomed detailCreating a new project in the Google developer console
Creating a new project in the Google developer console

Configure an OAuth consent screen if requested then create OAuth 2.0 credentials:

zoomed detailThe Create credentials menu, with OAuth client ID selected
The Create credentials menu, with OAuth client ID selected
zoomed detailThe OAuth client creation form, with the authorized redirect URI pointing to the XO callback
The OAuth client creation form, with the authorized redirect URI pointing to the XO callback

Get your client ID and client secret:

zoomed detailThe modal displaying the generated OAuth client ID and client secret
The modal displaying the generated OAuth client ID and client secret

Configure the XO plugin

In Settings, then Plugins, expand the Google plugin details and configure it with the information from the Google Console:

zoomed detailThe auth-google plugin configuration: callback URL, client ID and client secret
The auth-google plugin configuration: callback URL, client ID and client secret
  • Callback URL: must be exactly the same as specified on the Google developer console.
  • Client ID and Client secret: the credentials generated above.
warning

The optional scope setting selects which profile information is used to build the XO username (Google+ name or simple email address). Changing this value after users started logging in will break existing users.

Be sure to activate the plugin after you save the configuration (button on top).

You can now connect with your Google account in the login page.

ACLs

Definition

ACLs are permissions that apply to preexisting objects, like users and groups.

note

This section describes ACL v1, used by the XO 5 interface. The REST API and XO 6 use a new RBAC model: see ACL v2.

Who can manage ACLs?

Only a super admin (XO administrator) can manage ACLs.

How can I view and edit ACLs?

The ACLs view can be accessed in the Settings panel.

  1. Select the user or group you want to apply permissions on
  2. Select the object on which the permission will apply
  3. Choose the role for this ACL
  4. Click the Create button.
zoomed detailThe ACL creation form: subject, object and role selectors followed by the Create button
The ACL creation form: subject, object and role selectors followed by the Create button
tip

You can click to add multiple objects at the same time!

Your ACL is now available in the right list:

zoomed detailThe list of existing ACLs, each row showing the user, the object and the assigned role
The list of existing ACLs, each row showing the user, the object and the assigned role

You can edit or remove existing ACLs here.

Roles

There are 3 different roles for your users:

  • Admin
  • Operator
  • Viewer

Admin

An object admin can do everything on it, even destroy it. E.g with its admin VM:

  • remove it
  • migrate it (to a host with admin permission on it)
  • modify the VM resources, name and description
  • clone it
  • copy it
  • convert it into a template
  • snapshot it (even revert from a snapshot)
  • export it
  • attach/add visible disks
  • same for network cards

Operator

An operator can make everyday operations on assigned objects. For example, on a VM:

  • eject a CD
  • insert a CD (if he can view the ISO storage repository)
  • start, restart, shutdown, suspend/resume it

All other operations are forbidden.

Viewer

A viewer can only see the VM state and its metrics. That's all!

Inheritance

Objects have a hierarchy: a Pool contains all its hosts, containing itself all its VMs.

If you give a view permission to a user (or a group) on a pool, he will automatically see all the objects inside this pool (SRs, hosts, VMs).

Examples

Allow a user to install an OS

If the OS install needs an ISO, you need to give this user 2 permissions:

  • Operate on the VM (e.g to start it)
  • View on the ISO Storage containing the needed ISO.

Self-service portal

The self-service feature allows users to create new VMs. This is different from delegating existing resources (VMs) to them, and it leads to a lot of possibilities.

Set of resources

To create a new set of resources to delegate, go to the "Self Service" section in the main menu:

zoomed detailThe Self Service entry in the XO main menu
The Self Service entry in the XO main menu

Create a set

tip

Only an admin can create a set of resources

To allow people to create VMs as they want, we need to give them a part of your XCP-ng/XenServer resources (disk space, CPUs, RAM). You can call this "general quotas" if you like. But you first need to decide which resources will be used.

In this example below, we'll create a set called "sandbox" with:

  • "devs" is the group that can use this set (all users in the group)
  • "Lab Pool" is the pool where they can play
  • "Debian 8 Cloud Ready" is the only template they can use
  • "SSD NFS" is the only SR where they can create VMs
  • "Pool-wide network with eth0" is the only available network for them
zoomed detailThe resource set creation form: name, subjects, pools, templates, SRs, networks and limits, with the eligible hosts below
The resource set creation form: name, subjects, pools, templates, SRs, networks and limits, with the eligible hosts below

As you can see, only compatible hosts are shown and can be used for this resource set (hosts in another pool aren't shown). This way, you can be sure to have resources free for tasks other than self-service.

tip

Don't forget to add an ISO SR to allow your users to install VMs with CD if necessary

Quotas

Then, you can define quotas on this set:

  • max vCPUs
  • max RAM
  • max disk usage
tip

Replicated VMs and snapshots created by a backup job don't use quotas.

tip

A snapshot of a Self Service VM will use as much resources as a VM would. You can disable this by setting ignoreVmSnapshotResources to true in the selfService section of xo-server's config.

When you click on create, you can see the resource set and remove or edit it:

zoomed detailThe saved resource set recap, with its quota gauges for CPUs, RAM and disk usage
The saved resource set recap, with its quota gauges for CPUs, RAM and disk usage

Usage (user side)

As soon as a user is granted a resource set, it displays a new button in their main view: "new".

zoomed detailThe New button displayed in the user's main menu
The New button displayed in the user's main menu

Now, the user can create a VM with only the resources granted in the set:

https://your-xo/v5/#/vms/new
The VM creation page restricted to the sandbox resource set: only the delegated template, SR and network are selectable
The VM creation page restricted to the sandbox resource set: only the delegated template, SR and network are selectable

And the recap before creation:

zoomed detailThe summary gauges showing how much of the set's quota the new VM will consume
The summary gauges showing how much of the set's quota the new VM will consume

If the "Create" button is disabled, it means the user requested more resources than available.

Finally, if a user has been granted access to multiple resource sets, they can be switched in the top right of the screen.

Toward the Cloud

Self-service is a major step in the Cloud. Combine it with our Cloudinit compatible VM creation for a full experience:

  • create a Cloud ready template
  • create a set and put Cloud templates inside
  • delegate this set to a group of users

Now, your authorized users can create VMs with their SSH keys, grow template disks if needed, etc. Everything is inside a "sandbox" (the resource set) you defined earlier!

Audit log

XO Audit Log is a plugin that records all important actions performed by users and provides the administrators an overview of each action. This gives them an idea of the users behavior regarding their infrastructure in order to track suspicious activities.

How does it work?

XO Audit Log listens to important actions performed by users and stores them in the XOA database using the hash chain structure.

Trustability of the records

Stored records are secured by:

  • structure: records are chained using the hash chain structure which means that each record is linked to its parent in a cryptographically secure way. This structure prevents the alteration of old records.

  • hash upload: the hash chain structure has limits, it does not protect from the rewrite of recent/all records. To reduce this risk, the Audit log plugin regularly uploads the last record hash to our database after checking the integrity of the whole record chain. This functionality keeps the records safe by notifying users in case of alteration of the records.

Configuration

The recording of the users' actions is disabled by default. To enable it:

  1. go into settings/plugins
  2. expand the audit configuration
  3. toggle active and save the configuration
zoomed detailThe audit plugin configuration, with the active toggle enabled
The audit plugin configuration, with the active toggle enabled

Now, the audit plugin will record users' actions and upload the last record in the chain every day at 06:00 AM (UTC).

Debugging

If you can't log in, please check the logs of xo-server.