Chuyển đến nội dung
Skillpedia
Bảo mật35k · #7698

building-identity-federation-with-saml-azure-ad

Skill này làm gì

Công cụ này giúp kết nối hệ thống đăng nhập của công ty (nơi bạn nhập mật khẩu) với các dịch vụ đám mây như Microsoft 365. Nhờ vậy, bạn dùng cùng một mật khẩu để truy cập cả hai nơi, giúp việc truy cập an toàn và tiện hơn.

Khi nào nên dùng

  • ✓Khi bạn muốn dùng cùng một mật khẩu để truy cập hệ thống công ty và các dịch vụ đám mây.
  • ✓Khi bạn cần hệ thống đăng nhập của công ty chịu trách nhiệm xác minh danh tính của bạn, kể cả với dịch vụ đám mây.
  • ✓Khi bạn thiết lập quyền truy cập cho dịch vụ đám mây mới và muốn nó hoạt động liền mạch với hệ thống đăng nhập hiện có.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/building-identity-federation-with-saml-azure-ad/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/building-identity-federation-with-saml-azure-ad/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Thiết lập đăng nhập một lần (SSO) để tôi có thể dùng mật khẩu công ty truy cập Microsoft 365.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ thiết lập kết nối an toàn giữa hệ thống đăng nhập của công ty và dịch vụ đám mây bằng giao thức SAML. Nhờ vậy, khi bạn truy cập dịch vụ đám mây, dịch vụ sẽ hỏi hệ thống công ty xác nhận bạn là ai, và nếu đúng thì bạn được vào mà không cần nhập lại mật khẩu.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Building Identity Federation with SAML Azure AD

Overview

Identity federation enables users authenticated by one identity provider to access resources managed by another without maintaining separate credentials. This skill covers establishing SAML 2.0 federation between an organization's on-premises Active Directory (via AD FS or third-party IdP) and Microsoft Entra ID (formerly Azure AD), as well as configuring federated SSO for third-party SaaS applications. Federation eliminates password synchronization concerns and keeps authentication authority on-premises while extending SSO to cloud resources.

When to Use

  • When deploying or configuring building identity federation with saml azure ad capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • On-premises Active Directory domain
  • AD FS 2019+ or third-party SAML IdP (Okta, Ping, etc.)
  • Microsoft Entra ID tenant (P1 or P2 license recommended)
  • Azure AD Connect (if using hybrid identity with password hash sync as backup)
  • Public TLS certificate for federation endpoint
  • DNS records for federation service name

Core Concepts

Federation Models

Model Authentication Authority Use Case
Federated (AD FS) On-premises AD FS Regulatory requirement to keep auth on-prem
Managed (PHS) Azure AD with password hash sync Simplest cloud auth, AD FS not needed
Managed (PTA) On-premises via pass-through agent Cloud auth validated against on-prem AD
Third-Party Federation External IdP (Okta, Ping) Multi-IdP environment

SAML Federation Architecture

User → Cloud App (SP)
   │
   └── Redirect to Azure AD
          │
          ├── Azure AD checks federated domain
          │
          └── Redirect to on-premises AD FS
                 │
                 ├── AD FS authenticates against Active Directory
                 │
                 ├── AD FS issues SAML token
                 │
                 └── Token posted back to Azure AD
                        │
                        ├── Azure AD validates federation trust
                        │
                        ├── Azure AD issues its own token
                        │
                        └── User receives access token for cloud app

Federation Trust Components

Component Description
Token-Signing Certificate X.509 certificate used by IdP to sign SAML assertions
Federation Metadata XML document describing IdP endpoints and capabilities
Relying Party Trust Configuration in AD FS for each SP (Azure AD)
Claims Rules Transform AD attributes into SAML claims
Issuer URI Unique identifier for the IdP (entity ID)

Workflow

Step 1: Prepare AD FS Infrastructure

# Install AD FS role
Install-WindowsFeature ADFS-Federation -IncludeManagementTools

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

# Verify AD FS is operational
Get-AdfsProperties | Select-Object HostName, Identifier, FederationPassiveAddress

Step 2: Configure Azure AD Federated Domain

# Install Microsoft Graph PowerShell module
Install-Module Microsoft.Graph -Scope CurrentUser

# Connect to Microsoft Graph
Connect-MgGraph -Scopes "Domain.ReadWrite.All"

# Convert managed domain to federated
# Using AD FS federation metadata 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"
}

# Apply federation settings to domain
New-MgDomainFederationConfiguration -DomainId $domainId -BodyParameter $federationConfig

Step 3: Configure AD FS Claims Rules

# Add Relying Party Trust for Azure AD
Add-AdfsRelyingPartyTrust `
    -Name "Microsoft Office 365 Identity Platform" `

…
Câu hỏi thường gặp

“Identity federation” là gì?

Giống như một chiếc thẻ thông hành chung. Thay vì mỗi nơi một thẻ, bạn dùng một thẻ chính (đăng nhập công ty) được chấp nhận ở nhiều nơi (dịch vụ đám mây).

Vì sao dùng SAML?

SAML là chuẩn bảo mật được dùng rộng rãi, cho phép các hệ thống trao đổi thông tin về việc người dùng là ai và họ có được truy cập một thứ gì đó hay không.

Tôi có cần đồng bộ mật khẩu lên đám mây không?

Không nhất thiết. Với federation, việc xác minh mật khẩu vẫn do hệ thống công ty đảm nhận, không cần gửi mật khẩu lên đám mây.

Chi tiết

Mô tả gốc của tác giả

Configure SAML 2.0 identity federation between on-premises Active Directory (via AD FS or a third-party IdP) and Microsoft Entra ID, covering federation models (AD FS, password hash sync, pass-through auth, third-party IdP) and the SAML authentication flow. Use when extending on-premises authentication authority to cloud resources or designing hybrid identity SSO architecture for Entra ID.

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7698
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự