Ctrl + k

or run

tessl search
Log in

groq-enterprise-rbac

tessl install github:jeremylongshore/claude-code-plugins-plus-skills --skill groq-enterprise-rbac
github.com/jeremylongshore/claude-code-plugins-plus-skills

Configure Groq enterprise SSO, role-based access control, and organization management. Use when implementing SSO integration, configuring role-based permissions, or setting up organization-level controls for Groq. Trigger with phrases like "groq SSO", "groq RBAC", "groq enterprise", "groq roles", "groq permissions", "groq SAML".

Review Score

84%

Validation Score

12/16

Implementation Score

73%

Activation Score

100%

Groq Enterprise RBAC

Overview

Configure enterprise-grade access control for Groq integrations.

Prerequisites

  • Groq Enterprise tier subscription
  • Identity Provider (IdP) with SAML/OIDC support
  • Understanding of role-based access patterns
  • Audit logging infrastructure

Role Definitions

RolePermissionsUse Case
AdminFull accessPlatform administrators
DeveloperRead/write, no deleteActive development
ViewerRead-onlyStakeholders, auditors
ServiceAPI access onlyAutomated systems

Role Implementation

enum GroqRole {
  Admin = 'admin',
  Developer = 'developer',
  Viewer = 'viewer',
  Service = 'service',
}

interface GroqPermissions {
  read: boolean;
  write: boolean;
  delete: boolean;
  admin: boolean;
}

const ROLE_PERMISSIONS: Record<GroqRole, GroqPermissions> = {
  admin: { read: true, write: true, delete: true, admin: true },
  developer: { read: true, write: true, delete: false, admin: false },
  viewer: { read: true, write: false, delete: false, admin: false },
  service: { read: true, write: true, delete: false, admin: false },
};

function checkPermission(
  role: GroqRole,
  action: keyof GroqPermissions
): boolean {
  return ROLE_PERMISSIONS[role][action];
}

SSO Integration

SAML Configuration

// Groq SAML setup
const samlConfig = {
  entryPoint: 'https://idp.company.com/saml/sso',
  issuer: 'https://groq.com/saml/metadata',
  cert: process.env.SAML_CERT,
  callbackUrl: 'https://app.yourcompany.com/auth/groq/callback',
};

// Map IdP groups to Groq roles
const groupRoleMapping: Record<string, GroqRole> = {
  'Engineering': GroqRole.Developer,
  'Platform-Admins': GroqRole.Admin,
  'Data-Team': GroqRole.Viewer,
};

OAuth2/OIDC Integration

import { OAuth2Client } from '@groq/sdk';

const oauthClient = new OAuth2Client({
  clientId: process.env.GROQ_OAUTH_CLIENT_ID!,
  clientSecret: process.env.GROQ_OAUTH_CLIENT_SECRET!,
  redirectUri: 'https://app.yourcompany.com/auth/groq/callback',
  scopes: ['read', 'write'],
});

Organization Management

interface GroqOrganization {
  id: string;
  name: string;
  ssoEnabled: boolean;
  enforceSso: boolean;
  allowedDomains: string[];
  defaultRole: GroqRole;
}

async function createOrganization(
  config: GroqOrganization
): Promise<void> {
  await groqClient.organizations.create({
    ...config,
    settings: {
      sso: {
        enabled: config.ssoEnabled,
        enforced: config.enforceSso,
        domains: config.allowedDomains,
      },
    },
  });
}

Access Control Middleware

function requireGroqPermission(
  requiredPermission: keyof GroqPermissions
) {
  return async (req: Request, res: Response, next: NextFunction) => {
    const user = req.user as { groqRole: GroqRole };

    if (!checkPermission(user.groqRole, requiredPermission)) {
      return res.status(403).json({
        error: 'Forbidden',
        message: `Missing permission: ${requiredPermission}`,
      });
    }

    next();
  };
}

// Usage
app.delete('/groq/resource/:id',
  requireGroqPermission('delete'),
  deleteResourceHandler
);

Audit Trail

interface GroqAuditEntry {
  timestamp: Date;
  userId: string;
  role: GroqRole;
  action: string;
  resource: string;
  success: boolean;
  ipAddress: string;
}

async function logGroqAccess(entry: GroqAuditEntry): Promise<void> {
  await auditDb.insert(entry);

  // Alert on suspicious activity
  if (entry.action === 'delete' && !entry.success) {
    await alertOnSuspiciousActivity(entry);
  }
}

Instructions

Step 1: Define Roles

Map organizational roles to Groq permissions.

Step 2: Configure SSO

Set up SAML or OIDC integration with your IdP.

Step 3: Implement Middleware

Add permission checks to API endpoints.

Step 4: Enable Audit Logging

Track all access for compliance.

Output

  • Role definitions implemented
  • SSO integration configured
  • Permission middleware active
  • Audit trail enabled

Error Handling

IssueCauseSolution
SSO login failsWrong callback URLVerify IdP config
Permission deniedMissing role mappingUpdate group mappings
Token expiredShort TTLRefresh token logic
Audit gapsAsync logging failedCheck log pipeline

Examples

Quick Permission Check

if (!checkPermission(user.role, 'write')) {
  throw new ForbiddenError('Write permission required');
}

Resources

  • Groq Enterprise Guide
  • SAML 2.0 Specification
  • OpenID Connect Spec

Next Steps

For major migrations, see groq-migration-deep-dive.