Skip to main content

System attributes configuration settings

System attributes are the attributes Mattermost stores for users and channels, and the access policies that use them. Review and manage them in the System Console by selecting the Product Navigate between Channels, collaborative playbooks, and boards using the product menu icon. menu, selecting System Console, and then selecting System Attributes. The section contains the following pages:

  • Attribute Management: From Mattermost v12.0, define an attribute once and choose the resources it applies to, such as users and channels. Requires Mattermost Entry, Enterprise, or Enterprise Advanced. See Attribute management and Channel attributes. Before v12.0, user attributes were managed on a User Attributes page. See User attributes (before v12.0).
  • Session Attributes: Choose which details of a user's current connection, such as IP address, VPN status, and device posture, permission policies can check. Requires Mattermost Entry or Enterprise Advanced. See Session attributes.
  • Attribute-Based Access: Turn attribute-based access control (ABAC) on and configure how it behaves. Requires Mattermost Entry or Enterprise Advanced. The settings on this page are described below.
  • Membership Policies: Create system-wide policies that control who can be a member of channels and teams. Shown once attribute-based access control is enabled. See System-wide attribute-based access policies.
  • Permission Policies: Create policies that control who can upload and download files. Shown once attribute-based access control is enabled. See Permission policies.

Attribute-Based Access​

Access the following configuration settings in the System Console by going to System Attributes > Attribute-Based Access. Some of these settings have no System Console option and can only be changed in the config.json file or with an environment variable. Each one is marked N/A under System Config path.

Enable attribute-based access control​

Turns attribute-based access control on or off for the whole server. In the System Console, this setting is labeled Allow attribute based access controls on this server.

  • true: Access policies are enforced, the Membership Policies and Permission Policies pages appear under System Attributes, and membership sync jobs run on their schedule.
  • false: (Default) Access policies aren't enforced and the policy pages are hidden. Policies you've already created are kept, and apply again when you turn the setting back on.

Define attributes in Attribute Management before you write policies. See Attribute-based access control.

  • System Config path: System Attributes > Attribute-Based Access
  • config.json setting: AccessControlSettings > EnableAttributeBasedAccessControl > false
  • Environment variable: MM_ACCESSCONTROLSETTINGS_ENABLEATTRIBUTEBASEDACCESSCONTROL

Show channel access indicators​

Controls whether end users can see which attributes a channel's membership policy requires. In the System Console, this setting is labeled Show channel access indicators to end users.

  • true: (Default) In a channel with a membership policy, the attributes the policy requires are shown as tags in the channel members list and in the dialog for adding people to the channel.
  • false: The tags are hidden, and the server no longer returns the attributes to end users. Disable this setting if you don't want to reveal the details of your policies.

The System Console option is available only when attribute-based access control is enabled.

  • System Config path: System Attributes > Attribute-Based Access
  • config.json setting: AccessControlSettings > EnableChannelPolicyIndicators > true
  • Environment variable: MM_ACCESSCONTROLSETTINGS_ENABLECHANNELPOLICYINDICATORS

Trust proxy device identity header​

Lets a reverse proxy tell Mattermost which device a request comes from, for use in permission policies that check session attributes.

  • true: Mattermost fills the tls_device_id session attribute from the X-Mattermost-Session-Attribute-Device-Id request header. A proxy that uses client TLS certificates can set this header to assert a device identity the client can't forge.
  • false: (Default) The header is ignored and tls_device_id is never set.

Only enable this when every connection to Mattermost goes through a proxy you control, and that proxy removes or overwrites the header on incoming requests. Otherwise any client can set its own device identity. See Trust proxy device identity header on the session attributes page.

The System Console option appears under Session Attributes on the Attribute-Based Access page, and is available only when attribute-based access control is enabled. Cloud admins can't modify this configuration setting.

  • System Config path: System Attributes > Attribute-Based Access
  • config.json setting: AccessControlSettings > TrustProxyDeviceIdentityHeader > false
  • Environment variable: MM_ACCESSCONTROLSETTINGS_TRUSTPROXYDEVICEIDENTITYHEADER

Enforce device ID consistency​

Ends a session if the device it reports changes partway through. Mattermost compares the tls_device_id, client_device_id, and hardware_id session attributes with the values it already holds for the session.

  • true: If one of these identifiers changes, Mattermost revokes the session, the user has to log in again, and the revocation is recorded in the audit log. This limits what someone can do with a stolen session token from another device. A request that reports no identifier, or a session that has no identifier stored yet, isn't affected.
  • false: (Default) A new identifier replaces the stored one and the session continues.

