AGENT SKILL

twinmind-enterprise-rbac

Implement enterprise role-based access control for TwinMind. Use when setting up team permissions, configuring SSO/SAML, or implementing organization-level access policies. Trigger with phrases like "twinmind RBAC", "twinmind permissions", "twinmind enterprise access", "twinmind SSO", "twinmind team management".

License 许可
MIT
最近更新
2026-05-26
Stars
★ 0
Forks
0

01 前言 Front Matter

name
twinmind-enterprise-rbac
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
version
1.0.0
description
Implement enterprise role-based access control for TwinMind. Use when setting up team permissions, configuring SSO/SAML, or implementing organization-level access policies. Trigger with phrases like "twinmind RBAC", "twinmind permissions", "twinmind enterprise access", "twinmind SSO", "twinmind team management".
allowed-tools
Read, Write, Edit
compatible-with
claude-code, codex, openclaw

02 资源文件 1

03 SKILL.md 正文

TwinMind Enterprise RBAC

Contents

Overview

Enterprise-grade role-based access control for TwinMind with SSO/SAML integration, team management, resource-level authorization, and access audit logging.

Prerequisites

  • TwinMind Enterprise account
  • Admin access to TwinMind organization
  • Identity provider (Okta, Azure AD, Google Workspace)
  • Understanding of RBAC concepts

Instructions

Step 1: Define Roles and Permissions

Create Permission enum covering transcript, summary, action item, team, settings, billing, and admin permissions. Define role hierarchy: Viewer -> Member -> Manager -> Admin -> Owner with permission inheritance via resolvePermissions().

Step 2: Implement Permission Checking

Build AuthorizationService with hasPermission(), hasAnyPermission(), hasAllPermissions() methods. Support admin wildcard, explicit deny lists, and resource-level authorization (own transcripts vs all transcripts).

Step 3: Configure SSO/SAML Integration

Set up SAML strategy with passport-saml. Map IdP attributes (email, name, groups) to TwinMind users. Configure group-to-role mapping (e.g., "TwinMind-Admins" -> admin role).

Step 4: Team Management

Build TeamManager with create team, add/remove/invite members, role updates, and sync to TwinMind organization. Enforce permission checks on team operations.

Step 5: Access Audit Logging

Create AccessAuditLogger that records all access attempts (granted and denied) with user, action, resource, IP, and user agent. Send to SIEM if configured. Add Express middleware for automatic audit trail.

See detailed implementation for complete RBAC code including Permission enum, role definitions, SSO config, team management, and audit logging.

Output

  • Role and permission definitions
  • Permission checking service
  • SSO/SAML configuration
  • Team management functionality
  • Access audit logging

Error Handling

Issue Cause Solution
SSO login failed Certificate mismatch Update IdP certificate
Role not syncing SCIM misconfigured Check provisioning setup
Permission denied Wrong role assigned Review role mapping
Audit gaps Middleware not applied Add to all routes

Examples

Basic usage: Apply twinmind enterprise rbac to a standard project setup with default configuration options.

Advanced scenario: Customize twinmind enterprise rbac for production environments with multiple constraints and team-specific requirements.

Resources

Next Steps

For migration from other tools, see twinmind-migration-deep-dive.

04 同仓库更多 Skills

SamuelChien
SamuelChien/mega-skills-collection

zustand-store-ts

Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zustand-store-creator

Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zero-trust-config-helper

Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zapier-integration-helper

Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zai-cli

Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

yt-research

Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.

★ 0