generalbots/botbook/src/09-security
Rodrigo Rodriguez (Pragmatismo) 037db5c381 feat: Major workspace reorganization and documentation update
- Add comprehensive documentation in botbook/ with 12 chapters
- Add botapp/ Tauri desktop application
- Add botdevice/ IoT device support
- Add botlib/ shared library crate
- Add botmodels/ Python ML models service
- Add botplugin/ browser extension
- Add botserver/ reorganized server code
- Add bottemplates/ bot templates
- Add bottest/ integration tests
- Add botui/ web UI server
- Add CI/CD workflows in .forgejo/workflows/
- Add AGENTS.md and PROD.md documentation
- Add dependency management scripts (DEPENDENCIES.sh/ps1)
- Remove legacy src/ structure and migrations
- Clean up temporary and backup files
2026-04-19 08:14:25 -03:00
..
api-endpoints.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
bot-auth.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
compliance-requirements.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
endpoint-checklist.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
initial-setup.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
kb-permissions.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
kb-security.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
organizations.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
password-security.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
permissions-compliance.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
permissions-matrix.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
permissions-reference.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
protection-tools.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
rbac-configuration.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
rbac-design.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
rbac-overview.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
README.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
security-checklist.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
security-features.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
security-matrix.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
security-policy.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
soc2-compliance.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
system-limits.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
user-auth.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
user-system-context.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00

Chapter 9: Security

This chapter covers advanced security topics for General Bots.

Overview

General Bots implements a comprehensive security model designed for enterprise deployments:

  • Multi-tenant Architecture: Support for multiple organizations with complete data isolation
  • Role-Based Access Control (RBAC): Fine-grained permissions at every level
  • Knowledge Base Security: Folder-level permissions with Qdrant vector search integration
  • SOC 2 Type II Compliance: Enterprise-grade security controls and audit logging

Security Layers

┌─────────────────────────────────────────────────────────────┐
│                    Organization Layer                        │
│  ┌─────────────────────────────────────────────────────┐    │
│  │                    Bot Layer                         │    │
│  │  ┌─────────────────────────────────────────────┐    │    │
│  │  │              App Layer                       │    │    │
│  │  │  ┌─────────────────────────────────────┐    │    │    │
│  │  │  │        Resource Layer                │    │    │    │
│  │  │  │  (KB folders, files, data)          │    │    │    │
│  │  │  └─────────────────────────────────────┘    │    │    │
│  │  └─────────────────────────────────────────────┘    │    │
│  └─────────────────────────────────────────────────────┘    │
└─────────────────────────────────────────────────────────────┘

Key Concepts

Organizations

Organizations are the top-level tenant in General Bots. Each organization has:

  • Its own subscription and billing
  • Isolated user base and permissions
  • Separate bots and knowledge bases
  • Independent quota management

Users can belong to multiple organizations and switch between them.

Roles and Permissions

General Bots uses a role-based model with predefined roles:

Role Description
Global Admin Full access to all resources
Billing Admin Manage subscriptions and payments
User Admin Manage users, groups, and role assignments
Bot Admin Create and configure bots
KB Manager Manage knowledge bases and permissions
App Developer Create and publish apps (Forms, Sites, Projects)
Editor Edit content and use apps
Viewer Read-only access

Knowledge Base Security

KB folders can have individual permission settings:

  • Public: Anyone can access
  • Authenticated: Logged-in users only
  • Role-based: Users with specific roles
  • Group-based: Users in specific groups
  • User-based: Named individual users

These permissions are enforced during vector search, ensuring users only see content they're authorized to access.

In This Chapter

Best Practices

  1. Principle of Least Privilege: Assign the minimum permissions necessary
  2. Use Groups: Manage permissions through groups rather than individual users
  3. Regular Audits: Review permissions and access logs periodically
  4. Secure KB by Default: Set restrictive default permissions on sensitive folders
  5. Enable Audit Logging: Track all permission changes and access attempts