Security Assertion Markup Language (SAML), kurumsal ağlarda kimlik doğrulama ve yetkilendirme süreçlerini merkezileştirmek için kullanılan açık standart bir protokoldür. FortiGate güvenlik duvarları, SAML 2.0 desteği ile güçlü Single Sign-On (SSO) yetenekleri sunarak, kullanıcı deneyimini iyileştirirken güvenlik yönetimini kolaylaştırır. Bu makalede, FortiGate üzerinde SAML entegrasyonunun detaylı implementasyonu, yapılandırma adımları, güvenlik değerlendirmeleri ve sorun giderme teknikleri ele alınmaktadır.
1. Giriş
Modern kurumsal ağlarda, kullanıcıların birden fazla uygulamaya ve servise erişim ihtiyacı, kimlik yönetimini karmaşık ve zorlu bir süreç haline getirmiştir. Geleneksel yaklaşımda, her uygulama için ayrı bir kullanıcı adı ve şifre yönetimi gerekir; bu durum hem kullanıcı deneyimini olumsuz etkiler hem de güvenlik açıklarına yol açabilir. SAML tabanlı Single Sign-On (SSO) çözümleri, bu soruna merkezi bir kimlik yönetimi yaklaşımı sunarak yanıt verir.
FortiGate, Fortinet’in next-generation firewall (NGFW) çözümü olarak, SAML 2.0 protokolünü destekleyerek SSL VPN, web filtreleme ve diğer güvenlik servisleri için entegre kimlik doğrulama yetenekleri sunar.
2. SAML Protokolü ve Temel Kavramlar
2.1. SAML Nedir?
SAML (Security Assertion Markup Language), farklı güvenlik domainleri arasında kimlik doğrulama ve yetkilendirme verilerinin değişimi için XML tabanlı bir standarttır. OASIS (Organization for the Advancement of Structured Information Standards) tarafından geliştirilmiş ve endüstri standardı haline gelmiştir.
2.2. SAML Mimarisi ve Bileşenleri
SAML mimarisi üç ana bileşenden oluşur:
Identity Provider (IdP): Kullanıcı kimliklerini yöneten ve doğrulayan merkezi otorite. Azure AD, Okta, OneLogin, ADFS gibi platformlar IdP olarak görev yapabilir.
Service Provider (SP): Korunan kaynakları barındıran ve kullanıcı erişimini kontrol eden sistem. FortiGate bu rolde görev yapar.
Principal (User): Kimlik doğrulama talep eden son kullanıcı veya entity.
2.3. SAML İş Akışı
SAML kimlik doğrulama süreci iki ana flow modeline dayanır:
SP-Initiated Flow: Kullanıcı önce Service Provider’a (FortiGate) erişim talebinde bulunur. FortiGate kullanıcıyı IdP’ye yönlendirir, kimlik doğrulama sonrası SAML assertion’ı alır ve erişime izin verir.
IdP-Initiated Flow: Kullanıcı doğrudan IdP portalından oturum açar ve buradan FortiGate’e yönlendirilir.
2.4. SAML Assertions
SAML assertion’ları, IdP tarafından dijital olarak imzalanmış ve kullanıcı hakkında bilgi içeren XML dokümanlardır. Üç tür assertion bulunur:
- Authentication Assertion: Kullanıcının kimlik doğrulamasını gerçekleştirdiğini belirtir
- Attribute Assertion: Kullanıcı öznitelikleri (email, grup üyeliği vb.) hakkında bilgi içerir
- Authorization Decision Assertion: Kullanıcının belirli kaynaklara erişim yetkisi hakkında karar verir
3. FortiGate’te SAML Entegrasyonunun Avantajları
FortiGate üzerinde SAML implementasyonu şu avantajları sağlar:
Merkezi Kimlik Yönetimi: Tüm kullanıcı hesapları IdP’de merkezi olarak yönetilir, böylece parola politikaları ve kullanıcı yaşam döngüsü tek noktadan kontrol edilir.
Gelişmiş Kullanıcı Deneyimi: Tek oturum açma sayesinde kullanıcılar birden fazla şifre hatırlamak zorunda kalmaz.
Güvenlik İyileştirmeleri: Multi-factor authentication (MFA) IdP seviyesinde uygulanabilir ve tüm entegre sistemlere yayılır.
Azaltılmış Operasyonel Yük: Şifre sıfırlama talepleri ve hesap yönetimi işleri minimalize edilir.
Uyumluluk ve Denetim: Merkezi loglama ve raporlama yetenekleri sayesinde compliance gereksinimlerini karşılamak kolaylaşır.
4. Ön Koşullar ve Planlama
4.1. Sistem Gereksinimleri
- FortiOS 5.6 veya üzeri (6.0+ önerilir)
- SAML 2.0 destekleyen bir IdP (Azure AD, Okta, ADFS, OneLogin vb.)
- SSL sertifikası (production ortamı için CA imzalı sertifika önerilir)
- NTP senkronizasyonu (zaman senkronizasyonu kritik önem taşır)
- İnternet bağlantısı (IdP ile iletişim için)
4.2. Planlama Hususları
Kimlik Kaynağı Seçimi: Hangi IdP kullanılacağı, mevcut altyapı ve entegrasyon ihtiyaçlarına göre belirlenmelidir.
Kullanıcı Öznitelik Mapping: IdP’den gelen hangi attribute’ların FortiGate’te hangi user field’larına map edileceği planlanmalıdır.
Group Mapping: LDAP/AD gruplarının FortiGate firewall policy’lerine nasıl map edileceği tasarlanmalıdır.
Fallback Mekanizması: SAML servisinin çalışmadığı durumlarda alternatif kimlik doğrulama yöntemleri planlanmalıdır.
5. FortiGate SAML Yapılandırması – Adım Adım
5.1. SAML SSO Yapılandırması
FortiGate CLI veya GUI üzerinden SAML yapılandırması gerçekleştirilebilir. Bu bölümde her iki yaklaşım da ele alınacaktır.
5.1.1. GUI Üzerinden Yapılandırma
Adım 1: SAML Server Oluşturma
1. User & Authentication > SAML SSO menüsüne gidin
2. "Create New" butonuna tıklayın
3. Aşağıdaki parametreleri doldurun:
- Name: IdP için tanımlayıcı bir isim (örn: "AzureAD-SAML")
- Entity ID: SP entity identifier (genellikle FortiGate FQDN)
- Single Sign-On URL: IdP'nin SSO endpoint URL'i
- Single Logout URL: IdP'nin SLO endpoint URL'i
- IdP Entity ID: IdP'nin unique identifier'ı
- IdP Single Sign-On URL: IdP'nin authentication endpoint'i
- IdP Single Logout URL: IdP'nin logout endpoint'i
- IdP Certificate: IdP'nin public sertifikasını import edin
Adım 2: Service Provider Ayarları
- SP Address: FortiGate'in external IP veya FQDN
- SP Port: HTTPS portu (genellikle 443)
- Default Login Page: SAML'i default login olarak ayarlayın (opsiyonel)
Adım 3: User Attribute Mapping
- Username: IdP'den gelen username attribute (genellikle 'username' veya 'email')
- Group Name: Grup bilgisi için attribute (genellikle 'group' veya 'memberOf')
5.1.2. CLI Üzerinden Yapılandırma
CLI yapılandırması daha detaylı kontrol sağlar:
config user saml
edit "AzureAD-SAML"
set entity-id "https://fortigate.company.com"
set single-sign-on-url "https://login.microsoftonline.com/tenant-id/saml2"
set single-logout-url "https://login.microsoftonline.com/tenant-id/saml2"
set idp-entity-id "https://sts.windows.net/tenant-id/"
set idp-single-sign-on-url "https://login.microsoftonline.com/tenant-id/saml2"
set idp-single-logout-url "https://login.microsoftonline.com/tenant-id/saml2"
set idp-cert "AzureAD-Certificate"
set user-name "username"
set group-name "group"
set digest-method sha256
set auth-url "https://fortigate.company.com/saml/login"
next
end
5.2. User Group Yapılandırması
SAML kullanıcılarını yönetmek için user group oluşturulmalıdır:
GUI Yapılandırması:
1. User & Authentication > User Groups'a gidin
2. "Create New" tıklayın
3. Group bilgilerini girin:
- Name: "SAML-VPN-Users"
- Type: Firewall
- Remote Groups: SAML server seçin ve "Match all users" veya
belirli grup filtresi ekleyin
CLI Yapılandırması:
config user group
edit "SAML-VPN-Users"
set member "AzureAD-SAML"
config match
edit 1
set server-name "AzureAD-SAML"
set group-name "VPN-Users"
next
end
next
end
5.3. SSL VPN için SAML Entegrasyonu
SSL VPN portal yapılandırması:
config vpn ssl settings
set servercert "Fortinet_SSL_Certificate"
set tunnel-ip-pools "SSLVPN_TUNNEL_ADDR1"
set tunnel-ipv6-pools "SSLVPN_TUNNEL_IPv6_ADDR1"
set port 443
set source-interface "wan1"
set source-address "all"
set default-portal "full-access"
config authentication-rule
edit 1
set groups "SAML-VPN-Users"
set portal "full-access"
set realm "saml"
next
end
end
5.4. Firewall Policy Yapılandırması
SAML authenticated kullanıcılar için firewall policy:
config firewall policy
edit 100
set name "SAML-SSL-VPN-to-LAN"
set srcintf "ssl.root"
set dstintf "port1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set groups "SAML-VPN-Users"
set nat enable
next
end
6. Identity Provider Yapılandırması
6.1. Azure AD Yapılandırması
Azure AD’de FortiGate için SAML uygulaması oluşturma:
Adım 1: Enterprise Application Oluşturma
1. Azure Portal > Azure Active Directory > Enterprise Applications
2. "New application" > "Create your own application"
3. Application name: "FortiGate SSL VPN"
4. "Integrate any other application you don't find in the gallery" seçin
Adım 2: Single Sign-On Yapılandırması
1. Single sign-on > SAML seçin
2. Basic SAML Configuration:
- Identifier (Entity ID): https://fortigate.company.com
- Reply URL: https://fortigate.company.com/saml/acs
- Sign on URL: https://fortigate.company.com
3. User Attributes & Claims:
- Name ID: user.userprincipalname
- Custom claim "group": user.groups
Adım 3: Sertifika İndirme
1. SAML Signing Certificate bölümünden
2. Certificate (Base64) formatında indirin
3. Bu sertifikayı FortiGate'e import edin
Adım 4: Azure AD URLs
Azure AD'den şu URL'leri kopyalayın:
- Login URL
- Azure AD Identifier
- Logout URL
Bu bilgiler FortiGate SAML yapılandırmasında kullanılacaktır.
6.2. Okta Yapılandırması
Okta SAML Application Setup:
1. Okta Admin Console > Applications > Create App Integration
2. SAML 2.0 seçin
3. General Settings:
- App name: FortiGate SSL VPN
4. SAML Settings:
- Single sign on URL: https://fortigate.company.com/saml/acs
- Audience URI: https://fortigate.company.com
- Name ID format: EmailAddress
- Application username: Email
5. Attribute Statements:
- username: user.email
- group: appuser.groups
6.3. ADFS Yapılandırması
ADFS Relying Party Trust Oluşturma:
# PowerShell ile ADFS yapılandırması
Add-ADFSRelyingPartyTrust -Name "FortiGate SAML" `
-Identifier "https://fortigate.company.com" `
-SamlEndpoint "https://fortigate.company.com/saml/acs" `
-EncryptionCertificate $cert `
-SignatureAlgorithm "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
# Claim Rules oluşturma
$rule1 = '@RuleName = "Send LDAP Attributes"
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname"]
=> issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"), query = ";mail,givenName;{0}", param = c.Value);'
Add-ADFSRelyingPartyTrustClaimRule -TargetName "FortiGate SAML" -ClaimRule $rule1
7. SAML Metadata Exchange
SAML entegrasyonunda metadata exchange kritik öneme sahiptir:
7.1. FortiGate Metadata Export
FortiGate SP metadata’sını export etme:
# CLI komutu
execute saml sp-metadata AzureAD-SAML
# Output'u kopyalayın ve IdP'ye import edin
Veya web interface üzerinden:
https://fortigate.company.com/saml/metadata/?idp=AzureAD-SAML
7.2. IdP Metadata Import
IdP metadata’sını FortiGate’e import etme:
config user saml
edit "AzureAD-SAML"
set idp-entity-id-from-metadata enable
set import-metadata-url "https://login.microsoftonline.com/tenant-id/federationmetadata/2007-06/federationmetadata.xml"
next
end
8. Test ve Doğrulama
8.1. Bağlantı Testi
SAML yapılandırmasını test etme adımları:
Adım 1: Basic Connectivity
# FortiGate'ten IdP'ye erişimi test edin
execute ping login.microsoftonline.com
# DNS çözümlemesini kontrol edin
execute dns-lookup login.microsoftonline.com
Adım 2: SSL VPN Login Test
1. Web browser'da https://fortigate.company.com adresine gidin
2. SAML login option'ını seçin
3. IdP login sayfasına yönlendirilmelisiniz
4. Credentials ile login olun
5. FortiGate SSL VPN portal'a erişim sağlanmalıdır
8.2. Debug ve Logging
Detaylı debug logging aktifleştirme:
# SAML debug'ı aktifleştir
diagnose debug application samld -1
diagnose debug enable
# SSL VPN debug
diagnose debug application sslvpn -1
diagnose debug enable
# Logs'ları gerçek zamanlı izleme
execute log filter category 1
execute log display
8.3. Assertion İnceleme
SAML assertion içeriğini inceleme:
# SAML assertion'ları log'larda görüntüleme
diagnose debug application samld -1
diagnose debug enable
# User login sırasında assertion details görüntülenir
9. Sorun Giderme (Troubleshooting)
9.1. Yaygın Hatalar ve Çözümleri
Hata 1: “SAML Login Failed – Invalid Response”
Olası nedenler:
- Zaman senkronizasyonu problemi
- Yanlış IdP certificate
- Signature verification hatası
Çözüm:
# NTP senkronizasyonunu kontrol edin
execute time
# IdP sertifikasını yeniden import edin
# Signature algorithm'ı kontrol edin (SHA-256 önerilir)
config user saml
edit "AzureAD-SAML"
set digest-method sha256
next
end
Hata 2: “User not found in group”
Olası nedenler:
- Group attribute mapping yanlış
- IdP’den grup bilgisi gelmiyor
- Group match configuration hatası
Çözüm:
# SAML assertion'daki group attribute'ü kontrol edin
diagnose debug application samld -1
# User group configuration'ı gözden geçirin
config user group
edit "SAML-VPN-Users"
show
next
end
Hata 3: “Redirect Loop”
Olası nedenler:
- ACS URL yanlış yapılandırılmış
- Entity ID uyuşmazlığı
- Infinite redirect loop
Çözüm:
# Entity ID ve ACS URL'leri kontrol edin
# IdP ve SP tarafında tutarlı olmalıdır
# FortiGate'te:
config user saml
edit "AzureAD-SAML"
set entity-id "https://fortigate.company.com"
set single-sign-on-url "exact-idp-url"
next
end
9.2. Log Analizi
Kritik log mesajları:
# Successful authentication
[samld] user '[email protected]' logged in successfully from IdP 'AzureAD-SAML'
# Failed authentication
[samld] SAML assertion validation failed: signature mismatch
# Time sync issue
[samld] SAML assertion expired (NotOnOrAfter condition failed)
# Group mapping issue
[samld] No matching group found for user '[email protected]'
9.3. Certificate Issues
Sertifika sorunlarını tespit ve çözme:
# FortiGate sertifikalarını listele
show vpn certificate local
# IdP certificate details
config user saml
edit "AzureAD-SAML"
show full-configuration
next
end
# Certificate expiration kontrolü
diagnose vpn ssl list
10. Güvenlik En İyi Uygulamaları
10.1. SAML Assertion Güvenliği
Assertion Signing: Tüm SAML assertion’larının IdP tarafından dijital olarak imzalanması zorunlu kılınmalıdır.
config user saml
edit "AzureAD-SAML"
set digest-method sha256
set signature-validation strict
next
end
Assertion Encryption: Hassas ortamlar için assertion encryption aktifleştirilmelidir.
Timestamp Validation: NotBefore ve NotOnOrAfter timestamp’lerinin strict validation’ı yapılmalıdır.
10.2. Network Security
SSL/TLS Configuration:
config vpn ssl settings
set ssl-min-proto-ver tls1-2
set ssl-max-proto-ver tls1-3
set algorithm high
end
Rate Limiting: Brute force saldırılarına karşı rate limiting uygulanmalıdır.
config user settings
set auth-timeout 30
set auth-invalid-max 5
set auth-lockout-duration 300
end
10.3. Monitoring ve Auditing
Comprehensive Logging:
config log setting
set fwpolicy-implicit-log enable
set local-in-allow enable
set local-in-deny-unicast enable
set local-out enable
end
config log memory filter
set severity information
set auth enable
end
SIEM Integration: FortiGate log’larının SIEM sistemine forward edilmesi:
config log syslogd setting
set status enable
set server "siem.company.com"
set port 514
set facility local7
set source-ip ''
end
10.4. Multi-Factor Authentication
IdP seviyesinde MFA zorlanması:
- Azure AD Conditional Access policies
- Okta Sign-On Policies
- ADFS MFA providers
FortiGate’te MFA enforcement:
config user setting
set auth-multi-factor enable
set auth-multi-factor-method email-based
end
11. Performance ve Scalability
11.1. Session Management
SAML session timeout yapılandırması:
config vpn ssl settings
set idle-timeout 1800
set auth-timeout 28800
set login-timeout 30
end
11.2. Connection Limits
Concurrent user limits:
config vpn ssl settings
set max-users 100
set max-login-retry 3
set login-throttling-rate 5
end
11.3. High Availability
HA cluster’da SAML yapılandırması:
# SAML configuration otomatik olarak sync olur
config system ha
set group-name "FortiGate-HA"
set mode a-p
set hbdev "port3" 50
set session-pickup enable
set session-pickup-connectionless enable
end
12. Gelişmiş Senaryolar
12.1. Çoklu IdP Desteği
Birden fazla IdP yapılandırması:
config user saml
edit "AzureAD-Employees"
set entity-id "https://fortigate.company.com/employees"
...
next
edit "Okta-Partners"
set entity-id "https://fortigate.company.com/partners"
...
next
end
12.2. Conditional Access
Attribute-based access control:
config user group
edit "SAML-Admin-Group"
set member "AzureAD-SAML"
config match
edit 1
set server-name "AzureAD-SAML"
set group-name "FortiGate-Admins"
next
end
next
edit "SAML-User-Group"
set member "AzureAD-SAML"
config match
edit 1
set server-name "AzureAD-SAML"
set group-name "FortiGate-Users"
next
end
next
end
# Farklı portals assign edilmesi
config vpn ssl settings
config authentication-rule
edit 1
set groups "SAML-Admin-Group"
set portal "full-access"
next
edit 2
set groups "SAML-User-Group"
set portal "web-access"
next
end
end
12.3. API Integration
FortiGate SAML kullanarak REST API authentication:
# API user oluşturma
config system api-user
edit "saml-api-user"
set accprofile "super_admin"
set vdom "root"
config trusthost
edit 1
set ipv4-trusthost 192.168.1.0/24
next
end
next
end
13. Migration ve Upgrade Stratejileri
13.1. Legacy Authentication’dan SAML’e Geçiş
Aşamalı migration stratejisi:
Faz 1: Parallel Deployment
# Hem local authentication hem SAML'i parallel çalıştırın
config vpn ssl settings
config authentication-rule
edit 1
set source-interface "wan1"
set source-address "trusted-ips"
set auth "local"
next
edit 2
set source-interface "wan1"
set auth "saml"
next
end
end
Faz 2: Pilot Group Testing
- Küçük bir kullanıcı grubunu SAML’e geçirin
- Monitoring ve feedback toplama
- Issues’ları çözme
Faz 3: Full Migration
- Tüm kullanıcıları SAML’e geçirin
- Local authentication’ı sadece emergency access için saklayın
13.2. FortiOS Upgrade Best Practices
SAML yapılandırması upgrade öncesi:
# Configuration backup
execute backup config management-station <server-ip> <filename>
# SAML configuration export
show user saml
show user group
# Test plan hazırlama
14. Compliance ve Regulatory Considerations
14.1. GDPR Compliance
SAML implementation GDPR requirements:
- User consent management
- Data minimization (sadece gerekli attribute’ler)
- Right to erasure implementation
- Audit logging
14.2. Industry Standards
Compliance frameworks:
- PCI DSS: MFA enforcement, access logging
- HIPAA: Encryption, audit trails
- SOC 2: Access controls, monitoring
- ISO 27001: Security policies, risk management
15. Sonuç
FortiGate üzerinde SAML entegrasyonu, kurumsal ağlarda güvenli ve kullanıcı dostu kimlik yönetimi sağlayan güçlü bir çözümdür. Bu makalede ele alınan konular ışığında:
Temel Başarı Faktörleri:
- Detaylı planlama ve tasarım
- Doğru IdP seçimi ve yapılandırması
- Kapsamlı test ve validation
- Sürekli monitoring ve optimization
Kritik Noktalar:
- Zaman senkronizasyonu mutlaka sağlanmalıdır
- Certificate management dikkatle yapılmalıdır
- Group mapping doğru planlanmalıdır
- Fallback authentication mechanism’ları hazır olmalıdır
Gelecek Gelişmeler:
- FIDO2/WebAuthn entegrasyonu
- Risk-based authentication
- Machine learning tabanlı anomaly detection
- Zero Trust Network Access (ZTNA) integration
SAML implementasyonu, organizasyonların security posture’ını güçlendirirken operational efficiency’i artıran stratejik bir yatırımdır. Doğru yapılandırma ve sürekli optimizasyon ile, kullanıcı deneyimi ve güvenlik arasında optimal denge sağlanabilir.
Kaynaklar ve İleri Okuma
- Fortinet Documentation Library: FortiOS SAML SSO Configuration Guide
- OASIS SAML 2.0 Technical Overview
- NIST Special Publication 800-63: Digital Identity Guidelines
- FortiGate Administration Guide – User Authentication
- RFC 7522: Security Assertion Markup Language (SAML) 2.0 Profile for OAuth 2.0
138 total views, 16 views today