Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Map AD/Okta groups to Glean document permissions using allowedGroups. Trigger: "glean enterprise rbac", "enterprise-rbac".
.claude/skills/jeremylongshore-glean-enterprise-rbac/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -24% | 0% |
Glean's enterprise search aggregates content from dozens of connectors (Google Drive, Confluence, Slack, Salesforce). RBAC ensures users only see documents they are authorized to access. Permissions flow from source systems through connector-level ACLs into Glean's unified index. Misconfigured permissions mean search results leak sensitive data across teams. SOC 2 and GDPR compliance require document-level access control and full audit trails on who searched what.
| Role | Permissions | Scope | |------|------------|-------| | Super Admin | Create API tokens, manage all connectors, configure SSO | Organization-wide | | Admin | Add/edit datasources, manage user groups, view analytics | Assigned datasources | | Content Manager | Set document permissions, manage allowedGroups per datasource | Own datasources | | User | Search and view permitted documents | Documents matching ACLs | | Viewer | Search only, no document previews or snippets | Restricted document set |
typescriptasync function checkDocumentAccess(userId: string, documentId: string): Promise<boolean> { const response = await fetch(`${GLEAN_API}/permissions/check`, { method: 'POST', headers: { Authorization: `Bearer ${GLEAN_API_TOKEN}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ userId, documentId }), }); const result = await response.json(); return result.hasAccess ?? false; }
typescriptasync function assignDatasourceRole(email: string, datasource: string, role: 'admin' | 'viewer'): Promise<void> { await fetch(`${GLEAN_API}/datasources/${datasource}/permissions`, { method: 'PUT', headers: { Authorization: `Bearer ${GLEAN_API_TOKEN}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ user: email, role, allowedGroups: [`${datasource}-${role}s`] }), }); } async function revokeDatasourceAccess(email: string, datasource: string): Promise<void> { await fetch(`${GLEAN_API}/datasources/${datasource}/permissions/${email}`, { method: 'DELETE', headers: { Authorization: `Bearer ${GLEAN_API_TOKEN}` }, }); }
typescriptinterface GleanAuditEntry { timestamp: string; userId: string; action: 'search' | 'view' | 'index' | 'permission_change'; datasource: string; query?: string; documentId?: string; result: 'allowed' | 'denied'; } function logSearchAccess(entry: GleanAuditEntry): void { console.log(JSON.stringify({ ...entry, org: process.env.GLEAN_ORG_ID })); }
| Issue | Cause | Fix | |-------|-------|-----| | User sees documents from wrong team | AllowedGroups not mapped to connector | Reconfigure connector ACL mapping in admin console | | 403 Forbidden on search API | Expired or wrong-scope API token | Regenerate token with correct datasource scope | | Stale permissions after IdP change | Connector sync lag | Trigger manual resync from Glean admin | | Missing search results | Overly restrictive allowedGroups | Audit group membership against source system ACLs |
See glean-security-basics.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 18,372 | 19,833 | +8% | 1 | 1 | 0% | 3,841 | 4,364 | +14% | 0 | 0 | — |
case-02 | fail→fail | 26,775 | 14,978 | -44% | 1 | 1 | 0% | 3,584 | 3,896 | +9% | 0 | 0 | — |
case-03 | fail→pass | 25,890 | 18,603 | -28% | 1 | 1 | 0% | 3,610 | 4,347 | +20% | 0 | 0 | — |
case-04 | fail→pass | 14,989 | 8,126 | -46% | 1 | 1 | 0% | 1,720 | 1,579 | -8% | 0 | 0 | — |
case-05 | fail→fail | 7,713 | 9,756 | +26% | 1 | 1 | 0% | 921 | 1,592 | +73% | 0 | 0 | — |
case-06 | fail→pass | 12,630 | 7,036 | -44% | 1 | 1 | 0% | 1,386 | 1,346 | -3% | 0 | 0 | — |
case-07 | pass→pass | 15,710 | 8,423 | -46% | 1 | 1 | 0% | 2,190 | 1,799 | -18% | 0 | 0 | — |
case-08 | pass→pass | 9,755 | 4,678 | -52% | 1 | 1 | 0% | 2,066 | 1,977 | -4% | 0 | 0 | — |
case-09 | fail→pass | 11,028 | 4,465 | -60% | 1 | 1 | 0% | 2,199 | 1,672 | -24% | 0 | 0 | — |
case-10 | fail→pass | 15,327 | 2,415 | -84% | 1 | 1 | 0% | 2,081 | 1,479 | -29% | 0 | 0 | — |
case-11 | fail→pass | 11,228 | 7,274 | -35% | 1 | 1 | 0% | 2,378 | 1,452 | -39% | 0 | 0 | — |
case-12 | fail→pass | 16,519 | 2,389 | -86% | 1 | 1 | 0% | 2,266 | 1,511 | -33% | 0 | 0 | — |
case-13 | fail→fail | 8,533 | 6,906 | -19% | 1 | 1 | 0% | 1,867 | 1,350 | -28% | 0 | 0 | — |
case-14 | pass→pass | 13,309 | 3,393 | -75% | 1 | 1 | 0% | 1,623 | 1,501 | -8% | 0 | 0 | — |
case-15 | fail→pass | 11,730 | 2,389 | -80% | 1 | 1 | 0% | 1,819 | 1,304 | -28% | 0 | 0 | — |
case-16 | pass→pass | 18,101 | 7,388 | -59% | 1 | 1 | 0% | 1,928 | 1,259 | -35% | 0 | 0 | — |
case-17 | pass→pass | 16,538 | 8,898 | -46% | 1 | 1 | 0% | 1,865 | 1,567 | -16% | 0 | 0 | — |
case-18 | pass→pass | 12,352 | 14,212 | +15% | 1 | 1 | 0% | 2,051 | 2,444 | +19% | 0 | 0 | — |
case-19 | fail→pass | 14,388 | 6,572 | -54% | 1 | 1 | 0% | 1,418 | 1,129 | -20% | 0 | 0 | — |
case-20 | fail→fail | 21,423 | 14,492 | -32% | 1 | 1 | 0% | 2,851 | 3,649 | +28% | 0 | 0 | — |
case-21 | fail→fail | 14,034 | 15,684 | +12% | 1 | 1 | 0% | 2,605 | 3,937 | +51% | 0 | 0 | — |
case-22 | fail→fail | 13,506 | 14,765 | +9% | 1 | 1 | 0% | 2,638 | 2,948 | +12% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +45 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.