> For the complete documentation index, see [llms.txt](https://docs.xyo.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xyo.network/developers/autonomys-data-lake/security-and-recovery.md).

# Security and Recovery

Protect Auto Drive credentials and recover safely from uncertain operations.

Storage and blockchain operations can finish remotely even when the local process loses its response. Recovery should preserve evidence without turning uncertainty into duplicate work.

## Required controls

| Risk                            | Minimum control                                                                                     |
| ------------------------------- | --------------------------------------------------------------------------------------------------- |
| Credential theft                | Server-side secrets, least privilege, rotation, redacted errors, and no browser bundling            |
| Oversized or malicious payloads | Schema allowlist, byte and nesting limits, quotas, and validation before and after storage          |
| Resource exhaustion             | Deadlines, cancellation, bounded concurrency, backpressure, and rate limits                         |
| Stored-content injection        | Treat reads as untrusted; escape output and prohibit direct HTML, shell, template, or evaluator use |
| Wrong transaction approval      | Bind the signer, account, network, recipient, fees, payload identity, and exact transaction bytes   |
| Duplicate uncertain operation   | Preserve dispatch evidence and reconcile external state before any retry                            |

## Interrupted-operation procedure

{% stepper %}
{% step %}

## Stop automatic retries

An upload or submission may have completed even if the application did not receive the response.
{% endstep %}

{% step %}

## Inspect non-secret evidence

Compare the intended payload identity, operation identifier, timestamps, and last dispatch state. Never retain provider credentials, wallet secrets, or raw authentication headers in evidence.
{% endstep %}

{% step %}

## Query external state safely

Use authenticated, rate-limited, read-only lookups through public typed libraries. Validate identity inputs before sending a provider request and cap the duration and number of lookups.
{% endstep %}

{% step %}

## Decide explicitly

Classify the operation as absent, present, finalized, failed, or still uncertain. A human or an application-specific recovery policy should decide whether a new operation is appropriate.
{% endstep %}
{% endstepper %}

{% hint style="danger" %}
Hidden GitBook pages can still be reachable by direct URL after publication. Never use page visibility to protect secrets or private implementation details.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.xyo.network/developers/autonomys-data-lake/security-and-recovery.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
