notion-enterprise-rbac

Featured

Configure Notion enterprise access control with OAuth, workspace permissions, and audit logging. Use when implementing OAuth public integrations, managing multi-workspace access, or building permission-aware Notion applications. Trigger with phrases like "notion SSO", "notion RBAC", "notion enterprise", "notion OAuth", "notion permissions", "notion multi-workspace".

AI & Automation 2,249 stars 312 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Notion Enterprise RBAC ## Overview Implement enterprise-grade access control for Notion integrations. This covers the full OAuth 2.0 authorization flow for public integrations (multi-tenant), per-workspace token storage with encryption at rest, Notion's page-level permission model and how to handle `ObjectNotFound` vs `RestrictedResource`, an application-level role system (admin/editor/viewer) layered on top of Notion's permissions, comprehensive audit logging to a Notion database, and workspace deauthorization cleanup. ## Prerequisites - Notion public integration created at https://www.notion.so/my-integrations (for OAuth) - `@notionhq/client` v2+ installed (`npm install @notionhq/client`) - Python alternative: `notion-client` (`pip install notion-client`) - Database for storing per-workspace tokens (PostgreSQL, DynamoDB, etc.) - HTTPS endpoint for OAuth callback (required by Notion) ## Instructions ### Step 1: OAuth 2.0 Authorization Flow Notion uses OAuth 2.0 for public integrations to access external workspaces: ```typescript import { Client } from '@notionhq/client'; import crypto from 'crypto'; // Step 1: Build the authorization URL function getAuthorizationUrl(state: string): string { const params = new URLSearchParams({ client_id: process.env.NOTION_OAUTH_CLIENT_ID!, response_type: 'code', owner: 'user', // 'user' = user-level token, 'workspace' = workspace-level redirect_uri: process.env.NOTION_REDIRECT_URI!, state, ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Related Skills