Skip to content

feat: rename uiScopes to uiScope and add loadUser OIDC option#91

Merged
mrrajan merged 1 commit into
guacsec:mainfrom
mrrajan:feat/oidc-ui-scope-and-load-user
Jun 4, 2026
Merged

feat: rename uiScopes to uiScope and add loadUser OIDC option#91
mrrajan merged 1 commit into
guacsec:mainfrom
mrrajan:feat/oidc-ui-scope-and-load-user

Conversation

@mrrajan

@mrrajan mrrajan commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Added loadUser and updated uiScope

Summary by Sourcery

Rename the OIDC UI scopes configuration to a singular UI scope and introduce a configurable option to control loading of the OIDC user in the server deployment.

New Features:

  • Add a configurable loadUser OIDC option wired through to the UI_LOAD_USER environment variable.

Enhancements:

  • Rename the uiScopes Helm value and helper to uiScope and update server deployment to use the UI_SCOPE environment variable instead of UI_SCOPES.

@sourcery-ai

sourcery-ai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Reviewer's Guide

Renames the OIDC UI scopes configuration and helper from plural to singular and introduces a new Helm value and template helper to control a UI_LOAD_USER environment variable for the server deployment.

Flow diagram for updated OIDC Helm values to server environment

flowchart LR
  subgraph Values
    v_uiScope[oidc.uiScope]
    v_loadUser[oidc.loadUser]
  end

  subgraph Templates
    t_uiScope[trustification.oidc.uiScope]
    t_loadUser[trustification.oidc.loadUser]
  end

  subgraph ServerDeployment
    e_uiScope[env UI_SCOPE]
    e_loadUser[env UI_LOAD_USER]
  end

  v_uiScope --> t_uiScope --> e_uiScope
  v_loadUser --> t_loadUser --> e_loadUser
Loading

File-Level Changes

Change Details Files
Rename OIDC UI scopes helper and values from plural uiScopes to singular uiScope and wire it into the server deployment.
  • Rename the Helm template helper from trustification.oidc.uiScopes to trustification.oidc.uiScope and update it to read .Values.oidc.uiScope.
  • Update the OIDC section of values.schema.yaml to define uiScope instead of uiScopes and adjust the description to reference the UI_SCOPE environment variable.
  • Change the server Deployment manifest to read the UI scope via the updated helper and set the UI_SCOPE environment variable instead of UI_SCOPES.
  • Update default values in values.yaml to use oidc.uiScope instead of oidc.uiScopes.
charts/trustify/templates/helpers/_oidc.tpl
charts/trustify/values.schema.yaml
charts/trustify/templates/services/server/030-Deployment.yaml
charts/trustify/values.yaml
charts/trustify/values.schema.json
Add a new loadUser OIDC option exposed as UI_LOAD_USER and plumbed through Helm values and helpers.
  • Introduce a new Helm template helper trustification.oidc.loadUser that outputs .Values.oidc.loadUser quoted.
  • Add loadUser as a boolean property in values.schema.yaml with default true and documentation for the UI_LOAD_USER environment variable.
  • Set a new UI_LOAD_USER environment variable in the server Deployment using the trustification.oidc.loadUser helper.
  • Add the loadUser default (true) under the oidc section in values.yaml.
charts/trustify/templates/helpers/_oidc.tpl
charts/trustify/values.schema.yaml
charts/trustify/templates/services/server/030-Deployment.yaml
charts/trustify/values.yaml
charts/trustify/values.schema.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Renaming oidc.uiScopesoidc.uiScope (and UI_SCOPESUI_SCOPE) is a breaking change for existing values files; consider keeping uiScopes as a deprecated alias (or mapping it in the templates) to preserve backward compatibility.
  • The trustification.oidc.loadUser helper applies | quote, while trustification.oidc.uiScope is quoted at the call site; for consistency and easier reuse, consider removing the quoting from the helper and quoting only where the value is injected into the YAML.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Renaming `oidc.uiScopes``oidc.uiScope` (and `UI_SCOPES``UI_SCOPE`) is a breaking change for existing values files; consider keeping `uiScopes` as a deprecated alias (or mapping it in the templates) to preserve backward compatibility.
- The `trustification.oidc.loadUser` helper applies `| quote`, while `trustification.oidc.uiScope` is quoted at the call site; for consistency and easier reuse, consider removing the quoting from the helper and quoting only where the value is injected into the YAML.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mrrajan mrrajan force-pushed the feat/oidc-ui-scope-and-load-user branch from 0f3100b to 6658e11 Compare June 3, 2026 15:18

@m-brophy m-brophy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mrrajan mrrajan merged commit 06ab2ed into guacsec:main Jun 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants