> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/gateway/guides/connect/credential-injection.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Proxy-based credential injection

Turn on RDP proxy-based credential injection on a Devolutions Gateway ruleset so users open RDP sessions without the real credentials reaching their machine.

With ***proxy-based credential injection***, users open RDP sessions through Devolutions Gateway without the real credentials of the host ever reaching their machine. The client authenticates to Devolutions Gateway with temporary proxy credentials; Devolutions Gateway receives the real credentials from Devolutions Server and authenticates to the host itself.

It applies to RDP entries that go through a Gateway Ruleset of Devolutions Server with the ***Enable RDP proxy-based credential injection*** option. Devolutions Cloud does not offer this option.

## How it works

1. The user opens an RDP entry from Remote Desktop Manager or from the Devolutions Server web interface (***Open in browser***).
2. Devolutions Server authorizes the session and gives the client temporary proxy credentials instead of the entry's credentials. Remote Desktop Manager does not even retrieve the password of the entry.
3. Devolutions Gateway terminates the TLS and CredSSP (Network Level Authentication) exchange with the client, using the proxy credentials.
4. Devolutions Gateway opens its own TLS and CredSSP exchange with the host, using the real credentials. It uses the same authentication protocol, Kerberos or NTLM, on both sides.
5. The session then flows normally between the client and the host.

## Before you start

* Devolutions Gateway is registered in Devolutions Server. See [Register and configure the gateway in Devolutions Server](https://docs.devolutions.net/gateway/guides/devolutions-server/register-and-configure.md).
* The RDP client trusts the certificate that Devolutions Gateway presents for the session: the Devolutions Gateway TLS certificate, or the dedicated CredSSP certificate when one is configured (`CredSspCertificateFile`, `CredSspPrivateKeyFile` and `CredSspPrivateKeyPassword` in `gateway.json`). When Devolutions Gateway has no certificate at all, it generates a self-signed certificate that clients do not trust. See [Certificates and TLS](https://docs.devolutions.net/gateway/guides/certificates.md).
* For Kerberos, the gateway has a KDC server configured for the realm of the host. See [Use the KDC proxy](https://docs.devolutions.net/gateway/guides/connect/kdc-proxy.md).

## Turn on credential injection

1. In the Devolutions Server web interface, go to ***Administration*** – ***Devolutions Gateway***.
2. Create a Gateway Ruleset (***Add*** – ***Gateway Ruleset***) on the physical gateway or farm, or edit an existing one. See [Gateway rulesets in Devolutions Server](https://docs.devolutions.net/gateway/guides/devolutions-server/rulesets.md).
3. In the ***Security*** section of the Gateway Ruleset, select ***Enable RDP proxy-based credential injection***.
4. Save the Gateway Ruleset.
5. In each RDP entry, open the ***VPN/tunnel/gateway*** settings, choose ***Devolutions Gateway*** and pick the Gateway Ruleset (or set it on a parent folder).

In Remote Desktop Manager, the same option is under ***Administration*** – ***Privileged access*** – ***Devolutions Gateway***: edit the Gateway Ruleset, then ***Security*** – ***Options***.

From then on, sessions of these entries do not expose their credentials on the user's machine.

{% hint style="success" %}
For external users such as contractors, give the ***Execute*** permission on the entries but not the ***View password*** permission. With credential injection, they can open the sessions without being able to see or retrieve the passwords.
{% endhint %}

## Good to know

* Credential injection applies to RDP only. Other entry types going through the same Gateway Ruleset use their own credentials.
* In the Devolutions Server web interface, a user can open an RDP entry in the browser through a Gateway Ruleset with credential injection even without the ***View password*** or ***Execute*** permission.
* Devolutions Server logs each attempt in the activity logs: "Credential injection successful: Connection '{entry}' through Devolutions Gateway '{gateway}' by {user}" or "Credential injection failed: Connection '{entry}' through Devolutions Gateway '{gateway}'. Reason: {reason}. User: {user}".

## If it doesn't work

* The RDP client warns about the certificate: the client does not trust the Devolutions Gateway certificate. Install a certificate from a trusted authority on Devolutions Gateway.
* The session fails during authentication with Kerberos: check the KDC configuration of the gateway, and that the host can be reached by its name from Devolutions Gateway.
* See [Devolutions Gateway troubleshooting](https://docs.devolutions.net/gateway/help/troubleshooting/general.md).

## Next

* [Gateway rulesets in Devolutions Server](https://docs.devolutions.net/gateway/guides/devolutions-server/rulesets.md)
* [Open sessions in a web browser](https://docs.devolutions.net/gateway/guides/connect/web-client.md)


---

# 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.devolutions.net/gateway/guides/connect/credential-injection.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.
