グループSAMLとSCIMの設定例
- プラン: Premium、Ultimate
- 提供形態: GitLab.com
これらは、GitLabサポートチームがトラブルシューティング中に使用することがある、グループSAMLおよびSCIMに関するメモとスクリーンショットですが、公式ドキュメントには含まれていません。GitLabはこの情報を公開しており、誰もがサポートチームが収集した知識を利用できるようにしています。
機能に関する情報と設定方法については、GitLabのGroup SAMLドキュメントを参照してください。
SAML設定のトラブルシューティングを行う際、GitLabチームメンバーはしばしばSAMLトラブルシューティングセクションから開始します。
その後、目的のIdentity Providerのテスト設定を行う場合があります。このセクションには、スクリーンショットの例が含まれています。
SAMLおよびSCIMのスクリーンショット
このセクションには、Group SAMLとGroup SCIMの以下の例の設定に関するスクリーンショットが含まれています:
これらのスクリーンショットは、GitLabサポートが必要に応じてのみ更新します。公式ドキュメントではありません。
現在GitLabで問題が発生している場合は、サポートオプションを確認することをお勧めします。
Azure Active Directory
このセクションには、Azure Active Directory設定の要素に関するスクリーンショットが含まれています。
基本SAMLアプリ設定
ユーザーの要求と属性
SCIMマッピング
プロビジョニング:
属性マッピング
グループ同期
グループIDソース属性を使用するには、ユーザーはSAMLグループリンクを設定する際に、グループIDまたはオブジェクトIDを入力する必要があります。
利用可能な場合は、代わりにユーザーフレンドリーなグループ名を追加できます。Azureグループ要求を設定する際:
- sAMAccountNameソース属性を選択します。
- グループ名を入力してください。最大256文字の長さを指定できます。
- 属性がアサーションの一部であることを確認するには、Emit group names for cloud-only groupsを選択します。
Azure ADは、SAML応答で送信できるグループの数を150に制限します。ユーザーが150を超えるグループのメンバーである場合、Azureはそのユーザーのグループ要求をSAML応答に含めません。
Google Workspace
基本SAMLアプリ設定
ユーザーの要求と属性
IdPリンクと証明書
Okta
GitLab.comグループの基本SAMLアプリ設定
GitLabセルフマネージドの基本SAMLアプリ設定
ユーザーの要求と属性
グループ同期
詳細SAMLアプリ設定(デフォルト)
IdPリンクと証明書
SAMLサインオン設定
SCIM設定
SCIMアプリを割り当てる際に、新しくプロビジョニングされたユーザーのユーザー名を設定します:
OneLogin
基本SAMLアプリ設定
パラメータ
ユーザーの追加
SSO設定
AWS IAM Identity Center
以下の表の値を使用してAWS IAM Identity Centerを設定します。完全なセットアップ手順については、AWS IAM Identity Centerを参照してください。
アプリケーションプロパティ
AWS IAM Identity Centerで独自のSAML 2.0アプリケーションを設定する際は、以下のアプリケーションプロパティを設定します:
| AWS Identity Centerフィールド | 値 |
|---|---|
| Application ACS URL | グループのアサーションコンシューマサービスURL(GitLab SAML SSO設定から) |
| Application SAML audience | グループの識別子(GitLab SAML SSO設定から) |
| Application start URL | グループのGitLabシングルサインオンURL(GitLab SAML SSO設定から) |
SP開始ログインのためにApplication start URLを設定します。これがないと、既存のユーザーはアカウントをリンクできません。
属性マッピング
| 属性 | 値 | 形式 |
|---|---|---|
| 件名 | ${user:email} | unspecified |
${user:email} | unspecified | |
| first_name | ${user:givenName} | unspecified |
| last_name | ${user:familyName} | unspecified |
件名 (NameID) の形式をunspecifiedに設定する必要があります。形式をpersistentまたはtransientに設定すると、既存のGitLabユーザーはSAMLを介してアカウントをリンクしようとしたときに403エラーを受け取ります。このエラーはアカウントリンク中にのみ発生し、AWS IAM Identity Centerを介してプロビジョニングされた新しいユーザーには影響しません。
GitLab SAML SSO設定
| GitLabフィールド | 値 |
|---|---|
| Identity ProviderのシングルサインオンURL | IAM Identity Center sign-in URL(アプリケーションのIAM Identity Center SAML metadataセクションから) |
| 証明書フィンガープリント | AWS Identity Centerからダウンロードされた証明書のSHA1フィンガープリント |
SAML応答の例
ユーザーがSAMLを使用してサインインすると、GitLabはSAML応答を受け取ります。SAML応答は、base64エンコードされたメッセージとしてproduction.logログにあります。SAMLResponseを検索して応答を見つけます。デコードされたSAML応答はXML形式です。例:
<?xml version="1.0" encoding="UTF-8"?>
<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xs="http://www.w3.org/2001/XMLSchema" Destination="https://gitlabexample/-/saml/callback" ID="id4898983630840142426821432" InResponseTo="_c65e4c88-9425-4472-b42c-37f4186ac0ee" IssueInstant="2022-05-30T21:30:35.696Z" Version="2.0">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://www.okta.com/exk2y6j57o1Pdr2lI8qh7</saml2:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference URI="#id4898983630840142426821432">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>neiQvv9d3OgS4GZW8Nptp4JhjpKs3GCefibn+vmRgk4=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>dMsQX8ivi...HMuKGhyLRvabGU6CuPrf7==</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>MIIDq...cptGr3vN9TQ==</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
<saml2p:Status xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol">
<saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</saml2p:Status>
<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="id489" IssueInstant="2022-05-30T21:30:35.696Z" Version="2.0">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://www.okta.com/exk2y6j57o1Pdr2lI8qh7</saml2:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference URI="#id48989836309833801859473359">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>MaIsoi8hbT9gsi/mNZsz449mUuAcuEWY0q3bc4asOQs=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>dMsQX8ivi...HMuKGhyLRvabGU6CuPrf7==<</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>MIIDq...cptGr3vN9TQ==</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
<saml2:Subject xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">useremail@domain.com</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml2:SubjectConfirmationData InResponseTo="_c65e4c88-9425-4472-b42c-37f4186ac0ee" NotOnOrAfter="2022-05-30T21:35:35.696Z" Recipient="https://gitlab.example.com/-/saml/callback"/>
</saml2:SubjectConfirmation>
</saml2:Subject>
<saml2:Conditions xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" NotBefore="2022-05-30T21:25:35.696Z" NotOnOrAfter="2022-05-30T21:35:35.696Z">
<saml2:AudienceRestriction>
<saml2:Audience>https://gitlab.example.com/</saml2:Audience>
</saml2:AudienceRestriction>
</saml2:Conditions>
<saml2:AuthnStatement xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" AuthnInstant="2022-05-30T21:30:35.696Z" SessionIndex="_c65e4c88-9425-4472-b42c-37f4186ac0ee">
<saml2:AuthnContext>
<saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml2:AuthnContextClassRef>
</saml2:AuthnContext>
</saml2:AuthnStatement>
<saml2:AttributeStatement xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:Attribute Name="email" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">useremail@domain.com</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="firstname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">John</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="lastname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Doe</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="Groups" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Super-awesome-group</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
</saml2p:Response>


















