Skip to content

feat(xaa): add cross-app access (ID-JAG) tenant config incl. attribute/group mapping - #832

Merged
dorsha merged 11 commits into
mainfrom
feat/xaa
Aug 21, 2026
Merged

feat(xaa): add cross-app access (ID-JAG) tenant config incl. attribute/group mapping#832
dorsha merged 11 commits into
mainfrom
feat/xaa

Conversation

@dorsha

@dorsha dorsha commented Aug 17, 2026

Copy link
Copy Markdown
Member

Required for:
https://github.com/descope/etc/issues/17573

Adds the tenant Cross-App Access (ID-JAG) read model (idJagSettings/idJagEnabled) including the per-issuer JIT + attribute/group-role mapping fields.

dorsha and others added 5 commits August 4, 2026 16:24
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…esponse

Add idJagSettings and idJagEnabled to the Tenant struct so callers of
LoadSettings / LoadAllSettings can read a tenant's Cross-App Access
(XAA / ID-JAG) trust config. The backend LoadSSOSettingsResponse embeds
the Tenant proto, which carries these two fields (JWTBearerSettings +
bool); they were previously silently dropped on unmarshal.

Also complete JWTBearerSettings with the jwt-bearer grant-type selector
fields (audience/scope/custom-claims) that the backend proto carries, so
the full trust config is readable. Read-only additions; no write-path
(makeCreate*/makeUpdate*Request) changes. No int64 fields, so no
json:",string" tags needed.

Co-Authored-By: Claude <noreply@anthropic.com>
…tings

Surfaces the Cross-App Access (ID-JAG) per-issuer JIT + attribute/group-role
mapping (jitDisabled, attributeMapping, roleMappings, defaultSSORoles,
groupsPriority, allowOverrideRoles) on the read model.

Required for: descope/etc#17573

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shuni-bot

shuni-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot

shuni-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

🐕 Suggested Reviewers

This PR introduces Cross-App Access (ID-JAG) tenant configuration with attribute and group mapping capabilities. The changes span from low-level type definitions to SDK interfaces and management logic. The review strategy prioritizes: (1) deep expertise in the core modified areas (group management logic and types), (2) SDK/interface design experience, and (3) SSO/tenant-related testing knowledge. Selected reviewers collectively cover all changed file categories with complementary expertise areas.

Reviewer Reason
shilgapira Primary group.go expert with 5 commits. Essential for reviewing group management logic and group_test changes, which are central to this ID-JAG feature's group-role mapping functionality.
omercnet Top contributor with 9 commits across types.go, mgmt.go, and mocks. Critical for reviewing type definitions and SDK interface changes that establish the tenant configuration model.
aviadl Broad expertise across 4 files including sso_test.go, mgmt.go, types.go, and mocks. Strong fit for SSO tenant configuration context and comprehensive test coverage validation.
itaihanski Balanced experience across group logic (group.go, group_test.go) and SSO testing (sso_test.go). Valuable for reviewing integration between group management and SSO tenant features.

Suggested by Shuni based on git history and PR context. Names are not @-mentioned to avoid notifying anyone — request a review from whoever fits best.

@shuni-bot shuni-bot 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.

🐕 Shuni's Review

This PR adds the tenant Cross-App Access (ID-JAG) read model (idJagEnabled/idJagSettings) plus per-issuer JIT/attribute/group-role mapping fields, and (bundled in) SSO-config-scoped group loading.

