feat: add attributeType/attributeValue SCIM provisioning fields to team and business unit attribute mappings - #3974
Conversation
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughThis PR extends Okta JWT/SCIM attribute mapping schemas in Helm values and transport config to add optional ChangesSCIM Provisioning Metadata Support
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
attributeType/attributeValue SCIM provisioning fields to team and business unit attribute mappings
Confidence Score: 3/5Not safe to merge as-is for Entra, Keycloak, Zitadel, and Google Helm users — the new SCIM mapping fields are blocked by additionalProperties:false in those provider schemas. The new fields work end-to-end only for Okta Helm deployments. Operators using any of the other four SCIM providers who configure attributeType/attributeValue will get an immediate Helm schema validation failure and cannot deploy the feature at all. helm-charts/bifrost/values.schema.json — the Entra, Keycloak, Zitadel, and Google provider blocks each need attributeType/attributeValue added to their attributeTeamMappings and attributeBusinessUnitMappings item schemas Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'dev' into 06-02-chore_upda..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (1)
transports/config.schema.json (1)
3719-3727: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winSame conditional validation recommendation applies here.
The
attributeBusinessUnitMappingsschema has the same independently-optionalattributeTypeandattributeValuefields asattributeTeamMappings. The same conditional validation constraint recommended in the previous comment should be applied here for consistency.🤖 Prompt for 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. In `@transports/config.schema.json` around lines 3719 - 3727, The attributeBusinessUnitMappings schema currently allows attributeType and attributeValue to be optional independently — mirror the fix applied to attributeTeamMappings by adding conditional validation so attributeValue is required when attributeType is present (or vice versa) to prevent partial mappings; update the schema for attributeBusinessUnitMappings to include the same conditional/if-then JSON Schema rules referencing attributeType and attributeValue (matching the logic used in attributeTeamMappings) so both fields are validated together.
🤖 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.schema.json`:
- Around line 1819-1830: The description for the "attributeValue" field in the
business unit mapping schema is ambiguous about what "auto-set to 'displayName'"
means; update the "attributeValue" description (adjacent to "attribute",
"business_unit", and "attributeType") to clearly state that when "attributeType"
is "group", "attributeValue" is ignored and the SCIM group's displayName will be
used (e.g., "SCIM attribute value to match; for 'user' this is the SCIM user
attribute value; for 'group' this is ignored and the SCIM group's displayName is
used"), ensuring consistency with the team mappings wording.
- Around line 1796-1807: The description for attributeValue is ambiguous about
"auto-set to 'displayName'"; update the attributeValue schema description to
clearly state that when attributeType is "group" the field is the value to match
against the SCIM group's displayName attribute (and not a literal default
value), e.g. rephrase to: "SCIM attribute value to match (for 'user': SCIM user
attribute value; for 'group': value to match against the SCIM group's
displayName attribute)"; reference attributeValue and attributeType when making
this change.
In `@transports/config.schema.json`:
- Around line 3696-3704: Add a conditional JSON Schema constraint so
attributeType and attributeValue are validated together: use an anyOf/allOf
block referencing the existing attributeType and attributeValue definitions to
require that if one is present the other must be present (i.e., both appear
together), and add a subschema that when attributeType is "group" enforces
attributeValue === "displayName" (or tighten the attributeValue enum for that
case); also update the attributeValue description to state that for group
mappings it must be the literal "displayName".
---
Duplicate comments:
In `@transports/config.schema.json`:
- Around line 3719-3727: The attributeBusinessUnitMappings schema currently
allows attributeType and attributeValue to be optional independently — mirror
the fix applied to attributeTeamMappings by adding conditional validation so
attributeValue is required when attributeType is present (or vice versa) to
prevent partial mappings; update the schema for attributeBusinessUnitMappings to
include the same conditional/if-then JSON Schema rules referencing attributeType
and attributeValue (matching the logic used in attributeTeamMappings) so both
fields are validated together.
🪄 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: 1fb4eebb-9112-4a12-87f1-a3d39f32f51b
📒 Files selected for processing (3)
helm-charts/bifrost/values.schema.jsonhelm-charts/bifrost/values.yamltransports/config.schema.json
Merge activity
|
…o team and business unit attribute mappings (#3974) ## Summary Adds optional `attributeType` and `attributeValue` fields to `attributeTeamMappings` and `attributeBusinessUnitMappings` to enable SCIM provisioning on a per-mapping basis. When these fields are present, a mapping can be matched against either a SCIM User attribute (`attributeType: "user"`) or a SCIM Group displayName (`attributeType: "group"`). ## Changes - Added `attributeType` (enum: `"user"` | `"group"`) and `attributeValue` (string) as optional properties to `attributeTeamMappings` and `attributeBusinessUnitMappings` in both `helm-charts/bifrost/values.schema.json` and `transports/config.schema.json`. - Added inline `description` fields to existing `attribute`, `value`, `team`, and `business_unit` properties for improved schema documentation. - Added commented-out examples in `values.yaml` demonstrating SCIM provisioning via user attribute matching and group displayName matching. - For `attributeType: "group"`, `attributeValue` is always expected to be `"displayName"` and is auto-set accordingly. ## 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 Configure `attributeTeamMappings` or `attributeBusinessUnitMappings` with the new fields and verify schema validation accepts valid inputs and rejects invalid ones (e.g., an `attributeType` value outside `["user", "group"]` or extra properties beyond those declared). ```sh # Validate schema changes go test ./... ``` Example mapping to validate: ```yaml attributeTeamMappings: - attribute: "department" value: "engineering" team: "eng-team" attributeType: "user" attributeValue: "engineering" - attribute: "groups" value: "Engineering" team: "eng-team" attributeType: "group" attributeValue: "displayName" ``` ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations No new auth flows or secrets handling introduced. The new fields extend existing JWT claim-to-team/business-unit mapping logic with SCIM provisioning metadata only. ## 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** * Enhanced team and business-unit attribute mappings with two new optional fields to support SCIM provisioning metadata, enabling more flexible attribute-based provisioning. * **Documentation** * Updated commented configuration examples to illustrate the new SCIM attribute/type/value mapping patterns. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…o team and business unit attribute mappings (#3974) ## Summary Adds optional `attributeType` and `attributeValue` fields to `attributeTeamMappings` and `attributeBusinessUnitMappings` to enable SCIM provisioning on a per-mapping basis. When these fields are present, a mapping can be matched against either a SCIM User attribute (`attributeType: "user"`) or a SCIM Group displayName (`attributeType: "group"`). ## Changes - Added `attributeType` (enum: `"user"` | `"group"`) and `attributeValue` (string) as optional properties to `attributeTeamMappings` and `attributeBusinessUnitMappings` in both `helm-charts/bifrost/values.schema.json` and `transports/config.schema.json`. - Added inline `description` fields to existing `attribute`, `value`, `team`, and `business_unit` properties for improved schema documentation. - Added commented-out examples in `values.yaml` demonstrating SCIM provisioning via user attribute matching and group displayName matching. - For `attributeType: "group"`, `attributeValue` is always expected to be `"displayName"` and is auto-set accordingly. ## 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 Configure `attributeTeamMappings` or `attributeBusinessUnitMappings` with the new fields and verify schema validation accepts valid inputs and rejects invalid ones (e.g., an `attributeType` value outside `["user", "group"]` or extra properties beyond those declared). ```sh # Validate schema changes go test ./... ``` Example mapping to validate: ```yaml attributeTeamMappings: - attribute: "department" value: "engineering" team: "eng-team" attributeType: "user" attributeValue: "engineering" - attribute: "groups" value: "Engineering" team: "eng-team" attributeType: "group" attributeValue: "displayName" ``` ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations No new auth flows or secrets handling introduced. The new fields extend existing JWT claim-to-team/business-unit mapping logic with SCIM provisioning metadata only. ## 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** * Enhanced team and business-unit attribute mappings with two new optional fields to support SCIM provisioning metadata, enabling more flexible attribute-based provisioning. * **Documentation** * Updated commented configuration examples to illustrate the new SCIM attribute/type/value mapping patterns. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…o team and business unit attribute mappings (#3974) ## Summary Adds optional `attributeType` and `attributeValue` fields to `attributeTeamMappings` and `attributeBusinessUnitMappings` to enable SCIM provisioning on a per-mapping basis. When these fields are present, a mapping can be matched against either a SCIM User attribute (`attributeType: "user"`) or a SCIM Group displayName (`attributeType: "group"`). ## Changes - Added `attributeType` (enum: `"user"` | `"group"`) and `attributeValue` (string) as optional properties to `attributeTeamMappings` and `attributeBusinessUnitMappings` in both `helm-charts/bifrost/values.schema.json` and `transports/config.schema.json`. - Added inline `description` fields to existing `attribute`, `value`, `team`, and `business_unit` properties for improved schema documentation. - Added commented-out examples in `values.yaml` demonstrating SCIM provisioning via user attribute matching and group displayName matching. - For `attributeType: "group"`, `attributeValue` is always expected to be `"displayName"` and is auto-set accordingly. ## 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 Configure `attributeTeamMappings` or `attributeBusinessUnitMappings` with the new fields and verify schema validation accepts valid inputs and rejects invalid ones (e.g., an `attributeType` value outside `["user", "group"]` or extra properties beyond those declared). ```sh # Validate schema changes go test ./... ``` Example mapping to validate: ```yaml attributeTeamMappings: - attribute: "department" value: "engineering" team: "eng-team" attributeType: "user" attributeValue: "engineering" - attribute: "groups" value: "Engineering" team: "eng-team" attributeType: "group" attributeValue: "displayName" ``` ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations No new auth flows or secrets handling introduced. The new fields extend existing JWT claim-to-team/business-unit mapping logic with SCIM provisioning metadata only. ## 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** * Enhanced team and business-unit attribute mappings with two new optional fields to support SCIM provisioning metadata, enabling more flexible attribute-based provisioning. * **Documentation** * Updated commented configuration examples to illustrate the new SCIM attribute/type/value mapping patterns. <!-- end of auto-generated comment: release notes by coderabbit.ai -->

Summary
Adds optional
attributeTypeandattributeValuefields toattributeTeamMappingsandattributeBusinessUnitMappingsto enable SCIM provisioning on a per-mapping basis. When these fields are present, a mapping can be matched against either a SCIM User attribute (attributeType: "user") or a SCIM Group displayName (attributeType: "group").Changes
attributeType(enum:"user"|"group") andattributeValue(string) as optional properties toattributeTeamMappingsandattributeBusinessUnitMappingsin bothhelm-charts/bifrost/values.schema.jsonandtransports/config.schema.json.descriptionfields to existingattribute,value,team, andbusiness_unitproperties for improved schema documentation.values.yamldemonstrating SCIM provisioning via user attribute matching and group displayName matching.attributeType: "group",attributeValueis always expected to be"displayName"and is auto-set accordingly.Type of change
Affected areas
How to test
Configure
attributeTeamMappingsorattributeBusinessUnitMappingswith the new fields and verify schema validation accepts valid inputs and rejects invalid ones (e.g., anattributeTypevalue outside["user", "group"]or extra properties beyond those declared).Example mapping to validate:
Breaking changes
Related issues
Security considerations
No new auth flows or secrets handling introduced. The new fields extend existing JWT claim-to-team/business-unit mapping logic with SCIM provisioning metadata only.
Checklist
docs/contributing/README.mdand followed the guidelinesSummary by CodeRabbit