> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudthinker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Elastic Security

> Connect Elastic Security to review detection alerts, cases, and detection rules

Connect Elastic Security so CloudThinker can review detection alerts, cases and detection rules, and change alert status and case status or assignees after you approve it. It signs in with an API key.

## Prerequisites

* An existing Elastic Security account or deployment containing the resources you want to inspect.
* Permission to create or obtain the credential described below.
* A CloudThinker workspace role that can add connections; see [Roles](https://docs.cloudthinker.io/guide/security/roles.md).
* An HTTPS route from CloudThinker to your service. For a private service, see [Reaching private services](https://docs.cloudthinker.io/guide/connections/overview.md#reaching-private-services).

## Setup

**1. Prepare the credential**

Create an Elasticsearch API key for access to Kibana APIs and copy its encoded value. See the [vendor's authentication documentation](https://www.elastic.co/docs/deploy-manage/api-keys) for the procedure that applies to your account.

**2. Add the connection**

Open **Settings → Connections**, find **Elastic Security**, and click **Connect**. Enter the values in [Connection details](#connection-details).

Enter the Kibana URL, not the Elasticsearch URL. Select the space containing your detection rules and cases.

**3. Check the result**

Click **Connect** and wait for the connection check.

**Success state:** the connection shows **Connected**. Run the verification prompt below and confirm that the expected resources appear.

## Connection details

| Field | Required | What to enter |
| - | - | - |
| **Kibana URL** | Yes | The Kibana address, for example [https://kibana.example.internal:5601](https://kibana.example.internal:5601). Use the Kibana URL, not the Elasticsearch one. |
| **API key** | Yes | Paste the encoded value. Its role needs Security and Cases privileges in Kibana and read on the alerts index. |
| **Kibana space** | Yes | The space ID that holds your Security rules and alerts. Leave default unless you use another space. Default: `default`. |
| **TLS certificate** | Yes | Options: **Verify SSL certificate**, **Skip SSL verification**. Default: `true`. |

## Required permissions

Read: the key's role has the Security Alerts and Cases features, and read access to the alerts index, in the selected Kibana space.

Change alerts: write access to Security Alerts. Change cases: write access to Cases. Assigning cases also needs a Platinum or trial license.

## Agent capabilities

| Capability | What agents can do | Approval |
| - | - | - |
| Detection alerts | Read the alert queue, one alert and its rule context. | No |
| Case review | Read cases, comments, people and attached alerts. | No |
| Change alert status | Open, acknowledge or close up to 50 alerts; a close can carry a reason. | Yes |
| Change case status | Set one case to open, in progress or closed. | Yes |
| Assign case | Add an assignee to one case. | Yes |
| Unassign case | Remove an assignee from one case. | Yes |

Changes run only after you approve them. Agents show the current status and the change first, then read the result back. Closing a case that syncs alerts also closes its attached alerts. Rules, exceptions, timelines and case deletion stay in Kibana.

### Verify the connection

```text theme={null}
Inspect my Elastic Security connection. Identify the accessible account or resource scope and show a small sample without changing anything.
```

Confirm that the returned scope matches the credential you intended to connect. An empty result can mean missing data or restricted access; it is not proof that the service is healthy.

### Example prompts

```text theme={null}
Which high-severity alerts are open on host web-01 in the last 24 hours?
Close alert <alert-id> as a false positive.
```

## Troubleshooting

> [accordion] The key is rejected
>
> Kibana answers 401. Create a new API key in Stack Management and reconnect; keys can expire.

> [accordion] Access is denied
>
> Kibana answers 403. Add Security Alerts or Cases to the key's role, with write access for changes.

> [accordion] A case is not found or changed
>
> Kibana answers 404 or 409. The ID is from another space or the case changed since it was read. Read it again and ask again.

> [accordion] Assigning fails
>
> Kibana answers 400. The person is unknown or the license has no case assignees. Read the people on the case first.

## Security

* **Least privilege** — grant only the permissions the agents need for your use case; start read-only and widen later.
* **Read-only by default** — use read-only credentials unless you want agents to make changes through this connection.
* **Rotate credentials** — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
* **Revoke on offboarding** — remove the credential at the provider when you delete a connection or a teammate leaves.

- Keep this integration's credential separate from personal daily-use credentials where your provider supports it.
- Revoke or rotate it in Elastic Security when access is no longer needed, and update the connection after rotation.

## Related

> [card] [Connections](https://docs.cloudthinker.io/guide/connections/overview.md)
>
> Manage access to the services CloudThinker investigates.

> [card] [Approvals](https://docs.cloudthinker.io/guide/approvals/overview.md)
>
> Control which requested changes can run.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.