Skip to content

feat(slack): add Enterprise Grid workspace_users support (Phase 1) #1361

Description

@chaodu-agent

Summary

Enhance the existing [slack] config section with Enterprise Grid workspace_users support for per-workspace trust scoping.

Current State

  • [slack] section exists with basic allowed_users
  • No per-workspace scoping for Enterprise Grid deployments
  • Single-workspace Slack works fine

Target State

# Single-workspace (unchanged):
[slack]
allowed_users = ["U01ABCDEFGH", "U09XYZWVUTS"]

# Enterprise Grid — workspace-scoped:
[slack]
allowed_users = ["E0123456789"]   # enterprise_user.id (cross-workspace)

[slack.workspace_users]
T012345 = ["U01ABCDEFGH", "U01IJKLMNOP"]  # workspace-specific overrides
T067890 = ["U09XYZWVUTS"]

Tasks

  • Wire Slack through the PlatformTrustConfigs registry (feat(trust): Phase 1 (slack) — L3 identity via shared gate #1363 — registry entry + redundant-but-matching gate_incoming in the adapter)
  • Add workspace_users to [slack] config schema
  • Implement SlackTrustConfig::decide() with workspace-scoped logic
  • workspace_users = strict override (ignore allow_all_users for that workspace)
  • Support team_id:user_id composite key format in base allowed_users fallback
  • Receiver sets workspace_id = Some(team_id) for Grid deployments
  • Prefer enterprise_user.id as sender_id when available
  • Update docs and config.toml.example

Design Decisions (per ADR)

  • workspace_users present for a workspace → strict per-workspace check (ignores allow_all_users)
  • No workspace_users entry → fallback to base config
  • Base fallback checks both plain sender_id AND composite "team_id:sender_id" format
  • Rate-limit key includes workspace_id: (platform, workspace_id, sender_id)

Refs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions