Skip to content

feat: add roles RBAC governance config to Bifrost Helm chart and config schema - #4004

Merged
akshaydeo merged 2 commits into
devfrom
06-03-feat_update_config_schemas_and_helm
Jun 3, 2026
Merged

feat: add roles RBAC governance config to Bifrost Helm chart and config schema#4004
akshaydeo merged 2 commits into
devfrom
06-03-feat_update_config_schemas_and_helm

Conversation

@BearTS

@BearTS BearTS commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds support for declarative RBAC role definitions in the Bifrost governance configuration. This allows roles to be defined in config (or Helm values) and automatically created or updated on startup when the config hash changes, without affecting system roles or dashboard-managed roles.

Changes

  • Added roles array support to the governance section of _helpers.tpl, mapping each role's name, description, dac, access_profile, and permissions fields into the rendered config
  • Added roles to the governance presence check so the config block is included when roles are defined
  • Added roles schema definition to values.schema.json with validation for all supported fields, including the dac enum (own-data, team-data, all-data) and the permissions array requiring resource and operation
  • Added commented-out example role configuration to values.yaml under bifrost.governance.roles
  • Added roles schema to transports/config.schema.json with full field descriptions, including DAC scope semantics, access profile linking, and supported permission resources and operations

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

Deploy Bifrost via Helm with a roles entry defined under bifrost.governance.roles:

bifrost:
  governance:
    roles:
      - name: "data-analyst"
        description: "Read-only access for data analysts"
        dac: "team-data"
        access_profile: "analyst-profile"
        permissions:
          - resource: "Logs"
            operation: "View"
          - resource: "Metrics"
            operation: "View"

Verify that:

  1. The rendered Helm template includes the roles block under governance
  2. On startup, the defined roles are created or updated in the system
  3. Existing system roles and dashboard-created roles are not deleted
helm template bifrost ./helm-charts/bifrost -f your-values.yaml | grep -A 20 "roles"

Screenshots/Recordings

N/A

Breaking changes

  • Yes
  • No

Related issues

N/A

Security considerations

Role definitions control RBAC permissions including data access scope (dac) and resource-level operations. Ensure that roles defined in config are reviewed carefully before deployment, as misconfigured permissions could grant unintended access to sensitive resources such as AuditLogs, Users, or ModelProvider.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

Summary by CodeRabbit

  • New Features
    • Governance roles configuration now supported: define roles with required name and optional description, data-access scope (DAC), access profile, and granular permissions (resource + operation).
  • Documentation
    • Configuration schema and Helm values updated with validation rules and commented role examples to guide deployment and validation.

@BearTS
BearTS requested a review from a team as a code owner June 2, 2026 20:10
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@BearTS, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 32 minutes and 24 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9d95c2f2-fa6d-46ce-8c90-35e8a3be555e

📥 Commits

Reviewing files that changed from the base of the PR and between d371efc and c82069e.

📒 Files selected for processing (4)
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml
  • transports/config.schema.json
📝 Walkthrough

Walkthrough

Adds governance role definitions to Helm values and transport schema and updates the Helm helper to render governance.roles from configured values when present.

Changes

Governance Roles Configuration

Layer / File(s) Summary
Role configuration schemas
helm-charts/bifrost/values.schema.json, transports/config.schema.json
Defines the roles array and role object shape (required name; optional description, dac with enum/default, access_profile; permissions[] of {resource, operation}) with additionalProperties: false.
Helm values and template rendering
helm-charts/bifrost/values.yaml, helm-charts/bifrost/templates/_helpers.tpl
Adds bifrost.governance.roles to values.yaml with commented examples; bifrost.config helper maps values into role objects and treats $governance.roles as a non-empty trigger so governance is emitted when roles exist.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • akshaydeo

Poem

