Amazon Managed Grafana 작업 공간의 SAML 인증 사용자에게 관리자 액세스 권한을 부여하려면 어떻게 해야 합니까?

3분 분량
0

사용자는 SAML 인증을 통해 내 Amazon Managed Grafana 작업 공간에 성공적으로 로그인할 수 있습니다. 하지만 관리자 액세스 권한은 없습니다.

간략한 설명

SAML 인증을 통해 Amazon Managed Grafana 작업 공간을 활성화할 때는 서비스와 ID 제공업체(IdP) 애플리케이션 간의 속성 어설션 매핑이 일치해야 합니다. 일치하지 않으면 사용자가 올바른 권한을 받을 수 없습니다. 이 경우, 애플리케이션에 액세스할 수 있는 모든 사용자가 뷰어로 연결됩니다.

해결 방법

브라우저 개발자 도구를 사용하여 SAML 어설션에 의해 전송되는 속성을 식별할 수 있습니다.

1.    브라우저의 오른쪽 상단에서 메뉴를 선택합니다. 그런 다음 브라우저에 맞는 개발자 도구를 선택합니다.
**Firefox:**추가 도구, 웹 개발자 도구를 선택합니다.
Chrome:****개발자 도구를 선택합니다.

2.    개발자 도구 메뉴에서 네트워크 패널을 선택합니다.

3.    동일한 브라우저 탭에서 Amazon Managed Grafana workspace URL로 이동합니다.

4.    SAML로 로그인을 선택합니다. 보안 인증 정보를 입력한 다음, IdP 로그인 페이지에 로그인합니다.

5.    개발자 도구 창의 네트워크 로그에서 Assertion Consumer Service(ACS) URL을 찾으세요.
**팁:**acs 파일 이름, POST 메서드 및 302 상태를 검색합니다.

6.    요청 세부 정보에서 요청 (Firefox) 또는 페이로드 (Chrome) 탭을 선택합니다. 그런 다음, SAML 응답에서 콘텐츠를 복사합니다.

7.    캡처된 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>

8.    saml:AttributeStatement의 속성 이름과 값을 기록해 두세요. 이 값은 이후 단계에서 필요합니다.

Amazon Managed Grafana SAML 구성의 매핑 속성

1.    Amazon Managed Grafana 콘솔을 엽니다.

2.    왼쪽 탐색 창에서 모든 작업 영역을 선택합니다.

3.    SAML 인증을 구성하려는 작업 영역을 선택합니다.

4.    인증 탭에서 SAML 구성을 선택합니다.

5.    3단계에서, 어설션 속성을 매핑하려면 다음 정보를 입력합니다.
어설션 속성 역할: AttributeStatement 아래에 나열된 SAML 속성 Name 또는 FriendlyName을 입력합니다. 이전 SAML 응답 예제에서 이 속성은 Role입니다.
**관리자 역할 값:**이 목록은 관리자 역할에 부여하는 역할 이름을 쉼표로 구분한 목록입니다. 이 목록은 속성 Name 또는 FriendlyName 역할 바로 아래에 매핑되는 AttributeValue에 있습니다. 이전 SAML 응답 예제에서 이 값은 Admin입니다.

6.    구성을 완료하려면 SAML 구성 저장을 선택합니다.

관련 정보

Amazon Managed Grafana 작업 영역에서 SAML 사용

문제 해결을 위해 브라우저에서 SAML 응답을 보는 방법

AWS 공식
AWS 공식업데이트됨 일 년 전