Before you enable this setting, check that the identifiers you rely on stay the same on your users' devices. An identifier that changes for a legitimate reason logs the user out. See Enforce device ID consistency on the session attributes page.

The System Console option appears under Session Attributes on the Attribute-Based Access page, and is available only when attribute-based access control is enabled. Cloud admins can't modify this configuration setting.

  • System Config path: System Attributes > Attribute-Based Access
  • config.json setting: AccessControlSettings > EnforceDeviceIDConsistency > false
  • Environment variable: MM_ACCESSCONTROLSETTINGS_ENFORCEDEVICEIDCONSISTENCY

Enable audit logging for membership policy decisions​

Records each change that a membership policy makes to a channel or team in the audit log.

  • true: Every time a membership sync job adds a user to a channel or team, or removes one, because of a membership policy, Mattermost writes an audit record for that user. A record names the job, the policy and its revision, the channel or team, and the reason for the change. See What gets recorded below.
  • false: (Default) Policy-driven membership changes aren't written to the audit log.

This setting needs an active audit log target: either file audit logging or an advanced audit logging target. See Audit logging. The System Console option is available only when attribute-based access control is enabled and audit logging is active. If you enable the setting in config.json without an active audit log target, nothing is recorded, and the server logs a warning when it starts. Cloud admins can't modify this configuration setting.

  • System Config path: System Attributes > Attribute-Based Access
  • config.json setting: AccessControlSettings > EnableAccessControlAuditLogging > false
  • Environment variable: MM_ACCESSCONTROLSETTINGS_ENABLEACCESSCONTROLAUDITLOGGING

What gets recorded​

Each record covers one user and one channel or team. Mattermost records these events:

EventWhen it's recorded
channelMembershipAddedA sync job added a user to a channel because they match its policy.
channelMembershipRemovedA sync job removed a user from a channel because they no longer match its policy.
teamMembershipAddedA sync job added a user to a team because they match its policy.
teamMembershipRemovedA sync job removed a user from a team because they no longer match its policy.
teamCascadedChannelRemovalA user removed from a team by its policy was also removed from one of the team's channels. One record is written for each channel.

Every record includes the reason for the change: matches-policy for an addition, no-longer-matches for a removal, or team-removal-cascade for a channel removal that followed a team removal. The channel records that follow a team removal point back to the team removal record, so you can trace them together. See Access control membership events for every field in the record.

Only membership changes are recorded. Individual permission decisions, such as whether a user may upload or download a file, aren't written to the audit log.

Sync job interval​

How often, in seconds, Mattermost runs the scheduled membership sync for channels and teams. Each run applies the membership policies again: it adds and removes members as the policies require, and picks up attribute changes such as those synced from AD/LDAP or SAML. The same interval is used for the channel sync job (access_control_sync) and the team sync job (access_control_team_sync). Saving a policy can also start a sync straight away, whatever the interval.

Numerical input in seconds. Default is 3600 seconds (60 minutes). The minimum is 60 seconds; a lower value is rejected. A change takes effect after the server is restarted.

This setting has no System Console option. Cloud admins can't modify this configuration setting.

  • System Config path: N/A
  • config.json setting: AccessControlSettings > SyncJobIntervalSeconds > 3600
  • Environment variable: MM_ACCESSCONTROLSETTINGS_SYNCJOBINTERVALSECONDS

Attribute refresh interval​

Controls how quickly attribute changes reach the searches that access control runs. Mattermost keeps a copy of user and channel attribute values for finding the users who match a rule and for reading a channel's attributes, and refreshes that copy at most once in this interval. After a user or channel attribute changes, it can take up to this long before the change shows in:

  • The people offered when adding members to a channel with a membership policy.
  • The results of testing or simulating a rule.
  • Checks against rules that use channel attributes.

Membership sync jobs always read the latest values.

Numerical input in seconds. Default is 30 seconds. Set it to 0 to refresh the copy before every search. Results are then always current, but busy servers do more database work.

This setting has no System Console option. Cloud admins can't modify this configuration setting.

  • System Config path: N/A
  • config.json setting: AccessControlSettings > AttributeRefreshIntervalSeconds > 30
  • Environment variable: MM_ACCESSCONTROLSETTINGS_ATTRIBUTEREFRESHINTERVALSECONDS