🐰
I hopped through schema, leaf and role,
Wove names and rights into one scroll,
From values.yaml to templated song,
Permissions lined, the config strong,
A tiny rabbit guards the config whole.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding RBAC role governance config support to the Bifrost Helm chart and config schema.
Description check ✅ Passed The PR description covers all required template sections including summary, detailed changes, type of change, affected areas, testing instructions, security considerations, and checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 06-03-feat_update_config_schemas_and_helm

Comment @coderabbitai help to get the list of available commands and usage tips.

@BearTS BearTS changed the title feat: add support for roles in config json feat: add roles RBAC governance config to Bifrost Helm chart and config schema Jun 2, 2026
@greptile-apps

greptile-apps Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge — all changes are additive schema and template definitions with no Go code modifications.

The change is purely additive: new schema fields, a Helm template rendering block, and a validation helper. The roles rendering in _helpers.tpl follows the same conditional-optional-field pattern as every other governance entity (business_units, virtualKeys), the presence check correctly uses the internal dict key $governance.roles, and the JSON schemas enforce name as required with dac constrained by enum and additionalProperties: false. No existing behavior is altered.

No files require special attention.

Important Files Changed

Filename Overview
helm-charts/bifrost/templates/_helpers.tpl Adds roles block rendering (name required, optional fields conditional) and a fail-fast name validation, consistent with how other governance entities like business_units and virtualKeys are handled. Presence check updated correctly with $governance.roles key.
helm-charts/bifrost/values.schema.json Adds a well-formed roles array schema with name required, dac constrained by enum, and additionalProperties: false on both the role object and permission items. Consistent with the rest of the governance schema.
helm-charts/bifrost/values.yaml Adds roles: [] default (falsy in Go templates, matching teams/virtualKeys patterns) with commented-out example entries. Also adds an unrelated OAuth MCP client example comment in the mcpClients section.
transports/config.schema.json Adds roles as the config source-of-truth schema under governance, with descriptive documentation for each field, dac enum, and additionalProperties: false on permission items. Consistent with the upstream Helm schema.

Reviews (4): Last reviewed commit: "feat: update config schemas and helm" | Re-trigger Greptile

Comment thread transports/config.schema.json

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@helm-charts/bifrost/templates/_helpers.tpl`:
- Around line 446-457: The template only sets $governance.roles when
.Values.bifrost.governance.roles is truthy, so an explicit empty roles list is
omitted; modify the helper to emit an explicit empty list when the operator
intends no roles by ensuring that when .Values.bifrost.governance exists but
.Values.bifrost.governance.roles is nil/empty you still call set $governance
"roles" (append or assign an empty list via list) so config.json contains
"roles": []; update the block around the existing usage of
.Values.bifrost.governance.roles, $roles, and the $_ := set $governance "roles"
call and apply the same change at the other occurrence referenced (lines
509-510) to provide a definite presence signal for an empty roles array.

In `@helm-charts/bifrost/values.schema.json`:
- Around line 1140-1169: The roles schema's role object (the "items" object
defining role properties) is missing "additionalProperties": false—add that to
the role object definition; likewise add "additionalProperties": false to the
nested "permissions" item object (the object with "resource" and "operation");
and set the "dac" property (the property with enum
["own-data","team-data","all-data"]) to include "default": "all-data" so the
Helm values validation matches transports/config.schema.json.

In `@transports/config.schema.json`:
- Around line 608-655: The roles array currently only enforces that each item
has a name but not that names are unique; update the "roles" array schema to
enforce uniqueness of the "name" field (e.g., add the array-level uniqueness
constraint supported by our validator such as "uniqueItemProperties": ["name"]
for the "roles" schema) so duplicate governance.roles[].name values are rejected
during config.json validation; adjust any schema metadata/comments and run
schema validation tests to confirm duplicates now fail.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5495f73e-0d2b-4c3c-9260-150e032385e1

📥 Commits

Reviewing files that changed from the base of the PR and between f415c14 and 1c1720d.

📒 Files selected for processing (4)
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml
  • transports/config.schema.json

Comment thread helm-charts/bifrost/templates/_helpers.tpl
Comment thread helm-charts/bifrost/values.schema.json
Comment thread transports/config.schema.json
@BearTS
BearTS force-pushed the 06-03-feat_update_config_schemas_and_helm branch from 1c1720d to 03d94f7 Compare June 2, 2026 20:24

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@helm-charts/bifrost/values.yaml`:
- Around line 529-540: The Helm values example for "roles" lacks the lifecycle
note that roles are create/update-only (no deletion); update the commented
example under the roles: [] block to mirror the schema wording: explicitly state
that governance roles are created/updated on startup when the config hash
changes and are not deleted via Helm (removing a role from values does not
delete it), and mention system/dashboard roles are never deleted; reference the
roles block and ensure the note matches the schema/lifecycle language used
elsewhere.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: eb38f849-0123-437a-811e-0ca21d5da0b3

📥 Commits

Reviewing files that changed from the base of the PR and between 1c1720d and 03d94f7.

📒 Files selected for processing (4)
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml
  • transports/config.schema.json

Comment thread helm-charts/bifrost/values.yaml
@BearTS
BearTS force-pushed the 06-03-feat_update_config_schemas_and_helm branch from 03d94f7 to d371efc Compare June 3, 2026 05:59

BearTS commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@helm-charts/bifrost/templates/_helpers.tpl`:
- Around line 446-457: Add template-time validation for
.Values.bifrost.governance.roles inside the bifrost.validate template (after the
virtualKeys validation) to ensure each role object contains a required name
field; iterate over .Values.bifrost.governance.roles and emit a fail message via
the Helm tpl/fail pattern if any role is missing .name, referencing the same
keys used in the helper that builds roles (bifrost.governance.roles, role.name)
so validation matches the role construction logic in _helpers.tpl.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 09666a6c-8b0f-42ad-a458-f1a5328c3909

📥 Commits

Reviewing files that changed from the base of the PR and between 03d94f7 and d371efc.

📒 Files selected for processing (4)
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml
  • transports/config.schema.json
💤 Files with no reviewable changes (1)
  • transports/config.schema.json

Comment thread helm-charts/bifrost/templates/_helpers.tpl
@BearTS
BearTS force-pushed the 06-03-feat_update_config_schemas_and_helm branch from d371efc to c82069e Compare June 3, 2026 06:22

akshaydeo commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • Jun 3, 6:55 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 3, 6:56 AM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo merged commit b0f4c94 into dev Jun 3, 2026
13 checks passed
@akshaydeo
akshaydeo deleted the 06-03-feat_update_config_schemas_and_helm branch June 3, 2026 06:56
akshaydeo pushed a commit that referenced this pull request Jun 4, 2026
…nfig schema (#4004)

## Summary

Adds support for declarative RBAC role definitions in the Bifrost governance configuration. This allows roles to be defined in config (or Helm values) and automatically created or updated on startup when the config hash changes, without affecting system roles or dashboard-managed roles.

## Changes

- Added `roles` array support to the governance section of `_helpers.tpl`, mapping each role's `name`, `description`, `dac`, `access_profile`, and `permissions` fields into the rendered config
- Added `roles` to the governance presence check so the config block is included when roles are defined
- Added `roles` schema definition to `values.schema.json` with validation for all supported fields, including the `dac` enum (`own-data`, `team-data`, `all-data`) and the `permissions` array requiring `resource` and `operation`
- Added commented-out example role configuration to `values.yaml` under `bifrost.governance.roles`
- Added `roles` schema to `transports/config.schema.json` with full field descriptions, including DAC scope semantics, access profile linking, and supported permission resources and operations

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [x] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

Deploy Bifrost via Helm with a `roles` entry defined under `bifrost.governance.roles`:

```yaml
bifrost:
  governance:
    roles:
      - name: "data-analyst"
        description: "Read-only access for data analysts"
        dac: "team-data"
        access_profile: "analyst-profile"
        permissions:
          - resource: "Logs"
            operation: "View"
          - resource: "Metrics"
            operation: "View"
