Skip to content

feat(teams): migrate MS Teams trust config to first-class [teams] section (Phase 1) #1360

Description

@chaodu-agent

Summary

Migrate MS Teams adapter trust configuration from gateway env vars to a first-class [teams] section in config.toml.

Current State

  • Gateway env vars only (GATEWAY_ALLOW_ALL_USERS, GATEWAY_ALLOWED_USERS)
  • No per-platform granularity for Teams

Target State

[teams]
allowed_users = ["29:1abc...", "29:2def..."]
trusted_bot_ids = ["28:bot-id"]
# allow_all_users = true  # explicit opt-in only

Tasks

  • Add [teams] section to config schema
  • Wire Teams trust through PlatformTrustConfigs registry
  • is_bot derivation: activity.from.role == "bot" or trusted_bot_ids.contains(activity.from.id)
  • Deny-echo via Bot Framework sendToConversation
  • Deprecate gateway env vars for Teams
  • Update docs and config.toml.example

Notes

  • Sender ID format: activity.from.id (e.g., "29:1abc...") — may differ from AAD Object ID
  • L1 auth: JWT (OpenID Connect) RS256 verified via Bot Framework OpenID metadata + JWKS
  • Verify sender ID format from actual event payloads before finalizing config format

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