# access_control

Access control: SSH, PAM, sudo, user audit, password policy, shell restriction

Agent View of the PolicyLayer registry record for `access_control`. HTML page: https://policylayer.com/tools/defense/access-control

## Facts

- Tool: `access_control`
- Server: Defense (`defense-mcp-server`) — https://policylayer.com/tools/defense.md
- Install: `npx -y defense-mcp-server`
- Homepage: git+https://github.com/bottobot/defense-mcp-server.git
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 12 (1 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `force` | boolean | no | Force past critical sanity check findings (caution: may cause lockouts) |
| `shell` | string | no | Shell to set |
| `action` | string | yes | Action to perform |
| `module` | string | no | PAM module to configure |
| `dry_run` | boolean | no | Preview changes without executing |
| `service` | string | no | PAM service to audit, e.g. 'sshd', 'login', 'sudo' |
| `max_days` | number | no | Maximum days before password change (PASS_MAX_DAYS) |
| `min_days` | number | no | Minimum days between password changes (PASS_MIN_DAYS) |
| `settings` | string | no | Comma-separated key=value pairs, e.g. 'PermitRootLogin=no,MaxAuthTries=4' |
| `username` | string | no | Username to restrict |
| `check_all` | boolean | no | Check common-auth, common-password, etc. |
| `warn_days` | number | no | Days before expiry to warn user (PASS_WARN_AGE) |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "access_control",
    "arguments": {
      "action": "<action>"
    }
  }
}
```

## Why access_control is rated Medium

While access_control includes audit/read capabilities (user audit), its primary functions are Write operations that create or modify system security configurations. These changes are reversible (policies can be reconfigured), distinguishing it from Destructive.

From the tool's own definition: "Tool manages 'SSH, PAM, sudo, user audit, password policy, shell restriction' — these involve creating, modifying, or configuring authentication and authorization settings (e.g., updating PAM rules, changing password policies, modifying sudo permissions,…"

Risk signals: Accepts freeform code/query input (shell) · High parameter count (37 properties)

## Use case

AI agents use access_control to create or update resources in Defense, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Defense environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Defense:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "access_control": {
      "limits": [
        {
          "counter": "access_control_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Defense (30)

- `app_harden` — Execute — https://policylayer.com/tools/defense/app-harden.md
- `container_isolation` — Execute — https://policylayer.com/tools/defense/container-isolation.md
- `crypto` — Execute — https://policylayer.com/tools/defense/crypto.md
- `ebpf` — Execute — https://policylayer.com/tools/defense/ebpf.md
- `firewall` — Execute — https://policylayer.com/tools/defense/firewall.md
- `harden_kernel` — Execute — https://policylayer.com/tools/defense/harden-kernel.md
- `honeypot_manage` — Execute — https://policylayer.com/tools/defense/honeypot-manage.md
- `incident_response` — Execute — https://policylayer.com/tools/defense/incident-response.md
- `malware` — Execute — https://policylayer.com/tools/defense/malware.md
- `sudo_session` — Execute — https://policylayer.com/tools/defense/sudo-session.md
- `vuln_manage` — Execute — https://policylayer.com/tools/defense/vuln-manage.md
- `waf_manage` — Execute — https://policylayer.com/tools/defense/waf-manage.md
- `wireless_security` — Execute — https://policylayer.com/tools/defense/wireless-security.md
- `zero_trust` — Execute — https://policylayer.com/tools/defense/zero-trust.md
- `api_security` — Read — https://policylayer.com/tools/defense/api-security.md
- `cloud_security` — Read — https://policylayer.com/tools/defense/cloud-security.md
- `dns_security` — Read — https://policylayer.com/tools/defense/dns-security.md
- `secrets` — Read — https://policylayer.com/tools/defense/secrets.md
- `backup` — Write — https://policylayer.com/tools/defense/backup.md
- `compliance` — Write — https://policylayer.com/tools/defense/compliance.md
- `container_docker` — Write — https://policylayer.com/tools/defense/container-docker.md
- `defense_mgmt` — Write — https://policylayer.com/tools/defense/defense-mgmt.md
- `harden_host` — Write — https://policylayer.com/tools/defense/harden-host.md
- `integrity` — Write — https://policylayer.com/tools/defense/integrity.md
- `log_management` — Write — https://policylayer.com/tools/defense/log-management.md
- `network_defense` — Write — https://policylayer.com/tools/defense/network-defense.md
- `patch` — Write — https://policylayer.com/tools/defense/patch.md
- `process_security` — Write — https://policylayer.com/tools/defense/process-security.md
- `supply_chain` — Write — https://policylayer.com/tools/defense/supply-chain.md
- `threat_intel` — Write — https://policylayer.com/tools/defense/threat-intel.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=defense · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/defense
