> 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/powershell-universal/es/seguridad/enterprise-security/windows-sso.md).

# Windows SSO

Habilite la autenticación de inicio de sesión único de Windows en PowerShell Universal mediante Kerberos o NTLM, con configuraciones de alojamiento en IIS y fuera de IIS.

La autenticación de Windows, también conocida como autenticación Negotiate, utiliza Kerberos o NTLM para autenticar sin solicitar una contraseña al usuario. Está soportada principalmente en dominios de Windows, pero puede configurarse en Linux y Mac OS.

### appsettings.json

La autenticación de Windows proporciona compatibilidad con el inicio de sesión único para los navegadores y entornos que la admiten. Para habilitar la autenticación de Windows, establezca en true la configuración `WindowsAuthentication` en `appsettings.json`.

{% code collapsedlinecount="10" %}

```javascript
"Windows": {
  "Enabled": "true"
},
```

{% endcode %}

### Authentication.ps1

Puede habilitar la autenticación de Windows añadiendo un nuevo proveedor de autenticación en Secure > Authentication. Seleccione Windows y habilite la autenticación.

Una vez que Windows esté configurado como autenticado, la autenticación de Windows ya puede utilizarse con Universal. Deberá cerrar la sesión para poder utilizar la autenticación de Windows.

### Autenticación de Windows en IIS

Para habilitar la autenticación de Windows en IIS, asegúrese de habilitar la autenticación de Windows y de deshabilitar la autenticación anónima.

En el fichero web.config incluido con PowerShell Universal, asegúrese de haber establecido `forwardWindowsAuthToken` en `true`.

{% code collapsedlinecount="10" %}

```
<aspNetCore processPath="Universal.Server.exe" arguments="" forwardWindowsAuthToken="true" stdoutLogEnabled="true" stdoutLogFile=".\logs\log" hostingModel="OutOfProcess"/>
```

{% endcode %}

### Autenticación de Windows fuera de IIS

La autenticación de Windows está soportada fuera de IIS, pero requiere configurar la cuenta que ejecuta el servicio Universal.

#### Windows

En Windows, debe instalar PowerShell Universal como [servicio de Windows](/powershell-universal/es/getting-started.md#windows). Una vez instalado el servicio, deberá crear un [usuario de cuenta de servicio](/powershell-universal/es/config/running-as-a-service-account.md#application-service-account) y configurar el servicio para que se ejecute con la cuenta de ese usuario. La [configuración ](/powershell-universal/es/config/settings.md)de autenticación de Windows debe establecerse en true.

{% code collapsedlinecount="10" %}

```javascript
"Windows": {
  "Enabled": "true"
},
```

{% endcode %}

La cuenta de servicio debe tener un nombre principal de servicio (spn) configurado para la cuenta de equipo. Puede hacerlo con el comando `setspn`. El nombre del equipo debe ser el nombre completo cualificado de la máquina que ejecuta Universal.

{% code collapsedlinecount="10" %}

```
setspn -S HTTP/myservername.mydomain.com myuser
```

{% endcode %}

Para más información, puede consultar la documentación de Microsoft sobre la configuración de la autenticación de Windows en ASP.NET Core: [Configuring a Windows machine for Windows Authentication](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/windowsauth?view=aspnetcore-3.1\&tabs=visual-studio#windows-environment-configuration)

#### Linux

[Configuring a Linux or Mac OS machine for Windows Authentication](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/windowsauth?view=aspnetcore-3.1\&tabs=visual-studio#linux-and-macos-environment-configuration)

### Notificaciones en caché

PowerShell Universal almacena en caché las notificaciones de pertenencia a grupos cuando se utiliza la autenticación de Windows. Las notificaciones se almacenan en caché durante el valor de tiempo de espera de sesión configurado (el valor predeterminado es 25 minutos).

Para vaciar la caché manualmente, vaya a Secure > Roles y haga clic en el botón Clear Cached Claims.

## Configuración del navegador

Según su entorno local, es posible que deba configurar su navegador para que transmita correctamente las credenciales a PowerShell Universal.

* [Google Chrome](https://chromeenterprise.google/policies/#HTTPAuthentication)
* [Microsoft Edge](https://learn.microsoft.com/en-us/deployedge/microsoft-edge-policies#http-authentication-policies)


---

# 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/powershell-universal/es/seguridad/enterprise-security/windows-sso.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.
