Attribute-Based Access Control
From Mattermost v10.9, system admins in large or complex organizations who require Zero Trust Security when handling with sensitive information can prevent unauthorized access through attribute-based access controls.
Enforcing strict access controls based on user attributes eliminates manual role adjustment processes that can lead to security risks, inefficiencies, or inappropriate access, while maintaining security and compliance by ensuring that only authorized users can access specific private Mattermost channels and teams. On public channels and teams, policies are advisory rather than a gate — see the advisory and strict behaviour described below.
Attribute-based access control (ABAC) can be used with the following policy types:
- System-wide access policies (managed by System Admins): Centralized policies created in the System Console that can be applied across multiple channels and teams. See System-wide attribute-based access policies.
- Permission policies (managed by System Admins): Attribute-based restrictions on user actions such as file upload, file download, and burn-on-read message creation. See Permission policies.
- Team membership policies (managed by System Admins and Team Admins): Attribute-based rules that control who can join a team. On private teams, rules gate directory visibility, join evaluation, and removal at sync (strict mode). On public teams, rules drive a "Recommended" tag and optional auto-add without restricting access (advisory mode). See Team membership access policies.
- Team-scoped channel membership policies (managed by Team Admins): Channel membership policies that Team Admins can create, edit, and delete directly from the Channel Membership tab in Team Settings for channels in their team. See Team-level channel membership policies.
- Channel-specific access rules (managed by Channel Admins): Self-service access rules that Channel Admins can configure directly in Channel Settings for individual channels. See Channel-specific access rules.
Rules compare a user's attributes with the values you choose. From Mattermost v12.0, a rule can also use hierarchical attributes, where values are nested (such as a region and the countries in it), and can compare a user's attributes with the attributes of the channel being accessed. See Access policy expressions for everything a rule can contain.
From Mattermost v11.8, ABAC policies can be applied to both private and public channels, with deliberately different semantics for each:
- Private channels are hard-gated by the policy. Non-matching members are removed during synchronization and only matching users can be added or invited.
- Public channels are advisory. Anyone can still join freely, no member is ever removed by ABAC, and the policy is used either to auto-add matching users (when enabled) or to recommend the channel under Browse Channels > Recommended channels (when auto-add is disabled).
Default channels (Town Square, Off-Topic), shared channels, and group-synced channels remain ineligible.
From Mattermost v11.10, ABAC policies can also be applied to teams, with the same advisory/strict model keyed on whether the team is public or private. See Team membership access policies for details.
Before you begin
Attribute-based access controls require defined user attributes that are either synchronized from an external system (such as LDAP or SAML) or manually configured and enabled on your Mattermost server. You'll need to configure user attributes in the System Console first before creating access policies. See Attribute management for Mattermost v12.0 and later, or User attributes for earlier releases.
Each attribute's Who can set the value setting in Attribute Management controls whether users can set their own value (Member) or only system admins can (System Administrator). Admin-managed attributes can be used in access rules alongside attributes synchronized from AD/LDAP or SAML.
Bot accounts are evaluated against the same attributes, so populate attribute values for any bots that need access as well as for users. From Mattermost v12.1, you can set bot attribute values from Integrations > Bot Accounts. See Bot attributes.
Once user attributes are defined, go to System Console > System Attributes > Attribute-Based Access and enable Allow attribute based access controls on this server. The Membership Policies and Permission Policies pages then appear under System Attributes. This functionality requires a Mattermost Entry or Enterprise Advanced license. See System attributes configuration settings for this setting and the others on that page.
From Mattermost v10.11, user-managed attributes are excluded from attribute-based access control (ABAC) rules for security reasons. This prevents access control policies from being circumvented by users editing their own profile attributes.
From Mattermost v12, permission policies can also evaluate session attributes - per-session context such as the client's IP address, network interface type, VPN status, and device posture - alongside user attributes. Each session attribute must be enabled in System Console > System Attributes > Session Attributes before a rule can reference it.
Configure access policies
Once enabled, you have multiple ways to configure access policies in Mattermost:
From Mattermost v11.7, admins can configure permission policies for file upload and file download. From v11.8, membership policies can be applied to both public and private channels, and permission policies can be simulated before saving.
System Admins can:
- Create system-wide access policies that can be assigned across multiple channels and teams in the System Console. Membership policies can be applied to both public and private channels, with advisory behavior on public channels.
- Assign individual channel policies to specific channels in the System Console.
- Assign membership policies to teams via the per-team System Console page, with advisory enforcement on public teams and strict enforcement on private teams.
- Define permission policies that restrict actions such as file upload, file download, and burn-on-read message creation based on user attributes.
- Simulate permission policies to preview whether selected users could upload or download files before saving policy changes.
Team Admins can:
- View the system policy applied to their team and configure custom team membership rules directly from the Team Membership tab in Team Settings, when granted the
manage_team_access_rulespermission. - Create and manage team-level channel membership policies from the Channel Membership tab in Team Settings, scoping attribute-based rules to one or more channels within their team.
Channel Admins can:
- Configure channel-specific access rules directly in Channel Settings without requiring a system admin.