Commit f61c7cc
authored
feat: Implemented mandatory write tools allowlist and double-confirmation for DELETE operations and elicitations" (#13)
* feat: Added Layered security features, fixes and improvements
* feat: implement mandatory write tools allowlist and double-confirmation for DELETE operations
Major security enhancements to align with MCP best practices:
Security Features:
- Mandatory write tools allowlist with wildcard support (zpa_create_*, zia_delete_*)
- No backdoor to enable all - allowlist required when ZSCALER_MCP_WRITE_ENABLED=true
- Double-confirmation for all 33 DELETE operations (permission dialog + server-side block)
- Tool annotations: readOnlyHint=True for 110 read tools, destructiveHint=True for 93 write tools
- Hidden kwargs parameter prevents AI agents from bypassing DELETE confirmations
Implementation:
- Added zscaler_mcp/common/tool_helpers.py for registration utilities
- Added zscaler_mcp/common/elicitation.py for confirmation logic
- CLI flags: --enable-write-tools and --write-tools with env var support
- 5-layer defense-in-depth security model
Fixes:
- Fixed update operations sending null values to API (now fetches current state)
- Fixed Pydantic validation errors in confirmation responses
- Fixed MockServer.add_tool() missing annotations parameter
- Fixed 21 orphaned commas causing syntax errors
- Fixed missing Union imports
- Removed test_use_legacy_env.py (attempted real API calls)
Tests:
- 163/163 unit tests passing
- Updated delete tests with kwargs parameter
- Added confirmation-required test cases
Documentation:
- Updated README with comprehensive security model
- Rewrote docsrc/guides/configuration.rst with clear authentication guide
- Updated docsrc/guides/release-notes.rst with v0.3.0 entries
- Fixed Sphinx RST title underlines
- Comprehensive CHANGELOG for v0.3.0
This implementation exceeds industry standards (Terraform/PagerDuty MCP servers)
by providing mandatory allowlists and double-confirmation for destructive operations.
* fix: Fixed markdown lint1 parent 7d06312 commit f61c7cc
File tree
168 files changed
+24604
-15387
lines changed- docsrc
- _build
- .doctrees
- api
- guides
- tools
- _modules
- zscaler_mcp
- common
- tools
- zcc
- zdx
- zia
- zidentity
- zpa
- ztw
- utils
- _sources
- guides
- tools
- api
- guides
- tools
- zcc
- zdx
- zia
- zidentity
- zpa
- ztw
- guides
- tools
- tests
- zcc
- zdx
- zia
- zidentity
- zpa
- ztw
- zscaler_mcp
- common
- tools
- zcc
- zdx
- zia
- zidentity
- zpa
- ztw
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
168 files changed
+24604
-15387
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
3 | 64 | | |
4 | 65 | | |
5 | 66 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments