Communitygithub.com

SAML Azure AD를 통한 ID 페더레이션 구축

온프레미스 Active Directory(AD FS 또는 타사 IdP 사용)와 Microsoft Entra ID 간에 SAML 2.0 ID 페더레이션을 구성합니다. 페더레이션 모델(AD FS, 암호 해시 동기화, 통과 인증, 타사 IdP) 및 SAML 인증 흐름을 다룹니다. 온프레미스 인증 권한을 클라우드 리소스로 확장하거나 Entra ID에 대한 하이브리드 ID SSO 아키텍처를 설계할 때 사용합니다.

SAML Azure AD를 통한 ID 페더레이션 구축란 무엇인가요?

이 스킬은 조직의 온프레미스 Active Directory(AD FS 또는 타사 SAML IdP 사용)와 Microsoft Entra ID(이전 Azure AD) 간에 SAML 2.0 ID 페더레이션을 구축하는 방법에 대한 포괄적인 가이드를 제공합니다. AD FS 기반 페더레이션, 암호 해시 동기화(PHS), 통과 인증(PTA), 타사 IdP 연동 등 다양한 페더레이션 모델을 다룹니다. SAML 인증 흐름, 페더레이션 신뢰 구성 요소(토큰 서명 인증서, 페더레이션 메타데이터, 클레임 규칙)에 대한 자세한 설명을 포함하며, AD FS 인프라 준비부터 Azure AD 페더레이션 도메인 구성, AD FS 클레임 규칙 설정, 타사 SaaS 애플리케이션 페더레이션 구성, 인증서 수명 주기 관리까지의 전체 워크플로우를 단계별로 안내합니다. 또한 검증 체크리스트와 참조 자료를 제공하여 보안 아키텍트, ID 관리자 및 엔지니어가 엔터프라이즈급 하이브리드 ID SSO 솔루션을 안전하게 구현할 수 있도록 지원합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/building-identity-federation-with-saml-azure-ad

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

SAML Azure AD를 통한 ID 페더레이션 구축은(는) 무엇을 하나요?

개요

ID 페더레이션을 사용하면 한 ID 공급자가 인증한 사용자가 별도의 자격 증명을 유지하지 않고도 다른 공급자가 관리하는 리소스에 액세스할 수 있습니다. 이 스킬은 온프레미스 Active Directory(AD FS 또는 타사 IdP 사용)와 Microsoft Entra ID(이전 Azure AD) 간에 SAML 2.0 페더레이션을 설정하고 타사 SaaS 애플리케이션에 대한 페더레이션 SSO를 구성하는 방법을 다룹니다. 페더레이션은 암호 동기화 문제를 제거하고 인증 권한을 온프레미스에 유지하면서 SSO를 클라우드 리소스로 확장합니다.

사용 시기

  • 환경에서 SAML Azure AD를 통한 ID 페더레이션 구축을 배포하거나 구성할 때
  • 규정 준수 요구 사항에 맞는 보안 제어를 설정할 때
  • 이 도메인에 대한 보안 아키텍처를 구축하거나 개선할 때
  • 이 구현이 필요한 보안 평가를 수행할 때

전제 조건

  • 온프레미스 Active Directory 도메인
  • AD FS 2019+ 또는 타사 SAML IdP(Okta, Ping 등)
  • Microsoft Entra ID 테넌트(P1 또는 P2 라이선스 권장)
  • Azure AD Connect(백업으로 암호 해시 동기화를 사용하는 하이브리드 ID의 경우)
  • 페더레이션 엔드포인트용 공용 TLS 인증서
  • 페더레이션 서비스 이름에 대한 DNS 레코드

핵심 개념

페더레이션 모델

모델인증 기관사용 사례
페더레이션(AD FS)온프레미스 AD FS인증을 온프레미스에 유지해야 하는 규제 요구 사항
관리(PHS)암호 해시 동기화를 사용한 Azure AD가장 간단한 클라우드 인증, AD FS 불필요
관리(PTA)통과 에이전트를 통한 온프레미스온프레미스 AD에 대해 검증된 클라우드 인증
타사 페더레이션외부 IdP(Okta, Ping)다중 IdP 환경

SAML 페더레이션 아키텍처

사용자 → 클라우드 앱(SP)
   │
   └── Azure AD로 리디렉션
          │
          ├── Azure AD가 페더레이션 도메인 확인
          │
          └── 온프레미스 AD FS로 리디렉션
                 │
                 ├── AD FS가 Active Directory에 대해 인증
                 │
                 ├── AD FS가 SAML 토큰 발급
                 │
                 └── Azure AD로 토큰 전송
                        │
                        ├── Azure AD가 페더레이션 트러스트 검증
                        │
                        ├── Azure AD가 자체 토큰 발급
                        │
                        └── 사용자가 클라우드 앱에 대한 액세스 토큰 수신

페더레이션 트러스트 구성 요소

구성 요소설명
토큰 서명 인증서IdP가 SAML 어설션을 서명하는 데 사용하는 X.509 인증서
페더레이션 메타데이터IdP 엔드포인트 및 기능을 설명하는 XML 문서
신뢰 당사자 트러스트각 SP(Azure AD)에 대한 AD FS의 구성
클레임 규칙AD 속성을 SAML 클레임으로 변환
발급자 URIIdP(엔터티 ID)의 고유 식별자

워크플로우

1단계: AD FS 인프라 준비

# AD FS 역할 설치
Install-WindowsFeature ADFS-Federation -IncludeManagementTools

# AD FS 팜 구성
Install-AdfsFarm `
    -CertificateThumbprint $certThumbprint `
    -FederationServiceDisplayName "Corp Federation Service" `
    -FederationServiceName "fs.corp.example.com" `
    -ServiceAccountCredential $gmsaCredential

# AD FS가 작동 중인지 확인
Get-AdfsProperties | Select-Object HostName, Identifier, FederationPassiveAddress

2단계: Azure AD 페더레이션 도메인 구성

# Microsoft Graph PowerShell 모듈 설치
Install-Module Microsoft.Graph -Scope CurrentUser

# Microsoft Graph에 연결
Connect-MgGraph -Scopes "Domain.ReadWrite.All"

# 관리 도메인을 페더레이션 도메인으로 변환
# AD FS 페더레이션 메타데이터 URL 사용
$domainId = "corp.example.com"
$federationConfig = @{
    issuerUri = "http://fs.corp.example.com/adfs/services/trust"
    metadataExchangeUri = "https://fs.corp.example.com/adfs/services/trust/mex"
    passiveSignInUri = "https://fs.corp.example.com/adfs/ls/"
    signOutUri = "https://fs.corp.example.com/adfs/ls/?wa=wsignout1.0"
    signingCertificate = $base64Cert
    preferredAuthenticationProtocol = "saml"
}

# 도메인에 페더레이션 설정 적용
New-MgDomainFederationConfiguration -DomainId $domainId -BodyParameter $federationConfig

3단계: AD FS 클레임 규칙 구성

# Azure AD에 대한 신뢰 당사자 트러스트 추가
Add-AdfsRelyingPartyTrust `
    -Name "Microsoft Office 365 Identity Platform" `
    -MetadataUrl "https://nexus.microsoftonline-p.com/federationmetadata/2007-06/federationmetadata.xml"

# 클레임 규칙 구성
$rules = @"
@RuleTemplate = "LdapClaims"
@RuleName = "AD 속성 추출"
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname",
   Issuer == "AD AUTHORITY"]
=> issue(store = "Active Directory",
   types = ("http://schemas.xmlsoap.org/claims/UPN",
            "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
            "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",
            "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"),
   query = ";userPrincipalName,mail,givenName,sn;{0}",
   param = c.Value);

@RuleTemplate = "PassThroughClaims"
@RuleName = "UPN을 NameID로 통과"
c:[Type == "http://schemas.xmlsoap.org/claims/UPN"]
=> issue(Type = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
   Issuer = c.Issuer, OriginalIssuer = c.OriginalIssuer,
   Value = c.Value,
   ValueType = c.ValueType,
   Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/format"]
       = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent");
"@

Set-AdfsRelyingPartyTrust `
    -TargetName "Microsoft Office 365 Identity Platform" `
    -IssuanceTransformRules $rules

4단계: 타사 SaaS 페더레이션 구성

Azure AD를 통해 SAML SSO를 지원하는 각 SaaS 애플리케이션:

  1. Microsoft Entra 관리 센터 > 엔터프라이즈 애플리케이션으로 이동
  2. 갤러리에서 애플리케이션 추가(또는 사용자 지정 SAML 생성)
  3. Single Sign-On > SAML 구성:
    • 식별자(엔터티 ID): 애플리케이션의 엔터티 ID
    • 회신 URL(ACS): 애플리케이션의 어설션 소비자 서비스 URL
    • 로그온 URL: 애플리케이션의 로그인 URL
  4. 사용자 속성/클레임 매핑:
    • NameID: user.userprincipalname(이메일 형식)
    • 애플리케이션에 필요한 추가 클레임
  5. 페더레이션 메타데이터 XML 또는 인증서 다운로드
  6. Azure AD의 페더레이션 세부 정보를 사용하여 SaaS 앱 구성

5단계: 인증서 수명 주기 관리

AD FS 토큰 서명 인증서는 만료되므로 갱신해야 합니다.

# 현재 인증서 만료 확인
Get-AdfsCertificate -CertificateType Token-Signing | Select-Object Thumbprint, NotAfter

# AD FS는 자동 롤오버 지원(기본적으로 활성화됨)
Get-AdfsProperties | Select-Object AutoCertificateRollover

# 수동 회전이 필요한 경우:
# 1. 새 인증서를 보조 인증서로 추가
Set-AdfsCertificate -CertificateType Token-Signing -Thumbprint $newThumbprint -IsPrimary $false
# 2. Azure AD를 새 인증서로 업데이트
# 3. 주 인증서로 승격
Set-AdfsCertificate -CertificateType Token-Signing -Thumbprint $newThumbprint -IsPrimary $true
# 4. 이전 인증서 제거
Remove-AdfsCertificate -CertificateType Token-Signing -Thumbprint $oldThumbprint

검증 체크리스트

  • AD FS 팜이 유효한 TLS 및 토큰 서명 인증서로 작동 중
  • Azure AD 도메인이 올바른 메타데이터로 페더레이션 도메인으로 구성됨
  • 클레임 규칙이 AD 속성을 SAML 어설션으로 적절히 변환함
  • 테스트 사용자가 페더레이션 흐름을 통해 엔드투엔드로 인증할 수 있음
  • AD FS 또는 Azure AD 조건부 액세스 수준에서 MFA가 적용됨
  • 인증서 자동 롤오버가 활성화되었거나 수동 회전이 예약됨
  • 페더레이션 메타데이터 엔드포인트에 공개적으로 액세스 가능
  • 무차별 대입 공격 방지를 위한 스마트 잠금이 구성됨
  • AD FS에 엑스트라넷 잠금 정책이 구성됨
  • AD FS 상태 및 인증서 만료에 대한 모니터링이 구성됨
  • 재해 복구: 관리되는 인증 대체 방법이 문서화됨

참조

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

관련 스킬