v11.4 log path restriction#8731
Conversation
* Update Playbooks v2.6 checklists documentation - Add channel checklists as first-class workflows from v2.6.0 - Document rebrand from "Playbook Runs" to "Checklists" - Update mobile v2.35.0 "Playbook checklists" terminology - Document channel-based permissions vs playbook permissions - Add API changes: Type field and optional playbook_id - Include mobile API endpoints for checklist operations - Mark PR evidence gaps for human validation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Carrie Warner (Mattermost) <cwarnermm@users.noreply.github.com> * Editorial review cleanup * Incorporated reviewer feedback --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Carrie Warner (Mattermost) <cwarnermm@users.noreply.github.com>
Document the new MM_LOG_PATH environment variable and log path validation feature introduced in Mattermost v11.4.0. This security enhancement restricts log file locations to a designated root directory to prevent unauthorized filesystem access via logging configuration. Changes include: Environment Variables: - Add MM_LOG_PATH documentation with purpose, default, usage examples - Document validation behavior and error handling Logging Configuration: - Add comprehensive "Log path restrictions" section - Document path validation mechanism (absolute path resolution, symlink handling, directory boundary enforcement) - Provide valid and invalid configuration examples - Add troubleshooting guidance for log access errors - Update file target configuration to note v11.4 path requirements Support Packet Generation: - Document audit logging for support packet generation (v11.4+) - Note audit trail metadata for compliance tracking Configuration Settings Reference: - Update FileLocation setting with v11.4 validation note - Update AdvancedLoggingJSON with path restriction requirements - Add cross-references to detailed logging documentation Security Guide: - Add log path restrictions to security features list - Highlight access control and configuration integrity benefits Troubleshooting: - Add "Log files not accessible" troubleshooting section - Provide step-by-step resolution procedures - Include decision flowchart for diagnosing log access issues - Offer migration paths for existing custom log configurations Addresses both System Admin and Risk Assessor personas with practical configuration guidance, security context, and comprehensive troubleshooting support. Resolves #8730 Co-authored-by: Carrie Warner (Mattermost) <cwarnermm@users.noreply.github.com>
|
Newest code from mattermost has been published to preview environment for Git SHA 3e46368 |
|
|
||
| The path you configure must exist, and Mattermost must have write permissions for this directory. | ||
| - The path you configure must exist, and Mattermost must have write permissions for this directory. | ||
| - From Mattermost v11.4, log file paths are validated to ensure they remain within the directory specified by the ``MM_LOG_PATH`` environment variable. If ``MM_LOG_PATH`` is not set, the default ``logs`` directory is used. Paths outside the allowed root directory are blocked. See the :doc:`Mattermost logging </administration-guide/manage/logging>` documentation for details. |
There was a problem hiding this comment.
Paths outside the allowed root directory are blocked
Currently paths outside the root cause an error in logs (to inform the admin they need to align with the policy) for writing logs. The blocking happens when trying to download logs for support packet. We may block writing logs outside the root in a future release.
| - See the :doc:`Mattermost logging </administration-guide/manage/logging>` documentation for details. These targets have been chosen as they support the vast majority of log aggregators, and other log analysis tools, without needing additional software installed. | ||
| - Logs are recorded asynchronously to reduce latency to the caller. | ||
| - Advanced logging supports hot-reloading of logger configuration. | ||
| - From Mattermost v11.4, all file paths specified in ``AdvancedLoggingJSON`` configurations must be within the directory specified by the ``MM_LOG_PATH`` environment variable. See :ref:`log path restrictions <administration-guide/manage/logging:log path restrictions>` for details. |
There was a problem hiding this comment.
must be within the directory
Here I think the wording is more restrictive than the actual policy. We inform the admin on log writing, and block downloads of logs.
|
Claude finished @cwarnermm's task in 2m 3s —— View job Technical Feedback IncorporatedCompleted Tasks:
SummaryUpdated wording across 3 documentation files to accurately reflect log path validation behavior: Key corrections:
Files updated:
Changes maintain concise technical language for admin audiences per your request. Branch: claude/issue-8730-20260206-2116 |
Update documentation to accurately reflect that log paths outside the root directory generate error logs and are excluded from support packet downloads, rather than being blocked from writing. Softened "must be" language to "should be" to align with actual enforcement level. Co-authored-by: Carrie Warner (Mattermost) <cwarnermm@users.noreply.github.com>
|
Newest code from mattermost has been published to preview environment for Git SHA 9ad3e79 |
|
Newest code from mattermost has been published to preview environment for Git SHA 9ad3e79 |
|
Newest code from mattermost has been published to preview environment for Git SHA 9215a57 |
Summary
Document the new
MM_LOG_PATHenvironment variable and log path validation feature introduced in Mattermost v11.4.0. This security enhancement restricts log file locations to a designated root directory to prevent unauthorized filesystem access via logging configuration.Changes
Resolves #8730
Generated with Claude Code