For the complete documentation index, see llms.txt. This page is also available as Markdown.

S3 Configuration

Use onyxia.api.regions[].data.S3 to connect an Onyxia region to AWS S3 or an S3-compatible object store.

Onyxia Web uses this configuration to:

  • expose administrator-defined S3 profiles in the file explorer;

  • exchange the user's OIDC access token for temporary credentials through AssumeRoleWithWebIdentity;

  • expose public S3 data through an anonymous profile and generate links to public folders;

  • inject the selected profile and its credentials into services such as Jupyter and RStudio.

The browser talks directly to the S3 and STS endpoints. Onyxia API does not proxy these requests, create IAM roles, or install bucket policies. Configure the S3 provider, OIDC trust, roles, and policies separately, and allow requests from the Onyxia Web origin in the S3 provider's CORS configuration.

The installation guide demonstrates a basic MinIO deployment. This page documents the region configuration consumed by Onyxia Web.

Minimal MinIO Example

This example defines a single administrator-managed profile named default. The bookmark resolves to a bucket named after the user's preferred_username claim.

apps/onyxia/values.yaml
onyxia:
  api:
    regions:
      - {
          "id": "default",
          "data": {
            "S3": {
              "URL": "https://minio.lab.example.com",
              "sts": {
                "role": {
                  "profileName": "default",
                  "roleARN": "",
                  "roleSessionName": ""
                },
                "oidcConfiguration": {
                  "clientID": "onyxia-minio"
                }
              },
              "bookmarks": [
                {
                  "s3Uri": "s3://$1/",
                  "title": "Personal Bucket",
                  "claimName": "preferred_username",
                  "forProfileName": "default"
                }
              ]
            }
          }
        }

roleARN and roleSessionName must be present in the Onyxia configuration, but they can exceptionally be empty for MinIO. Onyxia omits empty values from the STS request. In MinIO's claim-based OIDC mode, when RoleArn is absent, MinIO determines the user's authorization from the configured policy claim in the JWT. MinIO's AssumeRoleWithWebIdentity endpoint also does not require a role session name.

To configure MinIO so that users automatically receive temporary credentials that gives them read/write access to a bucket that matches their username (the preferred_username claim in the ID and Access token) see this example.

This is MinIO-specific. Providers such as AWS STS require a valid role ARN and role session name.

For a user whose S3 OIDC ID token contains:

Onyxia exposes the following profile:

If the alice bucket does not exist, the file explorer can offer to create it. Whether creation succeeds depends on the permissions granted by MinIO.

See OIDC Configuration for Services Onyxia Connects To for the complete oidcConfiguration format. When this object is omitted or only partially specified, Onyxia reuses the corresponding values from its main OIDC configuration.

Multiple Profiles From Claims

data.S3 accepts either one S3 configuration object or an array of them. Within one S3 configuration, sts.role also accepts either one role or an array.

A role with a claimName can produce several profiles. If the claim is an array of strings, Onyxia resolves the role once for every accepted value.

The following example creates:

  • one personal profile named default;

  • one project-* profile per group, excluding groups whose names start with USER_ONYXIA;

  • a public bookmark attached to the personal and project profiles.

For this S3 OIDC ID token:

Onyxia resolves:

No profile is generated for USER_ONYXIA_admin because it matches excludedClaimPattern.

Anonymous Profiles and Public-Folder Sharing

Set anonymousProfileName to create an administrator-defined S3 profile that does not use STS or static credentials. Requests made through this profile are unsigned and can access only the buckets, prefixes, and objects that the S3 provider allows anonymous users to access.

An anonymous profile is also required to enable sharing links for public folders in the S3 explorer. For an authenticated profile, configure an anonymous profile with the same URL and region. The simplest approach is to add anonymousProfileName to the same S3 configuration:

This configuration creates two profiles for the same S3 endpoint:

  • default, which obtains temporary credentials through STS;

  • public, which sends no credentials.

When a folder is public, Onyxia can generate a sharing link that opens it with the public profile. The recipient can follow that link without signing in to Onyxia.

Anonymous-Only S3 Profile

An S3 configuration can omit sts and define only anonymousProfileName. This creates a credential-free profile without creating any STS-backed profile:

Here, Onyxia exposes the public profile and accesses s3://open-data/ with unsigned requests. Access succeeds only if the S3 provider's policies allow it.

Configuration Reference

The following type describes the complete data.S3 configuration accepted by Onyxia Web:

The configured durationSeconds is only a request. The STS provider can reject it or limit the resulting credential lifetime. In particular, Onyxia's seven-day default may be too high for some providers, so set an explicit value compatible with your STS service.

Claim Expansion and Templates

claimName is read from the decoded ID token produced by the OIDC configuration used for S3. Dot notation is supported for nested claims, for example realm_access.roles.

The claim must be a string or an array of strings:

  • a string resolves one role or bookmark;

  • an array resolves one role or bookmark per accepted value;

  • a missing claim resolves nothing for that entry.

The claim filters are JavaScript regular expressions. Resolution works as follows:

  1. excludedClaimPattern is tested first. A matching value is discarded.

  2. includedClaimPattern is then applied. If omitted, it defaults to ^(.+)$.

  3. $1, $2, and subsequent placeholders are replaced with capture groups from the included match.

Role templates are supported in:

  • roleARN;

  • roleSessionName;

  • profileName.

Bookmark templates are supported in:

  • s3Uri;

  • title, including every localized value;

  • forProfileName.

Without claimName, Onyxia creates exactly one role or bookmark and treats $1 literally.

Bookmark Profile Selection

forProfileName controls which resolved profiles receive a bookmark:

  • omit it to attach the bookmark to every profile generated from the same S3 configuration;

  • use a string for one selector;

  • use an array for several selectors;

  • use * within a selector as a wildcard, for example project-*.

The selector filters bookmarks in the UI. It does not grant S3 permissions.

Defaults for User-Created Profiles

An S3 configuration with neither sts nor anonymousProfileName does not create an administrator-defined profile. Instead, it supplies the default URL, region, and path-style setting shown when a user creates a profile manually.

If data.S3 contains several entries, Onyxia uses the first entry with neither sts nor anonymousProfileName for those form defaults. If every entry creates an STS-backed or anonymous profile, it uses the first entry.

Here, the MinIO entry only supplies defaults for the manual profile form. The Ceph entry creates the administrator-defined default profile.

Operational Requirements

  • The S3 and STS endpoints must be reachable from users' browsers.

  • The S3 provider must allow the Onyxia Web origin through CORS.

  • The STS provider must trust the issuer and client configured in sts.oidcConfiguration.

  • Anonymous profiles and public-folder sharing require the S3 provider to permit unsigned list and read requests for the relevant buckets and prefixes.

  • Referenced roles and policies must already exist and grant access consistent with the displayed bookmarks.

  • The OIDC access token is sent to STS as the web identity token. Claim templates, however, are resolved from the corresponding decoded ID token.

  • Profile names must be unique across administrator-defined and user-created profiles. Name collisions are unsupported and can cause the conflicting profiles to be discarded.

Last updated

Was this helpful?