```

Verify that:
1. The rendered Helm template includes the `roles` block under `governance`
2. On startup, the defined roles are created or updated in the system
3. Existing system roles and dashboard-created roles are not deleted

```sh
helm template bifrost ./helm-charts/bifrost -f your-values.yaml | grep -A 20 "roles"
```

## Screenshots/Recordings

N/A

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

N/A

## Security considerations

Role definitions control RBAC permissions including data access scope (`dac`) and resource-level operations. Ensure that roles defined in config are reviewed carefully before deployment, as misconfigured permissions could grant unintended access to sensitive resources such as `AuditLogs`, `Users`, or `ModelProvider`.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **New Features**
  * Governance roles configuration now supported: define roles with required name and optional description, data-access scope (DAC), access profile, and granular permissions (resource + operation).
* **Documentation**
  * Configuration schema and Helm values updated with validation rules and commented role examples to guide deployment and validation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@akshaydeo akshaydeo mentioned this pull request Jun 7, 2026
akshaydeo pushed a commit that referenced this pull request Jun 7, 2026
…nfig schema (#4004)

## Summary

Adds support for declarative RBAC role definitions in the Bifrost governance configuration. This allows roles to be defined in config (or Helm values) and automatically created or updated on startup when the config hash changes, without affecting system roles or dashboard-managed roles.

## Changes

- Added `roles` array support to the governance section of `_helpers.tpl`, mapping each role's `name`, `description`, `dac`, `access_profile`, and `permissions` fields into the rendered config
- Added `roles` to the governance presence check so the config block is included when roles are defined
- Added `roles` schema definition to `values.schema.json` with validation for all supported fields, including the `dac` enum (`own-data`, `team-data`, `all-data`) and the `permissions` array requiring `resource` and `operation`
- Added commented-out example role configuration to `values.yaml` under `bifrost.governance.roles`
- Added `roles` schema to `transports/config.schema.json` with full field descriptions, including DAC scope semantics, access profile linking, and supported permission resources and operations

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [x] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

Deploy Bifrost via Helm with a `roles` entry defined under `bifrost.governance.roles`:

```yaml
bifrost:
  governance:
    roles:
      - name: "data-analyst"
        description: "Read-only access for data analysts"
        dac: "team-data"
        access_profile: "analyst-profile"
        permissions:
          - resource: "Logs"
            operation: "View"
          - resource: "Metrics"
            operation: "View"
