> 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/ws-federation.md).

# WS-Federation

{% hint style="info" %}
WS-Federation requiere una [licencia](https://store.devolutions.net/package#psu).
{% endhint %}

WS-Federation admite tanto Active Directory Federation Services como Azure Active Directory.

Primero debe configurar ADFS o AzureAD para que admita Universal.

## Configurar ADFS para Universal <a href="#configuring-adfs-for-universal-dashboard" id="configuring-adfs-for-universal-dashboard"></a>

### Configuración del servicio <a href="#service-settings" id="service-settings"></a>

En primer lugar, deberá recopilar las propiedades del servicio de federación desde ADFS. Abra la aplicación AD FS (Microsoft.IdentityServer.msc). A continuación, haga clic en Service y después en Edit Federation Service Properties.

<figure><img src="/files/ht10KGk811PNdCPCcOKT" alt=""><figcaption></figcaption></figure>

Esto abrirá un cuadro de diálogo con los valores de su servicio ADFS. Necesitará estos valores para configurar PowerShell Universal.

![](https://gblobscdn.gitbook.com/assets%2F-L9mVQO4zbOX7ZcHvIte%2F-Lob6ow15SQRLl3vo8ZV%2F-Lob7luBvuEGUTrLIors%2Fimage.png?alt=media\&token=64c3c00f-1d2c-4346-bcc1-dd89e7cf4c24)

### Relying parties <a href="#relying-parties" id="relying-parties"></a>

Si no tiene ninguna Reply Party Trust configurada, haga clic en Add Replying Party Trust. Seleccione Claims aware.

<figure><img src="/files/PRRnigv9ack7wzj6jgMK" alt=""><figcaption><p>Claims Aware</p></figcaption></figure>

Seleccione Enter data about the relying party manually.

<figure><img src="/files/p8s8vuf3sTGpV7hEMD08" alt=""><figcaption><p>Relying party manual</p></figcaption></figure>

Especifique un nombre para el relying party.

<figure><img src="/files/AdDZxoLhlHnk0e9RKJD0" alt=""><figcaption><p>Nombre del relying party</p></figcaption></figure>

Habilite el protocolo WS-Federation Passive. Introduzca la URL del servidor de PowerShell Universal con una barra al final.

<figure><img src="/files/gAac61Rf8iL0NyA5A2S9" alt=""><figcaption></figcaption></figure>

Introduzca la URL de su servidor de PowerShell Universal.

<figure><img src="/files/2royU5dwl6zI4j4oMti1" alt=""><figcaption><p>Identificador de la confianza del relying party</p></figcaption></figure>

Tras finalizar la configuración de su Replying Party Trust, deberá configurar una Claim Issuance Policy. Cree una Issuance Transform Rule que envíe al menos el Name y el Name ID a Universal.

<figure><img src="https://gblobscdn.gitbook.com/assets%2F-L9mVQO4zbOX7ZcHvIte%2F-Lob6ow15SQRLl3vo8ZV%2F-Lob92zcF4qYpWtR0g_4%2Fimage.png?alt=media&#x26;token=34dfd4db-d742-4f8b-a271-86d37542dc35" alt=""><figcaption></figcaption></figure>

Puede configurar claims adicionales que desee utilizar si está usando políticas en Universal.

### Solución de problemas

MSIS7065: There are no registered protocol handlers on path /adfs/ls to process the incoming request.

Este problema puede producirse si la página IDP Initiated Sign On está desactivada. Este es el valor predeterminado. Ejecute el siguiente comando desde una consola administrativa.

```powershell
 Set-AdfsProperties -EnableIdPInitiatedSignonPage $true
```

MSIS7001: The passive protocol context was not found or not valid. If the context was stored in cookies, the cookies that were presented by the client were not valid. Ensure that the client browser is configured to accept cookies from this website and retry this request.

## Configurar para Azure Active Directory <a href="#configuring-for-azure-active-directory" id="configuring-for-azure-active-directory"></a>

Siga la documentación de la configuración de Azure Active Directory que se encuentra en este [documento de Microsoft](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/ws-federation?view=aspnetcore-2.2#azure-active-directory).

## Configurar Universal <a href="#configuring-universal-dashboard" id="configuring-universal-dashboard"></a>

### Usar Appsettings.json

Después de configurar ADFS o AAD, ya puede proporcionar a Universal las propiedades para MetadataAddress y Wtrealm. Consulte estos ajustes en nuestra página [Configuración ](/powershell-universal/es/config/settings.md).

Aquí tiene un ejemplo de cómo actualizar el fichero `appsettings.json` para adaptarlo a los ajustes correctos para WS-Federation.

```javascript
{
  "Kestrel": {
    "Endpoints": {
      "HTTP": {
        "Url": "http://*:5000"
      }
    },
    "RedirectToHttps": "false"
  },
  "ApplicationInsights": {
    "InstrumentationKey": ""
  },
  "Logging": {
    "Path": "%PROGRAMDATA%/PowerShellUniversal/log.txt",
    "RetainedFileCountLimit": 31,
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*",
  "CorsHosts": "",
  "Data": {
    "RepositoryPath": "%ProgramData%\\UniversalAutomation\\Repository",
    "ConnectionString": "%ProgramData%\\UniversalAutomation\\database.db",
    "GitRemote": "",
    "GitUserName": "",
    "GitPassword": "", 
    "ConfigurationScript": ""
  },
  "Api": {
    "Url": ""
  },
  "Authentication" : {
    "Windows": {
      "Enabled": "false"
    },
    "WSFed": {
        "Enabled": "true",
        "MetadataAddress": "https://ironman.local:443/FederationMetadata/2007-06/FederationMetadata.xml",
        "Wtrealm": "https://ironman.local:12345",
        "CallbackPath": "/auth/signin-wsfed"
    },
    "OIDC": {
      "Enabled": "false",
      "CallbackPath": "/auth/signin-oidc",
      "ClientID": "",
      "ClientSecret": "",
      "Resource": "",
      "Authority": "",
      "ResponseType": "",
      "SaveTokens": "false"
    },
    "SessionTimeout": "25"
  },
  "Jwt": {  
    "SigningKey": "PleaseUseYourOwnSigningKeyHere",  
    "Issuer": "IronmanSoftware",
    "Audience": "PowerShellUniversal"
  },
  "UniversalDashboard": {
    "AssetsFolder": "%ProgramData%\\PowerShellUniversal\\Dashboard"
  },
  "ShowDevTools": false,
  "HideAdminConsole": false
}
```

Al ejecutar su servidor, ahora se le solicitarán sus credenciales, ya sea mediante el sistema de inicio de sesión único de Internet Explorer, o se le redirigirá a la página de inicio de sesión de WS-Fed.

![](https://gblobscdn.gitbook.com/assets%2F-L9mVQO4zbOX7ZcHvIte%2F-Lob6ow15SQRLl3vo8ZV%2F-Lob9yeDdGENbUiyz4Sj%2Fimage.png?alt=media\&token=910db2dd-85f3-46eb-b3ec-9f551f244439)

### Usar Authentication.ps1

Puede configurar la autenticación WS-Federation en la consola de administración. Para ello, vaya a Security \ Authentication. Añada el proveedor WS-Federation seleccionándolo en el menú desplegable de la esquina superior derecha.

![](/files/sv2MeJbhVvxd4cXeWcXg)

A continuación, edite las propiedades del proveedor de autenticación y especifique los detalles de configuración de su instalación de ADFS.

![](/files/FLfhMOl9KNayyYrZUytZ)

Una vez configurado, habilite el proveedor WS-Federation. A continuación, cierre la sesión y vaya a `/admin` Se le pedirá que inicie sesión en su proveedor WS-Federation.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.devolutions.net/powershell-universal/es/seguridad/enterprise-security/ws-federation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
