Knowledge Center Monthly Newsletter - September 2025
Stay up to date with the latest from the Knowledge Center. See all new Knowledge Center articles published in the last month, and re:Post’s top contributors.
Amazon Cognito를 외부 SAML ID 제공업체와 안전하게 통합하고 구성하려면 어떻게 해야 합니까?
외부 SAML ID 제공업체(idP)의 암호화된 SAML 어설션을 사용하도록 Amazon Cognito 사용자 풀을 구성하려고 합니다. 애플리케이션의 사용자 인증에 보안을 유지하고 싶습니다.
해결 방법
사용자 풀에 SAML IdP 추가
Amazon Cognito 사용자 풀이 없는 경우 사용자 풀 시작하기를 참조하십시오. 사용자 풀을 만든 후 IdP 측에서 SAML 애플리케이션을 구성합니다. Amazon Cognito 사용자 풀에 SAML IdP를 추가하려면 사용자 풀에서 SAML ID 제공업체 추가 및 관리를 참조하십시오.
SAML IdP에 암호화 인증서를 제공하여 암호화된 SAML 어설션을 Amazon Cognito로 전송
먼저 Amazon Cognito 콘솔에서 암호화 인증서를 다운로드합니다. 그런 다음, SAML IdP의 구성 인터페이스에서 암호화 인증서를 가져옵니다. 암호화 인증서를 가져오고 활성화하는 방법에 대한 지침은 IdP 설명서를 참조하십시오. 예를 들어 Microsoft Learn 웹 사이트의 Microsoft Entra 관리 센터에서 토큰 암호화 구성을 참조하십시오.
암호화된 SAML 어설션 흐름 확인
다음 단계를 완료하십시오.
- 브라우저의 개발자 도구를 열고 HTTP 아카이브(HAR) 파일을 만듭니다.
- Amazon Cognito 사용자 풀의 관리형 로그인 페이지로 이동합니다.
- SAML IdP를 선택합니다. Amazon Cognito가 IdP의 로그인 페이지로 리디렉션합니다.
- HAR 파일에서 IdP가 saml2/idpresponse 엔드포인트로 보낸 SAML 어설션 요청을 검색합니다.
- 브라우저에서 HAR 파일의 SAML 어설션 응답을 확인합니다.
암호화된 SAML 어설션이 있는 디코딩된 SAML 응답의 예:
<saml:EncryptedAssertion> <xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Element"> <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/> <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <xenc:EncryptedKey> <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/> <xenc:CipherData> <xenc:CipherValue> <!-- Encrypted key data --> hY7PK8L9eM+2Uw7....[abbreviated]....4nmB2gTfLwqX= </xenc:CipherValue> </xenc:CipherData> </xenc:EncryptedKey> </ds:KeyInfo> <xenc:CipherData> <xenc:CipherValue> <!-- Encrypted assertion data --> kB4urcHh7K5HHJ....[abbreviated]....8JpWGpfTj= </xenc:CipherValue> </xenc:CipherData> </xenc:EncryptedData> </saml:EncryptedAssertion>
암호화를 사용하지 않는 디코딩된 SAML 응답의 예:
<saml:Assertion ID="ASRT#########" Version="2.0" IssueInstant="2024-07-10T10:00:00Z"> <saml:Issuer>https://idp.example.com/saml</saml:Issuer> <saml:Subject> <saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"> USER123456789 </saml:NameID> <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> <saml:SubjectConfirmationData NotOnOrAfter="2024-07-10T11:00:00Z" Recipient="https://app.example.com/saml/acs"/> </saml:SubjectConfirmation> </saml:Subject> <saml:Conditions NotBefore="2024-07-10T10:00:00Z" NotOnOrAfter="2024-07-10T11:00:00Z"> <saml:AudienceRestriction> <saml:Audience>https://app.example.com/saml</saml:Audience> </saml:AudienceRestriction> </saml:Conditions> <saml:AuthnStatement AuthnInstant="2024-07-10T10:00:00Z" SessionNotOnOrAfter="2024-07-10T18:00:00Z" SessionIndex="SESSION123456789"> <saml:AuthnContext> <saml:AuthnContextClassRef> urn:oasis:names:tc:SAML:2.0:ac:classes:Password </saml:AuthnContextClassRef> </saml:AuthnContext> </saml:AuthnStatement> <saml:AttributeStatement> <saml:Attribute Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <saml:AttributeValue>user123</saml:AttributeValue> </saml:Attribute> <saml:Attribute Name="email" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <saml:AttributeValue>user@example.com</saml:AttributeValue> </saml:Attribute> <saml:Attribute Name="roles" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <saml:AttributeValue>user</saml:AttributeValue> <saml:AttributeValue>admin</saml:AttributeValue> </saml:Attribute> </saml:AttributeStatement> </saml:Assertion>
참고: 응답의 saml:EncryptedAssertion 요소는 암호화된 SAML 어설션이 있음을 확인합니다. IdP만 올바른 프라이빗 키로 어설션 콘텐츠를 해독하고 읽을 수 있습니다. 응답에 saml:EncryptedAssertion이 없으면 사용자 및 인증 세부 정보를 일반 텍스트로 표시하는 암호화되지 않은 SAML 어설션이 있는 것입니다.
관련 정보
- 언어
- 한국어

관련 콘텐츠
- 질문됨 일 년 전