# Role Allows Implicit Localhost Issuance

This health check ensures that roles do not unintentionally allow certificates to be issued for localhost-based domains. Allowing implicit localhost issuance (via `allow_localhost=true`) in combination with non-empty `allowed_domains`may pose a security risk by enabling certificates for internal or unintended hostnames.

**Health Check Name:** `role_allows_localhost`

#### **Accessed APIs**

| API Endpoint        | Description                                |
| ------------------- | ------------------------------------------ |
| `LIST /roles`       | Lists all defined roles                    |
| `READ /roles/:name` | Reads the configuration of a specific role |

**Configuration Parameters**\
\&#xNAN;*None*

**Health Check Results**

| Check Condition                                                                   | Description                                                                                  |
| --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `allow_localhost` is set to `true`                                                | The role permits implicit certificate issuance for localhost or localhost-like domains.      |
| `allowed_domains` contains one or more entries                                    | The role allows issuance for specific domains, which may unintentionally include localhost.  |
| Both conditions (`allow_localhost=true` and non-empty `allowed_domains`) are true | A **warning** is issued, indicating a risk of unintended certificate issuance for localhost. |

**Recommended Actions**

* Set `allow_localhost=false` for all roles.
* Update the `allowed_domains` field to include **only explicitly approved domains**, avoiding vague or wildcard domain entries that could inadvertently include localhost-style hostnames.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.enclaive.cloud/virtual-hsm/troubleshooting/role-allows-implicit-localhost-issuance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
