Help us improve the AWS re:Post Knowledge Center by sharing your feedback in a brief survey. Your input can influence how we create and update our content to better support your AWS journey.
Amazon Managed Grafana ワークスペースの SAML 認証済みユーザーに管理者アクセス権を付与する方法を教えてください。
ユーザーは SAML 認証を通じて Amazon Managed Grafana ワークスペースに正常にログインできます。ただし、管理者アクセス権はありません。
簡単な説明
SAML 認証で Amazon Managed Grafana ワークスペースをアクティブ化する場合、サービスと ID プロバイダー (IdP) アプリケーション間の属性アサーションマッピングが一致する必要があります。不一致があると、ユーザーは正しい権限を受け取ることができなくなります。この場合、アプリケーションにアクセスできるすべてのユーザーがビューアーとして接続します。
解決策
ブラウザの開発者ツールを使用して、SAML アサーションによって送信される属性を識別する
-
ブラウザの右上隅にあるメニューを選択します。次に、お使いのブラウザ用のデベロッパーツールを選択します。
Firefox: [その他のツール]、[ウェブデベロッパーツール] を選択します。
Chrome: [デベロッパーツール] を選択します。 -
デベロッパーツールメニューで、[ネットワーク] パネルを選択します。
-
同じブラウザタブで、Amazon Managed Grafana ワークスペースの URL に移動します。
-
[SAML でサインイン] を選択します。認証情報を入力し、IdP ログインページにサインインします。
-
デベロッパーツールペインの [ネットワーク] ログでアサーションコンシューマーサービス (ACS) の URL を検索します。
ヒント: acs ファイル名、POST メソッド、および 302 ステータスを検索します。 -
リクエストの詳細で、[リクエスト] (Firefox) または [ペイロード] (Chrome) タブを選択します。次に、SAML レスポンスからコンテンツをコピーします。
-
キャプチャされた SAML レスポンスは base64 でエンコードされます。これをデコードするには、base64 デコードツールを使用して XML タグ付き応答を抽出します。
注: SAML 応答には機密のセキュリティデータが含まれている可能性があるため、オンラインの base64 デコーダーを使用しないことがベストプラクティスです。
Windows システム用ビルトインオプション (PowerShell)
PS C:\> [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String("PD94bWwgdmVyc2lvbj0iMS4wIj8+PGV4YW1wbGU+PG1lc3NhZ2U+VGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgb2YgYmFzZTY0LWVuY29kZWQgWE1MIGZpbGUuIFJlcGxhY2UgaXQgYnkgdGhlIGFjdHVhbCBTQU1MIFJlc3BvbnNlIGVuY29kZWQgeW91IGdvdCBmcm9tIHRoZSBicm93c2VyIGRldmVsb3BlciB0b29sczwvbWVzc2FnZT48L2V4YW1wbGU+Cg=="))
macOS および Linux システム用のビルトインオプション
$ echo "PD94bWwgdmVyc2lvbj0iMS4wIj8+PGV4YW1wbGU+PG1lc3NhZ2U+VGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgb2YgYmFzZTY0LWVuY29kZWQgWE1MIGZpbGUuIFJlcGxhY2UgaXQgYnkgdGhlIGFjdHVhbCBTQU1MIFJlc3BvbnNlIGVuY29kZWQgeW91IGdvdCBmcm9tIHRoZSBicm93c2VyIGRldmVsb3BlciB0b29sczwvbWVzc2FnZT48L2V4YW1wbGU+Cg==" |base64 -d |xmllint --pretty 1 -
次のメッセージのような出力が表示されます。
<?xml version="1.0"?> <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Destination="https://g-0123456789.grafana-workspace.us-east-1.amazonaws.com/saml/acs" ID="ID\_76eb61f5-fb11-4f8b-bd7d-418f8a17156c" InResponseTo="id-ce1f5b28b091d0ebac109b5f34f125a18b7f94a5" IssueInstant="2023-04-28T10:19:57.780Z" Version="2.0"> <saml:Issuer>https://idp.example.com/saml</saml:Issuer> <dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"> REDACTED </dsig:Signature> <samlp:Status> <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/> </samlp:Status> <saml:Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" ID="ID\_a1234b56-789c-1234-d567-8e1234f56789" IssueInstant="2023-04-28T10:19:57.780Z" Version="2.0"> <saml:Issuer>https://idp.example.com/saml</saml:Issuer> <dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"> <dsig:SignedInfo> <dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> <dsig:Reference URI="#ID\_a1234b56-789c-1234-d567-8e1234f56789"> <dsig:Transforms> <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> <dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> <dsig:DigestValue>REDACTED</dsig:DigestValue> </dsig:Reference> </dsig:SignedInfo> <dsig:SignatureValue>REDACTED</dsig:SignatureValue> <dsig:KeyInfo> REDACTED </dsig:KeyInfo> </dsig:Signature> <saml:Subject> <saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">G-bd98f293-922c-4f70-a8c3-bc973a75d600</saml:NameID> <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> <saml:SubjectConfirmationData InResponseTo="id-ce1f5b28b091d0ebac109b5f34f125a18b7f94a5" NotOnOrAfter="2023-04-28T10:24:55.780Z" Recipient="https://g-0123456789.grafana-workspace.us-east-1.amazonaws.com/saml/acs"/> </saml:SubjectConfirmation> </saml:Subject> <saml:Conditions NotBefore="2023-04-28T10:19:55.780Z" NotOnOrAfter="2023-04-28T10:20:55.780Z"> <saml:AudienceRestriction> <saml:Audience>https://g-0123456789.grafana-workspace.us-east-1.amazonaws.com/saml/metadata</saml:Audience> </saml:AudienceRestriction> <saml:OneTimeUse/> </saml:Conditions> <saml:AuthnStatement AuthnInstant="2023-04-28T10:19:57.780Z" SessionIndex="a678db73-aaf9-4d34-8016-4deea551aaac::15728029-bd04-4e00-8ca6-acb338fde6fe" SessionNotOnOrAfter="2023-04-28T20:19:57.780Z"> <saml:AuthnContext> <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</saml:AuthnContextClassRef> </saml:AuthnContext> </saml:AuthnStatement> <saml:AttributeStatement> <saml:Attribute FriendlyName="Role" Name="Role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Admin</saml:AttributeValue> </saml:Attribute> <saml:Attribute FriendlyName="mail" Name="mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"> <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">user@example.com</saml:AttributeValue> </saml:Attribute> <saml:Attribute Name="displayName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">User</saml:AttributeValue> </saml:Attribute> </saml:AttributeStatement> </saml:Assertion> </samlp:Response>
- saml:AttributeStatement にある属性名と値を書き留めます。これらの値は、後のステップで必要になります。
Amazon Managed Grafana SAML 設定の属性をマッピングする
-
Amazon Managed Grafana コンソールを開きます。
-
左側のナビゲーションペインで、[すべてのワークスペース] を選択します。
-
SAML 認証を設定するワークスペースを選択します。
-
認証タブで [SAML 設定] を選択します。
-
ステップ 3 で、 アサーション属性をマッピングし、次の情報を入力します。
アサーション属性ロール: AttributeStatement に表示されている、SAML 属性の Name または FriendlyName を入力します。前述の SAML レスポンスの例では、この属性は Role です。
管理者ロールの値: これは、管理者ロールに付与するロール名をカンマで区切ったリストです。このリストは、Name または FriendlyName ロールの直下にマッピングされている AttributeValue にあります。前述の SAML レスポンスの例では、この値は Admin です。 -
[SAML 設定の保存] を選択して設定を完了します。
関連情報
- 言語
- 日本語