```

Verify that:
1. The rendered Helm template includes the `roles` block under `governance`
2. On startup, the defined roles are created or updated in the system
3. Existing system roles and dashboard-created roles are not deleted

```sh
helm template bifrost ./helm-charts/bifrost -f your-values.yaml | grep -A 20 "roles"
```

## Screenshots/Recordings

N/A

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

N/A

## Security considerations

Role definitions control RBAC permissions including data access scope (`dac`) and resource-level operations. Ensure that roles defined in config are reviewed carefully before deployment, as misconfigured permissions could grant unintended access to sensitive resources such as `AuditLogs`, `Users`, or `ModelProvider`.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **New Features**
  * Governance roles configuration now supported: define roles with required name and optional description, data-access scope (DAC), access profile, and granular permissions (resource + operation).
* **Documentation**
  * Configuration schema and Helm values updated with validation rules and commented role examples to guide deployment and validation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
akshaydeo added a commit that referenced this pull request Jun 7, 2026
## ✨ Features

- **OpenAI Compaction** — Added OpenAI conversation compaction support
across core, framework, logging, and the API surface (#4053)
- **Multi-Customer & Org Hierarchy** — Logs and usage tracking now
support multiple customers, teams, and business units, including
business unit CRUD, team assignment, and governance endpoints in the
OpenAPI spec (#4066, #4041, #4082)
- **Provider-Level Governance** — Budgets & limits are now scope-aware
and can be applied at the virtual-key top level and per provider, wired
from the model configs table, with UI filters for scope and providers
(#3938, #3937, #3939, #3981, #3962)
- **Customer Budgets** — Customers support multiple budgets and
`calendar_aligned` budget windows (#3998, #3997)
- **Virtual Key Attribution & Controls** — Added a `created_by` user
attribution column and a `blacklisted_models` column for virtual key
provider configs (#3672, #3653)
- **Request Header Capture** — OTel and Maxim observability plugins
capture `request_headers` by pattern, with wildcard support (e.g.
`x-custom-*`); logging gained the same wildcard header capture (#4012,
#3958)
- **OTel Content Controls & Collectors** — New `disable_content_logging`
option drops message/tool content from exported spans, plus support for
multiple OTel collectors (#4064, #3894)
- **xAI x_search** — Added xAI `x_search` tool support (#3976)
- **URL Validation** — Added fetch URL validation with private-network
configuration and link-local blocking (#3947, #3991)
- **File Scheme Pricing URLs** — Pricing source URLs now accept the
`file://` scheme for air-gapped and self-hosted deployments (#4045)
- **Paginated Virtual Keys** — Virtual key fetching is paginated to
handle deployments with very large numbers of keys (#3957)
- **Client IP Resolution** — Resolve client IP from
`X-Forwarded-For`/`X-Real-IP` headers
- **SCIM Provisioning** — Added `attributeType`/`attributeValue` SCIM
provisioning fields
- **Helm/Config Schema** — Added `roles` RBAC governance config and
`per_user_oauth` MCP auth to the Helm chart and config schema (#4004,
#4009)
- **Log Navigation UI** — Added a "View logs" menu item to customer,
team, and virtual key tables, clickable links in log detail views, a
customer detail sheet, and a reusable `BudgetDisplay` component (#4073,
#4054, #4026, #4055)
- **Faster First Paint** — Added an inline loading shell to `#root`
before React mounts (#4063)
- **Materialized View Alias** — Added an `alias` column to the
materialized view with filter support (#4078)

## 🐞 Fixed

- **Fetch URL IP Checks** — Hardened fetch URL IP checks against SSRF
(#4092)
- **Mantle Model Matching** — Broadened Mantle model matching to all
`gpt` variants (#4091)
- **Empty Thinking Blocks** — Strip thinking blocks when the signature
is empty (#4079)
- **OpenAI Stream Usage** — Removed usage from the `responses.created`
event in the OpenAI stream (#4080)
- **Prompt Cache Key** — Set the prompt cache key from the Anthropic
integration (#4086)
- **Upstream Failure Status** — Map upstream connection failures to 502
instead of 400 (#3929) (thanks
[@chris-colinsky](https://github.com/chris-colinsky)!)
- **Gemini Schema Constraints** — Accept numeric schema integer
constraints for Gemini (#3994) (thanks
[@yanhao98](https://github.com/yanhao98)!)
- **Files Provider Param** — Accept the `?provider=` query param on `GET
/v1/files` (#3971) (thanks [@alexef](https://github.com/alexef)!)
- **Optional Batch Model** — Made the `model` field optional on `POST
/v1/batches` (#3973) (thanks [@alexef](https://github.com/alexef)!)
- **Helm Azure Config** — Added missing `azure_key_config` fields to the
Helm schema (#3996) (thanks
[@axelray-dev](https://github.com/axelray-dev)!)
- **Text Completion Chunk Model** — Added the missing `Model` field to
`TextCompletionChunkResponse` (#3970) (thanks
[@kuishou68](https://github.com/kuishou68)!)
- **MCP Inline stdio Env** — MCP stdio server configs accept inline
environment variable assignments (#3861) (thanks
[@Shushmitaaaa](https://github.com/Shushmitaaaa)!)
- **Orphaned Tool Results** — Orphaned tool results in the OpenAI to
Anthropic conversion flow are no longer rejected by the Anthropic API
(#3919)
- **Node Usage Reconciliation** — Added a monotonic `inc_number` log
cursor so node usage reconciliation does not skip late async log writes
(#3664)
- **Bedrock Output Assessments** — Corrected the type of
`outputAssessments` in Bedrock responses (#4028)
- **Model Pool Pricing Reloads** — Preserve non-pricing model pool
entries across pricing reloads (#3999)
- **Ghost Node Reconciliation** — Replicate the VK hierarchy flow for
ghost node reconciliation (#4088)
- **VK Double Usage Counting** — Fixed double usage counting when
creating a virtual key (#4070)
- **Model Config Lifecycle** — Cascade deletes for model configs and
removal of stale in-memory model configs (#4051, #4043)
- **FTS Index Cap** — Reduced the FTS index `left()` cap from 800k to
250k chars to stay within the tsvector limit (#4057)
- **Sync Worker Drift** — Reduced the sync worker ticker period to 5m to
prevent threshold drift (#4023)
- **Passthrough** — Fixed passthrough budgets, gated passthrough models
per VK, model extraction for Azure passthrough, and restricted
fallbacks/provider selection to the VK boundary (#3941, #3988, #3983,
#3924)
- **Provider Response Headers** — Strip provider response headers and
add a content-type filter (#3955, #4024)
- **Stream Handling** — Drain non-SSE stream readers and retry stale
connections (#3956, #3967)
- **Azure Claude** — Strip Azure diagnostic property for Claude models
(#3925)
- **Compat max_tokens** — Preserve chat `max_tokens` during param
filtering (#3992)
- **Raw Request Flag** — Removed the raw request flag from providers
that don't support it (#4058)
- **UI Fixes** — Standardized page container layout, virtual key model
configs UI, and dashboard chart tooltips (#4046, #4052, #4044)

## 🔧 Maintenance

- **Dependency Upgrades** — Bumped transitive `golang.org/x`
dependencies (crypto, net, sys, text) for Docker Scout CVE remediation
and `recharts` to 3.8.1; cascaded version bumps across all modules
(#3900, #4003)
akhsaul pushed a commit to akhsaul/bifrost that referenced this pull request Aug 27, 2026
…nfig schema (maximhq#4004)

## Summary

Adds support for declarative RBAC role definitions in the Bifrost governance configuration. This allows roles to be defined in config (or Helm values) and automatically created or updated on startup when the config hash changes, without affecting system roles or dashboard-managed roles.

## Changes

- Added `roles` array support to the governance section of `_helpers.tpl`, mapping each role's `name`, `description`, `dac`, `access_profile`, and `permissions` fields into the rendered config
- Added `roles` to the governance presence check so the config block is included when roles are defined
- Added `roles` schema definition to `values.schema.json` with validation for all supported fields, including the `dac` enum (`own-data`, `team-data`, `all-data`) and the `permissions` array requiring `resource` and `operation`
- Added commented-out example role configuration to `values.yaml` under `bifrost.governance.roles`
- Added `roles` schema to `transports/config.schema.json` with full field descriptions, including DAC scope semantics, access profile linking, and supported permission resources and operations

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [x] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

Deploy Bifrost via Helm with a `roles` entry defined under `bifrost.governance.roles`:

```yaml
bifrost:
  governance:
    roles:
      - name: "data-analyst"
        description: "Read-only access for data analysts"
        dac: "team-data"
        access_profile: "analyst-profile"
        permissions:
          - resource: "Logs"
            operation: "View"
          - resource: "Metrics"
            operation: "View"
```

Verify that:
1. The rendered Helm template includes the `roles` block under `governance`
2. On startup, the defined roles are created or updated in the system
3. Existing system roles and dashboard-created roles are not deleted

```sh
helm template bifrost ./helm-charts/bifrost -f your-values.yaml | grep -A 20 "roles"
```

## Screenshots/Recordings

N/A

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

N/A

## Security considerations

Role definitions control RBAC permissions including data access scope (`dac`) and resource-level operations. Ensure that roles defined in config are reviewed carefully before deployment, as misconfigured permissions could grant unintended access to sensitive resources such as `AuditLogs`, `Users`, or `ModelProvider`.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **New Features**
  * Governance roles configuration now supported: define roles with required name and optional description, data-access scope (DAC), access profile, and granular permissions (resource + operation).
* **Documentation**
  * Configuration schema and Helm values updated with validation rules and commented role examples to guide deployment and validation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
akhsaul pushed a commit to akhsaul/bifrost that referenced this pull request Aug 27, 2026
## ✨ Features

- **OpenAI Compaction** — Added OpenAI conversation compaction support
across core, framework, logging, and the API surface (maximhq#4053)
- **Multi-Customer & Org Hierarchy** — Logs and usage tracking now
support multiple customers, teams, and business units, including
business unit CRUD, team assignment, and governance endpoints in the
OpenAPI spec (maximhq#4066, maximhq#4041, maximhq#4082)
- **Provider-Level Governance** — Budgets & limits are now scope-aware
and can be applied at the virtual-key top level and per provider, wired
from the model configs table, with UI filters for scope and providers
(maximhq#3938, maximhq#3937, maximhq#3939, maximhq#3981, maximhq#3962)
- **Customer Budgets** — Customers support multiple budgets and
`calendar_aligned` budget windows (maximhq#3998, maximhq#3997)
- **Virtual Key Attribution & Controls** — Added a `created_by` user
attribution column and a `blacklisted_models` column for virtual key
provider configs (maximhq#3672, maximhq#3653)
- **Request Header Capture** — OTel and Maxim observability plugins
capture `request_headers` by pattern, with wildcard support (e.g.
`x-custom-*`); logging gained the same wildcard header capture (maximhq#4012,
maximhq#3958)
- **OTel Content Controls & Collectors** — New `disable_content_logging`
option drops message/tool content from exported spans, plus support for
multiple OTel collectors (maximhq#4064, maximhq#3894)
- **xAI x_search** — Added xAI `x_search` tool support (maximhq#3976)
- **URL Validation** — Added fetch URL validation with private-network
configuration and link-local blocking (maximhq#3947, maximhq#3991)
- **File Scheme Pricing URLs** — Pricing source URLs now accept the
`file://` scheme for air-gapped and self-hosted deployments (maximhq#4045)
- **Paginated Virtual Keys** — Virtual key fetching is paginated to
handle deployments with very large numbers of keys (maximhq#3957)
- **Client IP Resolution** — Resolve client IP from
`X-Forwarded-For`/`X-Real-IP` headers
- **SCIM Provisioning** — Added `attributeType`/`attributeValue` SCIM
provisioning fields
- **Helm/Config Schema** — Added `roles` RBAC governance config and
`per_user_oauth` MCP auth to the Helm chart and config schema (maximhq#4004,
maximhq#4009)
- **Log Navigation UI** — Added a "View logs" menu item to customer,
team, and virtual key tables, clickable links in log detail views, a
customer detail sheet, and a reusable `BudgetDisplay` component (maximhq#4073,
maximhq#4054, maximhq#4026, maximhq#4055)
- **Faster First Paint** — Added an inline loading shell to `#root`
before React mounts (maximhq#4063)
- **Materialized View Alias** — Added an `alias` column to the
materialized view with filter support (maximhq#4078)

## 🐞 Fixed

- **Fetch URL IP Checks** — Hardened fetch URL IP checks against SSRF
(maximhq#4092)
- **Mantle Model Matching** — Broadened Mantle model matching to all
`gpt` variants (maximhq#4091)
- **Empty Thinking Blocks** — Strip thinking blocks when the signature
is empty (maximhq#4079)
- **OpenAI Stream Usage** — Removed usage from the `responses.created`
event in the OpenAI stream (maximhq#4080)
- **Prompt Cache Key** — Set the prompt cache key from the Anthropic
integration (maximhq#4086)
- **Upstream Failure Status** — Map upstream connection failures to 502
instead of 400 (maximhq#3929) (thanks
[@chris-colinsky](https://github.com/chris-colinsky)!)
- **Gemini Schema Constraints** — Accept numeric schema integer
constraints for Gemini (maximhq#3994) (thanks
[@yanhao98](https://github.com/yanhao98)!)
- **Files Provider Param** — Accept the `?provider=` query param on `GET
/v1/files` (maximhq#3971) (thanks [@alexef](https://github.com/alexef)!)
- **Optional Batch Model** — Made the `model` field optional on `POST
/v1/batches` (maximhq#3973) (thanks [@alexef](https://github.com/alexef)!)
- **Helm Azure Config** — Added missing `azure_key_config` fields to the
Helm schema (maximhq#3996) (thanks
[@axelray-dev](https://github.com/axelray-dev)!)
- **Text Completion Chunk Model** — Added the missing `Model` field to
`TextCompletionChunkResponse` (maximhq#3970) (thanks
[@kuishou68](https://github.com/kuishou68)!)
- **MCP Inline stdio Env** — MCP stdio server configs accept inline
environment variable assignments (maximhq#3861) (thanks
[@Shushmitaaaa](https://github.com/Shushmitaaaa)!)
- **Orphaned Tool Results** — Orphaned tool results in the OpenAI to
Anthropic conversion flow are no longer rejected by the Anthropic API
(maximhq#3919)
- **Node Usage Reconciliation** — Added a monotonic `inc_number` log
cursor so node usage reconciliation does not skip late async log writes
(maximhq#3664)
- **Bedrock Output Assessments** — Corrected the type of
`outputAssessments` in Bedrock responses (maximhq#4028)
- **Model Pool Pricing Reloads** — Preserve non-pricing model pool
entries across pricing reloads (maximhq#3999)
- **Ghost Node Reconciliation** — Replicate the VK hierarchy flow for
ghost node reconciliation (maximhq#4088)
- **VK Double Usage Counting** — Fixed double usage counting when
creating a virtual key (maximhq#4070)
- **Model Config Lifecycle** — Cascade deletes for model configs and
removal of stale in-memory model configs (maximhq#4051, maximhq#4043)
- **FTS Index Cap** — Reduced the FTS index `left()` cap from 800k to
250k chars to stay within the tsvector limit (maximhq#4057)
- **Sync Worker Drift** — Reduced the sync worker ticker period to 5m to
prevent threshold drift (maximhq#4023)
- **Passthrough** — Fixed passthrough budgets, gated passthrough models
per VK, model extraction for Azure passthrough, and restricted
fallbacks/provider selection to the VK boundary (maximhq#3941, maximhq#3988, maximhq#3983,
maximhq#3924)
- **Provider Response Headers** — Strip provider response headers and
add a content-type filter (maximhq#3955, maximhq#4024)
- **Stream Handling** — Drain non-SSE stream readers and retry stale
connections (maximhq#3956, maximhq#3967)
- **Azure Claude** — Strip Azure diagnostic property for Claude models
(maximhq#3925)
- **Compat max_tokens** — Preserve chat `max_tokens` during param
filtering (maximhq#3992)
- **Raw Request Flag** — Removed the raw request flag from providers
that don't support it (maximhq#4058)
- **UI Fixes** — Standardized page container layout, virtual key model
configs UI, and dashboard chart tooltips (maximhq#4046, maximhq#4052, maximhq#4044)

## 🔧 Maintenance

- **Dependency Upgrades** — Bumped transitive `golang.org/x`
dependencies (crypto, net, sys, text) for Docker Scout CVE remediation
and `recharts` to 3.8.1; cascaded version bumps across all modules
(maximhq#3900, maximhq#4003)
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