# SAML ユーザー権限: カスタム属性（上級者向け）

> これはユーザー権限を設定するための上級者向けの方法です。[SAML Access Profiles](https://help.aikido.dev/docs/docs-ja/getting-started/automated-user-management/saml-login/saml-user-rights-access-profiles-recommended) の使用をお勧めします
>
> [https://help.aikido.dev/doc/saml-user-rights-access-profiles-recommended/docVaVb0VPy1](https://help.aikido.dev/docs/docs-ja/getting-started/automated-user-management/saml-login/saml-user-rights-access-profiles-recommended)

このガイドでは、SAML カスタム属性を使用して Aikido 内のユーザー権限を設定および管理する方法について詳しく説明します。`aikido_role`、`aikido_data_edit_rights`、`aikido_can_ignore`、`aikido_can_snooze`、`aikido_can_change_severity`、`aikido_can_manage_teams`、`aikido_teams` などの属性を活用することで、ID プロバイダー内からユーザーの権限とロールを制御できます。この方法により、ユーザーは ID プロバイダーで設定されたものと同じアクセス権を Aikido で持つことができます。

*   **aikido\_access\_profile:** [**詳細情報**](https://help.aikido.dev/docs/docs-ja/getting-started/automated-user-management/saml-login/saml-user-rights-access-profiles-recommended)\
    SAML Access Profiles を設定する場合は、このクレームを使用します。

    ```xml
    <saml:Attribute Name="aikido_access_profile">
        <saml:AttributeValue xsi:type="xs:anyType">My Access Profile</saml:AttributeValue>
    </saml:Attribute>
    ```
*   **aikido\_username:** 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`

    <pre class="language-xml"><code class="lang-xml">&#x3C;saml:Attribute Name="aikido_can_manage_code_quality">
    <strong>    &#x3C;saml:AttributeValue xsi:type="xs:anyType">true&#x3C;/saml:AttributeValue>
    </strong>&#x3C;/saml:Attribute>
    </code></pre>
*   **aikido\_can\_manage\_repos:** `true`、`false`

    <pre class="language-xml"><code class="lang-xml">&#x3C;saml:Attribute Name="aikido_can_manage_repos">
    <strong>    &#x3C;saml:AttributeValue xsi:type="xs:anyType">true&#x3C;/saml:AttributeValue>
    </strong>&#x3C;/saml:Attribute>
    </code></pre>
*   **aikido\_teams:** ここでは、ユーザーが所属するさまざまなチームを定義できます。チームが Aikido に存在しない場合は作成されます。ユーザーは指定されたチームに自動的に参加します。これが設定されている場合、ユーザーは他のすべてのチームから削除されます。

    ```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:** ここでは、ユーザーが所属するさまざまな Aikido ワークスペースを定義できます。ユーザーは指定されたワークスペースに自動的に参加します。このフィールドが設定されている場合、ユーザーは他のすべてのワークスペースから削除されます。

    ```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) GitHub がそのユーザーについて保存している NameID で、通常はメールアドレスです。Aikido はこれを 2 か所で使用します。GitHub チーム同期と、**Can ignore issues** が適用されるように SAML ユーザーをプルリクエストにコメントする GitHub アカウントに紐付ける処理です。チーム同期およびこの照合は、その人が SAML を使用して GitHub にもサインインしている場合にのみ機能します。クレームを追加した後、その人は SAML を使用して Aikido に一度サインインする必要があります。[プルリクエストで検出結果を無視できるユーザー](https://help.aikido.dev/docs/docs-ja/pr-and-release-gating/aikido-ci-gating-functionality#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) GitHub のユーザー名（例: `johndoe`）です。Aikido はこれをプルリクエストのコメントを書いたアカウントと照合し、GitHub チーム同期にも使用します。このクレームと `github_samlidentity_nameid` の両方が保存されている場合、Aikido は `github_user_slug` を優先して使用します。クレームを追加した後、その人は SAML を使用して Aikido に一度サインインする必要があります。

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