This document outlines security considerations for deploying and using MCP Firewall.
MCP Firewall is designed to protect sensitive information when using Large Language Models (LLMs) by redacting private data before it reaches the model. While it provides an important security layer, it is not a complete security solution on its own.
-
Pattern-Based Detection
- MCP Firewall relies on regular expressions to identify sensitive information
- This approach may miss variations or novel formats of sensitive data
- False positives (over-redaction) or false negatives (under-redaction) are possible
-
No Contextual Understanding
- MCP Firewall does not understand the semantic meaning of text
- It cannot identify sensitive information based on context alone
-
Stateless Processing
- Each request is processed independently
- No memory of previously processed text or identified patterns across requests
-
Network Security
- Deploy MCP Firewall within a secure network environment
- Use TLS/SSL for all communications with the service
- Implement appropriate authentication for API access
-
Access Control
- Restrict access to the MCP Firewall API
- Implement IP whitelisting where appropriate
- Use API keys or other authentication mechanisms
-
Logging and Monitoring
- Monitor access to the MCP Firewall service
- Review logs regularly for unusual patterns or potential security issues
- Don't log sensitive information that was successfully redacted
-
Regular Updates
- Review and update redaction rules regularly
- Add new patterns as new types of sensitive information are identified
- Test rules with different variations of sensitive data
-
Defense in Depth
- Implement multiple overlapping rules for critical types of data
- Use both specific and general patterns for important sensitive information
-
Testing
- Test rules thoroughly before deploying to production
- Include edge cases and unusual formats in testing
- Implement a process for validating rule effectiveness
-
Additional Protections
- MCP Firewall should be one part of a comprehensive security strategy
- Implement other security measures like user education and policy enforcement
-
User Guidance
- Educate users about what MCP Firewall can and cannot protect
- Provide clear guidelines on what types of information should never be shared with LLMs
-
Monitoring and Auditing
- Periodically audit LLM interactions to ensure sensitive information is being properly redacted
- Establish procedures for handling security incidents
If you discover sensitive information leaking through MCP Firewall:
- Document the specific pattern that was not properly redacted
- Add a new rule or update existing rules to catch the pattern
- Review logs to identify potential exposures
- Follow your organization's security incident response procedures
- Consider whether notification of affected parties is necessary
MCP Firewall benefits from community contributions to its security capabilities:
- Report security issues to the project maintainers
- Share new patterns for sensitive information that should be redacted
- Contribute improvements to the redaction logic
- Suggest best practices for deployment and configuration