# Derechos de usuario en SAML: atributos personalizados (avanzado)

> Esta es la forma avanzada de configurar los derechos de usuario. Recomendamos usar [SAML Access Profiles](https://help.aikidogov.us/docs/docs-es/getting-started/automated-user-management/saml-login/saml-user-rights-access-profiles-recommended.md)
>
> [https://help.aikido.dev/doc/saml-user-rights-access-profiles-recommended/docVaVb0VPy1](https://help.aikidogov.us/docs/docs-es/getting-started/automated-user-management/saml-login/saml-user-rights-access-profiles-recommended.md)

Esta guía ofrece instrucciones detalladas sobre cómo configurar y gestionar los derechos de usuario en Aikido mediante atributos personalizados de SAML. Al aprovechar atributos como `aikido_role`, `aikido_data_edit_rights`, `aikido_can_ignore`, `aikido_can_snooze`, `aikido_can_change_severity`, `aikido_can_manage_teams` y `aikido_teams`, puede controlar los permisos y roles de los usuarios desde su proveedor de identidad. Este enfoque garantiza que los usuarios tengan en Aikido el mismo acceso que se haya configurado en su proveedor de identidad.

- **aikido_access_profile:** [**Más información**](https://help.aikidogov.us/docs/docs-es/getting-started/automated-user-management/saml-login/saml-user-rights-access-profiles-recommended.md)
  Al configurar SAML Access Profiles, este es el claim que debe usar.

  ```xml
  <saml:Attribute Name="aikido_access_profile">
      <saml:AttributeValue xsi:type="xs:anyType">My Access Profile</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_username:** Puede definir el nombre del usuario en Aikido

  ```xml
  <saml:Attribute Name="aikido_username">
      <saml:AttributeValue xsi:type="xs:anyType">John Doe</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_role:** `admin`, `default`, `team_only`

  ```xml
  <saml:Attribute Name="aikido_role">
      <saml:AttributeValue xsi:type="xs:anyType">default</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_data_edit_rights:** `standard`, `read_only`

  ```xml
  <saml:Attribute Name="aikido_data_edit_rights">
      <saml:AttributeValue xsi:type="xs:anyType">standard</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_can_ignore:** `true`, `false`

  ```xml
  <saml:Attribute Name="aikido_can_ignore">
      <saml:AttributeValue xsi:type="xs:anyType">true</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_can_snooze:** `true`, `false`

  ```xml
  <saml:Attribute Name="aikido_can_snooze">
      <saml:AttributeValue xsi:type="xs:anyType">true</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_can_change_severity:** `true`, `false`

  ```xml
  <saml:Attribute Name="aikido_can_change_severity">
      <saml:AttributeValue xsi:type="xs:anyType">true</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_can_manage_teams:** `true`, `false`

  ```xml
  <saml:Attribute Name="aikido_can_manage_teams">
      <saml:AttributeValue xsi:type="xs:anyType">true</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_can_export_data:** `true`, `false`

  ```xml
  <saml:Attribute Name="aikido_can_export_data">
      <saml:AttributeValue xsi:type="xs:anyType">true</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_can_manage_clouds:** `true`, `false`

  ```xml
  <saml:Attribute Name="aikido_can_manage_clouds">
      <saml:AttributeValue xsi:type="xs:anyType">true</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_can_manage_containers:** `true`, `false`

  ```xml
  <saml:Attribute Name="aikido_can_manage_containers">
      <saml:AttributeValue xsi:type="xs:anyType">true</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_can_manage_domains:** `true`, `false`

  ```xml
  <saml:Attribute Name="aikido_can_manage_domains">
      <saml:AttributeValue xsi:type="xs:anyType">true</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_can_manage_pentests:** `true`, `false`

  ```xml
  <saml:Attribute Name="aikido_can_manage_pentests">
      <saml:AttributeValue xsi:type="xs:anyType">true</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_can_manage_code_quality:** `true`, `false`

  ```
  <saml:Attribute Name="aikido_can_manage_code_quality">
      <saml:AttributeValue xsi:type="xs:anyType">true</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_can_manage_repos:** `true`, `false`

  ```
  <saml:Attribute Name="aikido_can_manage_repos">
      <saml:AttributeValue xsi:type="xs:anyType">true</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_teams:** Aquí puede definir los distintos equipos de los que forma parte el usuario. Si los equipos no existen en Aikido, se crearán. El usuario se unirá automáticamente a estos equipos. Si se configura este atributo, el usuario será eliminado de todos los demás equipos.

  ```xml
  <saml:Attribute Name="aikido_teams">
      <saml:AttributeValue xsi:type="xs:anyType">team1</saml:AttributeValue>
      <saml:AttributeValue xsi:type="xs:anyType">team2</saml:AttributeValue>
  </saml:Attribute>
  ```

- **aikido_workspace_ids:** Aquí puede definir los distintos workspaces de Aikido de los que forma parte el usuario. El usuario se unirá automáticamente a estos workspaces. Si se configura este campo, el usuario será eliminado de todos los demás workspaces.

  ```xml
  <saml:Attribute Name="aikido_workspace_ids">
      <saml:AttributeValue xsi:type="xs:anyType">1233</saml:AttributeValue>
      <saml:AttributeValue xsi:type="xs:anyType">2511</saml:AttributeValue>
  </saml:Attribute>
  ```

- **github_samlidentity_nameid:** (GitHub.com) El NameID que GitHub almacena para ese usuario, normalmente su correo electrónico. Aikido lo usa en dos lugares: la sincronización de equipos de GitHub y la vinculación de un usuario SAML con la cuenta de GitHub que comenta en un pull request, para que se aplique **Can ignore issues**. La sincronización de equipos y esta coincidencia solo funcionan cuando la persona también inicia sesión en GitHub con SAML. Debe iniciar sesión en Aikido con SAML una vez después de que añada el claim. Consulte [Quién puede ignorar un hallazgo en un pull request](https://help.aikidogov.us/docs/docs-es/pr-and-release-gating/aikido-ci-gating-functionality.md#who-can-ignore-a-finding-on-a-pull-request).

  ```xml
  <saml:Attribute Name="github_samlidentity_nameid">
      <saml:AttributeValue xsi:type="xs:anyType">example@email.com</saml:AttributeValue>
  </saml:Attribute>
  ```

- **github_user_slug:** (GitHub.com) El nombre de usuario de GitHub, por ejemplo `johndoe`. Aikido lo hace coincidir con la cuenta que escribió un comentario en un pull request y lo usa para la sincronización de equipos de GitHub. Cuando se almacenan tanto este claim como `github_samlidentity_nameid`, Aikido usa primero `github_user_slug`. La persona debe iniciar sesión en Aikido con SAML una vez después de que añada el claim.

  ```xml
  <saml:Attribute Name="github_user_slug">
      <saml:AttributeValue xsi:type="xs:anyType">johndoe</saml:AttributeValue>
  </saml:Attribute>
  ```
