create_user_with_certificate
Creates a pfSense local user and a CA-signed certificate, links them atomically, and rolls back the certificate if user creation fails.
Instructions
Create a pfSense user and a signed certificate, then link them atomically.
Generates a user certificate signed by the given CA, creates the local user with the certificate linked, and rolls back the certificate if user creation fails.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"password": "<password>",
"caref": "<caref>",
"cert_descr": "<cert_descr>"
},
"name": "create_user_with_certificate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Username (login name) | |
| priv | No | List of privileges to assign to the user | |
| caref | Yes | Reference ID of the Certificate Authority to sign the user cert | |
| descr | No | User description / full name | |
| keylen | No | Key length in bits — 2048 or 4096 for RSA; 256 or 384 for ECDSA (default: 2048) | |
| expires | No | Account expiration date (MM/DD/YYYY format) | |
| keytype | No | Key type — "RSA" or "ECDSA" (default: "RSA") | RSA |
| disabled | No | Whether the user account starts disabled (default: False) | |
| lifetime | No | Certificate lifetime in days (default: 3650 = ~10 years) | |
| password | Yes | User password | |
| cert_descr | Yes | Descriptive name for the generated certificate | |
| digest_alg | No | Digest algorithm — sha256, sha384, sha512 (default: sha256) | sha256 |
| dn_commonname | No | Common Name for the certificate (defaults to name if omitted) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||