No actionable issues survived verification — the new Tenant/IssuerSettings/JWTBearerSettings fields ride the existing generic JSON unmarshal path, the WithSSOID group methods are clean backward-compatible delegations (unfiltered callers still omit ssoId so older backends don't choke on unknown fields), and the shared JWTBearerSettings struct is passed whole into requests elsewhere so new fields flow through automatically. Good bones!

See inline comments for details (none this round). Woof!


Declared coverage: FULL — 6/6 changed files reviewed.

@dorsha dorsha changed the title feat(xaa): Cross-App Access (ID-JAG) tenant config incl. attribute/group mapping feat(xaa): add cross-app access (ID-JAG) tenant config incl. attribute/group mapping Aug 17, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shuni-bot

shuni-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot shuni-bot 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.

🐕 Shuni's Review

Since the last pass, the branch reworked XAA config into a proper per-SSO-config API: ConfigureXAASettings/LoadXAASettings/LoadAllXAASettings/DeleteXAASettings, dropping the per-issuer role/group mapping in favor of a config-level shared mapping (mirrors the SAML settings shape).

No new issues survived verification — the new endpoints, request building, and unmarshal helpers all follow the exact conventions of the existing ConfigureSAMLSettings/ConfigureOIDCSettings/DeleteSettings code, and test coverage for the new methods (success, ssoID variants, missing-arg errors) is solid. group.go/group_test.go are unchanged since the prior review and were skipped accordingly.

Good bones! Woof!


Declared coverage: PARTIAL — 7/9 changed files reviewed.

@dorsha

dorsha commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

@shuni review

@shuni-bot

shuni-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot shuni-bot 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.

🐕 Shuni's Review

This PR adds the tenant Cross-App Access (ID-JAG) read model (idJagEnabled/idJagSettings), per-issuer JIT + attribute mapping fields, and a full per-SSO-config XAA API (ConfigureXAASettings/LoadXAASettings/LoadAllXAASettings/DeleteXAASettings), plus SSO-config-scoped group loading.

No actionable issues survived verification — every new method (ConfigureXAASettings, LoadXAASettings, LoadAllXAASettings, DeleteXAASettings, the WithSSOID group variants) is a byte-for-byte match of the existing ConfigureSAMLSettings/DeleteSettings/group request-building conventions, the new Tenant/IssuerSettings/JWTBearerSettings/SSOXAASettings* fields ride the generic JSON unmarshal path, and the unusual capitalized "XAASettings" JSON key mirrors the pre-existing SSOTenantAllSettingsResponse.SSOSettings precedent. Test coverage for the new surface (success, ssoID variants, missing-arg errors) is solid.

Good bones! Woof!


Declared coverage: FULL — 9/9 changed files reviewed.

Add providerID to SSOXAASettings / SSOXAASettingsResponse and send it on
ConfigureXAASettings (only when set) so the chosen IdP round-trips, mirroring
SSO SAML/OIDC. Matches the backend management API field name providerID.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shuni-bot

shuni-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot shuni-bot 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.

🐕 Shuni Review

Since the last pass, the only change is exposing a selected-IdP ProviderID on the XAA settings write/read types plus 3 lines of request wiring.
Actionable comments posted: 1

  • 1 🟡 Minor: providerID JSON tag casing references a non-existent sibling field
    Merge risk: 🟢 Low: isolated, well-tested addition; the one finding is a casing/verification concern, not a structural issue.
    See inline comments for details.

Declared coverage: PARTIAL — 3/9 changed files reviewed.

Comment thread descope/types.go
@shuni-bot

shuni-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot shuni-bot 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.

🐕 Shuni Review

No new issues found.


Declared coverage: FULL — 7/7 changed files reviewed.

…op tenant idJag

- ConfigureXAASettings ssoID is now optional-last (tenantID, settings, ssoID)
  to match ConfigureSAMLSettings/ConfigureOIDCSettings.
- Add dedicated XAAIssuerSettings/XAAJWTBearerSettings instead of widening the
  shared IssuerSettings/JWTBearerSettings (stops XAA fields leaking into
  SSO-app / third-party-app payloads).
- Remove the read-only Tenant.IDJagSettings/IDJagEnabled fields; XAA is no
  longer surfaced on tenant load (read via the dedicated Load XAA settings API).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shuni-bot

shuni-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot shuni-bot 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.

🐕 Shuni Review

Since the last pass, XAA settings were refactored to dedicated XAAIssuerSettings/XAAJWTBearerSettings types, ConfigureXAASettings had its settings/ssoID params reordered, and the tenant-level IDJagEnabled/IDJagSettings read model was dropped.

Actionable comments posted: 1

  • 1 🟠 Major: README's XAA example wasn't updated for this refactor and no longer compiles

Merge risk: 🟡 Moderate: the SDK code/tests are internally consistent, but the primary onboarding doc for this brand-new feature is broken.

See inline comments for details.


Declared coverage: FULL — 7/7 changed files reviewed.

Comment thread README.md Outdated
…ctor

- Pass settings before the optional ssoID to match the new signature
  ConfigureXAASettings(ctx, tenantID, settings, ssoID).
- Use the dedicated XAAJWTBearerSettings / XAAIssuerSettings types.
- Drop the tenant-load XAA snippet: idJagSettings/idJagEnabled are no longer
  exposed on Tenant().Load after the XAA/tenant decoupling (read via the
  dedicated LoadXAASettings API).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shuni-bot

shuni-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot shuni-bot 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.

🐕 Shuni Review

No new issues found.


Declared coverage: PARTIAL — 1/7 changed files reviewed.

…the XAA API

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shuni-bot

shuni-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot shuni-bot 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.

🐕 Shuni Review

No new issues found.


Declared coverage: PARTIAL — 1/7 changed files reviewed.

@dorsha
dorsha enabled auto-merge (squash) August 21, 2026 08:27
@dorsha
dorsha merged commit 1bf6f14 into main Aug 21, 2026
16 checks passed
@dorsha
dorsha deleted the feat/xaa branch August 21, 2026 08:46
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