Skip to content

Empty server.oidc.adminRole/userRole silently enables RBAC instead of authentication-only mode #3045

Open

Description

@jfroy

User Story

As a cluster operator, I want to deploy OpenShell gateway in auth-only mode.

Problem Statement

values.yaml documents authentication-only mode thusly:

    # -- Role name for admin access. Leave empty (with userRole also empty) for
    # authentication-only mode. Both must be set or both empty.
    adminRole: ""
    # -- Role name for standard user access.
    userRole: ""

But the chart guards both keys on truthiness:

{{- if .Values.server.oidc.adminRole }}
admin_role    = {{ .Values.server.oidc.adminRole | quote }}
{{- end }}

so empty strings are omitted from the rendered TOML rather than emitted as "". OidcConfig then applies #[serde(default = "default_admin_role")], restoring openshell-admin / openshell-user. The gateway starts in RBAC mode with the stock role names.

Impact / Why This Matters

The chart provides no way to deploy in auth-only mode and its documentation is misleading.

Acceptance Criteria

  • Documentation is changed to reflect actual chart behavior.
  • Method to deploy in auth-only mode is added to the chart.

Reproduction Steps

  1. Install the chart with server.oidc.issuer set and server.oidc.adminRole / server.oidc.userRole left at their "" defaults.
  2. kubectl -n openshell get cm openshell-config -o yaml — the [openshell.gateway.oidc] table contains no admin_role or user_role key.

Environment

Activity

  1. added theissue type on Aug 31, 2026
  2. guanchzhou commented on Sep 4, 2026

    @guanchzhou

    The chart fix for this already exists in #1871. It renders admin_role and user_role as empty strings instead of omitting them, adds an explicit server.auth.allowOidcAuthOnly opt-in so authentication-only mode cannot be entered silently, and corrects the values.yaml comments quoted above.

    That PR has been blocked on merge conflicts with main rather than on review findings, which is why the behavior is still reproducible on 0.0.116. Linking the two so they are not triaged as separate problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-neededOpened without agent diagnostics and needs triage

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions