Roman PerekhodandClaude Opus 5.5 4680d9d905 fix(proxy): [OCISDEV-1464] fix the role assignment of multi-instance guests (#13250)
* fix(proxy): [OCISDEV-1464] fail on an unknown multi-instance guest role

The OIDC role assigner did not check that OCIS_MULTI_INSTANCE_GUEST_ROLE
exists. When the guest role name is wrong, the role name has no role id.
The proxy then sent AssignRoleToUser with an empty RoleId on each request.

The role assigner now returns an "unknown role" error and does not change
the role assignment. A test covers a guest that no guest role mapping
matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(proxy): [OCISDEV-1464] check the guest role mapping more strictly

GuestRoleMapping now trims the spaces around the claim value and the
role name. The env var parser trims list elements, but the yaml parser
does not. Before this change, the yaml entry "spaceadmin: user-light-vault"
gave the role name " user-light-vault", and each matching guest login
failed with "unknown role".

GuestRoleMapping now also rejects a mapping when
OCIS_MULTI_INSTANCE_GUEST_ROLE is empty. The role assigner applies the
mapping only to users that get the guest role. Without a guest role, the
proxy ignored the mapping and gave guests a member role.

gofmt also fixes the indent of a TODO comment in the same file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(proxy): [OCISDEV-1464] log why the guest role mapping does not apply

mapGuestRole dropped the extractRoles error without a log line. When
PROXY_ROLE_ASSIGNMENT_OIDC_CLAIM had a wrong claim name, each guest kept
the guest role, and the admin could not find the cause.

mapGuestRole now writes a debug log line with the claim name and the
error. A guest without a roles claim is valid, and the role assigner runs
on each request, so the log level is debug and not warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(proxy): [OCISDEV-1464] tell that guest claim values are regexes

The guest role mapping uses the same claim matcher as the role mapping.
A claim value is an exact string or a regular expression that must match
the full claim value. The description of
OCIS_MULTI_INSTANCE_GUEST_ROLE_MAPPING did not tell this. An admin who
writes 'school.admin' also matches the claim 'schoolXadmin', and that
guest can get a role with more permissions.

The description now tells that claim values are regexes. It also tells
the admin to escape regex metacharacters in an exact string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(proxy): [OCISDEV-1464] read the roles again for an unknown guest role

The OIDC role assigner checks the guest role and the mapped guest role
against a role cache with a 5 minute TTL. A role that an admin created
after the last cache read was unknown. For up to 5 minutes, each request
of a matching guest failed with "unknown role" and HTTP 500.

The new function guestRoleName reads the roles again one time when the
role is unknown. It reads the roles again only when the cache is older
than 30 seconds. Thus a role that does not exist causes a maximum of one
ListRoles request in 30 seconds, and not one request for each guest
request. The check for an unknown guest role moves into guestRoleName.

roleNamesToRoleIDs now has a maxAge parameter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: [OCISDEV-1464] add the changelog for the guest role mapping fixes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 09:44:32 +01:00
2023-05-25 17:41:43 +02:00
2021-02-16 09:49:31 +00:00
2022-04-20 09:19:34 +02:00
2020-09-23 15:54:33 +02:00
2024-10-28 15:31:55 +01:00
2020-09-23 15:54:33 +02:00
2024-12-30 09:18:45 +05:45

ownCloud Infinite Scale

Matrix Build Status Security Rating Coverage Acceptance Test Coverage Go Report Go Doc oCIS docker image License

Introduction

ownCloud Infinite Scale (oCIS) is the new file sync & share platform that will be the foundation of your data management platform.

Make sure to download the latest released version today!

Quickstart

For details of the commands used see the Minimalistic Evaluation Guide for oCIS with Docker.

mkdir -p $HOME/ocis/ocis-config \
mkdir -p $HOME/ocis/ocis-data
sudo chown -Rfv 1000:1000 $HOME/ocis/
docker pull owncloud/ocis
docker run --rm -it \
    --mount type=bind,source=$HOME/ocis/ocis-config,target=/etc/ocis \
    --mount type=bind,source=$HOME/ocis/ocis-data,target=/var/lib/ocis \
    owncloud/ocis init --insecure yes
docker run \
    --name ocis_runtime \
    --rm \
    -it \
    -p 9200:9200 \
    --mount type=bind,source=$HOME/ocis/ocis-config,target=/etc/ocis \
    --mount type=bind,source=$HOME/ocis/ocis-data,target=/var/lib/ocis \
    -e OCIS_INSECURE=true \
    -e PROXY_HTTP_ADDR=0.0.0.0:9200 \
    -e OCIS_URL=https://localhost:9200 \
    owncloud/ocis

Use as URL localhost:9200 and the user/password printed.

Overview

Clients

Infinite Scale allows the following ownCloud clients:

to synchronize and share file spaces with a scalable server backend based on reva using open and well-defined APIs like WebDAV and CS3.

The Web client used to live in the separate owncloud/web repository; it is now developed in-tree here under web/ as part of a single-repo product (backend + web frontend). owncloud/web is archived and kept only as the historical record up to its final release; file web-related issues and contributions in this repository instead.

Web Office Applications

Infinite Scale can integrate web office applications such as:

Collaborative editing is supported by the WOPI application gateway.

Authentication

Users are authenticated via OpenID Connect using either an external IdP like Keycloak or the embedded LibreGraph Connect identity provider.

Installation

With focus on easy install and operation, Infinite Scale is delivered as a single binary or container that allows scaling from a Raspberry Pi to a Kubernetes cluster by changing the configuration and starting multiple services as needed. The multiservice architecture allows tailoring the functionality to your needs and reusing services that may already be in place like when using Keycloak. See the details below for various installation options.

Important Readings

Before starting to set up an instance, we highly recommend reading the Prerequisites, the Deployment section and especially the General Information page describing and explaining information that is valid for all deployment types.

Run ownCloud Infinite Scale

Use the Official Documentation

See the Install Infinite Scale on a Server for a production ready deployment starting with a Raspberry Pi, a single server or VM.

Use the ocis Repo as Source

Use this method to build and run an instance with the latest code. This is only recommended for development purposes.

The minimum go version required is 1.25.10.
Note that you need a C compile environment installed as a prerequisite because some dependencies, like reva, have components that require C-Go libraries and toolchains. The command installing for debian based systems is: sudo apt install build-essential.

To build and run a local instance with demo users:

# get the source
git clone git@github.com:owncloud/ocis.git

# enter the ocis dir
cd ocis

# generate assets
make generate

# build the binary
make -C ocis build

# initialize a minimal oCIS configuration
./ocis/bin/ocis init

# run with demo users
IDM_CREATE_DEMO_USERS=true ./ocis/bin/ocis server

# Open your browser on http://localhost:9200 to access the bundled web-ui

All batteries included: no external database, no external IDP needed!

Documentation

Admin Documentation

Refer to the Admin Documentation - Introduction to Infinite Scale to get started with running oCIS in production.

Development Documentation

See the Development Documentation - Getting Started to get an overview of Requirements, the repository structure and other starting points.

Security

See the Security Aspects for a general overview of security related topics. If you find a security issue, please contact security@owncloud.com first.

Contributing

We are very happy that oCIS does not require a Contributor License Agreement (CLA) as it is Apache 2.0 licensed. We hope this will make it easier to contribute code. If you want to get in touch, most of the developers hang out in our matrix channel or reach out to the ownCloud central forum.

Infinite Scale is carefully internationalized so that everyone, no matter what language they speak, has a great experience. To achieve this, we rely on the help of volunteer translators. If you want to help, you can find the projects behind the following links: Transifex for ownCloud web and Transifex for ownCloud (Select the resource by filtering for ocis-).

Please always refer to our Contribution Guidelines.

End User License Agreement

Some builds of stable ownCloud Infinite Scale releases provided by ownCloud GmbH are subject to an End User License Agreement.

Copyright (c) 2020-2026 ownCloud GmbH <https://owncloud.com>
Languages
Go 32.7%
TypeScript 24.3%
Gherkin 23.9%
Vue 8.5%
PHP 8.1%
Other 2.3%