This guide provides step-by-step instructions for configuring SAML SSO with Active Directory Federation Services (AD FS) for the EvTrack Visitor Management System.
Note: If your AD FS instance synchronizes with Microsoft Entra ID (formerly Azure AD), consider using OpenID Connect (OIDC) instead of SAML for enhanced compatibility and features. This guide supports AD FS 2016, 2019, and 2022.
Table of Contents
- Prerequisites
- AD FS Server Configuration
- EvTrack Application Configuration
- SAML Single Logout (SLO) Configuration
- SSL Certificate Configuration
- Testing the Configuration
- Troubleshooting
- Security Considerations
- Additional Resources
Prerequisites
Before configuring SAML SSO with AD FS, ensure you have:
- Valid FQDN with SSL/HTTPS: Your EvTrack instance must be accessible via HTTPS with a valid SSL certificate
- AD FS Server: Active Directory Federation Services 2016, 2019, or 2022 properly configured with HTTPS endpoint
- AD FS Administrative Access: Permissions to configure Relying Party Trusts and Claim Rules
- EvTrack Administrative Access: Access to modify application.properties configuration
- Email Domain Federation: Your organization’s email domain must be federated with AD FS
- Network Connectivity: EvTrack server must be able to reach the AD FS server over HTTPS
AD FS Server Configuration
Part 1: Register EvTrack as Relying Party Trust
AD FS uses “Relying Party Trusts” to represent external applications like EvTrack. Follow these steps to register EvTrack:
Step 1: Open AD FS Management Console
- Log in to your AD FS server
- Open Server Manager → Tools → AD FS Management
- Navigate to Trust Relationships → Relying Party Trusts
Step 2: Add Relying Party Trust
- In the Actions pane, click Add Relying Party Trust…
- The Add Relying Party Trust Wizard will open
- Click Start on the Welcome page
Step 3: Select Data Source
- Select Enter data about the relying party manually
- Click Next
relying party manually” selected
Step 4: Specify Display Name
- Display name: Enter
EvTrack Visitor Management - Notes (optional): Enter a description like “SAML SSO for EvTrack visitor management system”
- Click Next
Step 5: Choose Profile
- Select AD FS profile
- Click Next
Step 6: Configure Certificate
- Leave the certificate configuration empty (optional for SAML)
- Click Next
Step 7: Configure URL
- Check Enable support for the SAML 2.0 WebSSO protocol
- Relying party SAML 2.0 SSO service URL: Enter the Assertion Consumer Service (ACS) URL
https://YOUR-FQDN/login/saml2/sso/adfsReplace
YOUR-FQDNwith your actual EvTrack domain (e.g.,evtrack.company.com) - Click Next
Important: The URL must match exactly, including the registration ID
adfsat the end. This registration ID identifies the AD FS provider in EvTrack’s multi-provider SAML configuration.
Step 8: Configure Identifiers
- Relying party trust identifier: Enter
evtrack-visitor-management - Click Add to add the identifier to the list
- Click Next
Note: This identifier is called the “Entity ID” in SAML terminology and must match the configuration in EvTrack’s application.properties.
Step 9: Choose Access Control Policy
- Select an access control policy:
- Permit Everyone - Allows all authenticated AD users (recommended for initial setup)
- Permit Specific Group - Restrict access to specific AD security group (recommended for production)
- Click Next
Security Recommendation: For production environments, create a dedicated AD security group (e.g., “EvTrack-Users”) and restrict access to members of this group.
Step 10: Review and Finish
- Review all settings on the summary page
- Ensure Configure claims issuance policy for this application is checked
- Click Next
- Click Close to finish the wizard
The Claim Rules editor will open automatically. Proceed to Part 2 to configure claim rules.
Part 2: Configure Claim Rules
Claim rules map Active Directory attributes to SAML claims that EvTrack uses to identify and provision users.
Understanding Claim Rules
EvTrack requires these SAML claims for user provisioning:
- Given Name - User’s first name
- Surname - User’s last name
- Email Address or User Principal Name (UPN) - User identifier
AD FS provides two mapping options based on your Active Directory schema:
Option A: Email-Based Identifier (Recommended)
Use this option if your users have email addresses populated in Active Directory (mail attribute).
Step 1: Add LDAP Attribute Rule
- In the Edit Claim Issuance Policy dialog, click Add Rule…
- Claim rule template: Select Send LDAP Attributes as Claims
- Click Next
Step 2: Configure Rule
- Claim rule name: Enter
EvTrack User Attributes (Email) - Attribute store: Select Active Directory
-
Mapping of LDAP attributes to outgoing claim types:
LDAP Attribute Outgoing Claim Type Given-Name http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givennameSurname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surnameE-Mail-Addresses http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress - Click Finish
Step 3: Transform Email to Name ID
EvTrack expects the user identifier in the SAML Name ID field:
- Click Add Rule… again
- Claim rule template: Select Transform an Incoming Claim
- Click Next
- Claim rule name: Enter
Transform Email to Name ID - Incoming claim type: Select
E-Mail Address - Outgoing claim type: Select
Name ID - Outgoing name ID format: Select
Email - Pass through all claim values: Checked
- Click Finish
Option B: UPN-Based Identifier (Alternative)
Use this option if email addresses are not populated or you prefer to use User Principal Names.
Step 1: Add LDAP Attribute Rule
- In the Edit Claim Issuance Policy dialog, click Add Rule…
- Claim rule template: Select Send LDAP Attributes as Claims
- Click Next
Step 2: Configure Rule
- Claim rule name: Enter
EvTrack User Attributes (UPN) - Attribute store: Select Active Directory
-
Mapping of LDAP attributes to outgoing claim types:
LDAP Attribute Outgoing Claim Type Given-Name http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givennameSurname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surnameUser-Principal-Name http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn - Click Finish
Step 3: Transform UPN to Name ID
- Click Add Rule… again
- Claim rule template: Select Transform an Incoming Claim
- Click Next
- Claim rule name: Enter
Transform UPN to Name ID - Incoming claim type: Select
UPN - Outgoing claim type: Select
Name ID - Outgoing name ID format: Select
Unspecified - Pass through all claim values: Checked
- Click Finish
Step 4: Finalize Claim Rules
- Click OK to close the Edit Claim Issuance Policy dialog
- The claim rules are now configured
Important: Choose either Option A (Email) or Option B (UPN), not both. Using both configurations may cause conflicts in user identification.
Part 3: Optional - Group Membership Claims
If you want to use Active Directory groups for role-based authorization in EvTrack:
Step 1: Add Group Claim Rule
- Right-click your EvTrack Relying Party Trust → Edit Claim Issuance Policy…
- Click Add Rule…
- Claim rule template: Select Send Group Membership as a Claim
- Click Next
Step 2: Configure Group Claim
- Claim rule name: Enter
EvTrack Admin Group - User’s group: Click Browse and select your AD group (e.g.,
EvTrack-Admins) - Outgoing claim type: Enter
groups- the claim must be delivered as the SAML attribute namegroups, because EvTrack reads thegroupsassertion attribute and maps each of its values to a granted authority (e.g.,ROLE_ADMIN) - Outgoing claim value: Enter
ROLE_ADMIN(or your desired role identifier) - Click Finish
Step 3: Repeat for Additional Roles
Create additional rules for other security groups as needed (e.g., EvTrack-Users, EvTrack-Managers).
Note: Group claim integration requires additional configuration in EvTrack’s authorization logic. Contact EvTrack support for guidance on role mapping.
Part 4: Obtain Federation Metadata URL
EvTrack needs the AD FS federation metadata URL to configure trust automatically.
Step 1: Locate Federation Metadata Endpoint
- In AD FS Management, navigate to Service → Endpoints
- Locate the Metadata section
- Find the endpoint with Type:
Federation Metadata - The URL Path will be:
/FederationMetadata/2007-06/FederationMetadata.xml
Step 2: Construct Full Metadata URL
Your federation metadata URL will be:
https://adfs.yourdomain.com/FederationMetadata/2007-06/FederationMetadata.xml
Replace adfs.yourdomain.com with your actual AD FS server FQDN.
Step 3: Verify Metadata Accessibility
- Open a web browser
- Navigate to the metadata URL
- You should see XML content starting with
<EntityDescriptor> - Verify the URL is accessible from the EvTrack server (test from the EvTrack server if possible)
Important: This metadata URL must be accessible from the EvTrack server over HTTPS. If your AD FS server is internal-only, ensure the EvTrack server can reach it via network routing or VPN.
EvTrack Application Configuration
Update application.properties
Add or update the following configuration in your application.properties file:
# ====================
# SSO Configuration
# ====================
# Enable SAML SSO (set to true to activate)
evtrack.security.config.sso.enable=true
# Auto-provision new users from SSO (recommended)
evtrack.security.config.sso.auto-provision-new-user=true
# Auto-update username from SSO provider
evtrack.security.config.sso.auto-update-entity-username=true
# AD FS SAML Service Provider Configuration
spring.security.saml2.relyingparty.registration.adfs.entity-id=evtrack-visitor-management
spring.security.saml2.relyingparty.registration.adfs.assertingparty.metadata-uri=https://adfs.yourdomain.com/FederationMetadata/2007-06/FederationMetadata.xml
# Signing Credentials for SAML Logout (Required for Single Logout)
spring.security.saml2.relyingparty.registration.adfs.signing.credentials[0].private-key-location=file:/path/to/saml-signing.key
spring.security.saml2.relyingparty.registration.adfs.signing.credentials[0].certificate-location=file:/path/to/saml-signing.crt
# Single Logout Configuration
spring.security.saml2.relyingparty.registration.adfs.assertingparty.singlelogout.url=https://adfs.yourdomain.com/adfs/ls/?wa=wsignout1.0
spring.security.saml2.relyingparty.registration.adfs.assertingparty.singlelogout.binding=REDIRECT
spring.security.saml2.relyingparty.registration.adfs.singlelogout.response-url={baseUrl}/logout/saml2/slo
Important: Replace
adfs.yourdomain.comwith your actual AD FS server FQDN. Replace/path/to/with the actual paths to your SAML signing credentials (see SLO Configuration section below).
Configuration Notes
-
Registration ID: The configuration uses
adfsas the registration ID. This must match the ACS URL you configured in AD FS:https://YOUR-FQDN/login/saml2/sso/adfs -
Entity ID: The
entity-idvalueevtrack-visitor-managementmust match the Relying Party Trust Identifier you configured in AD FS - Metadata URI: EvTrack will automatically fetch the AD FS configuration from this URL, including:
- Single Sign-On endpoint
- Signing certificates
- Supported bindings
- Name ID formats
-
Password Reset: When SSO is enabled (
evtrack.security.config.sso.enable=true), the password reset functionality at/auth/password-reset/**is automatically disabled -
Auto-provisioning: When enabled, new users will be automatically created in EvTrack upon their first SSO login with attributes populated from SAML claims
- Username Updates: When enabled, user information (first name, last name, email) will be synchronized from AD FS on each login
EvTrack Endpoints for AD FS Configuration
When configuring AD FS, you need to provide these EvTrack endpoints:
| Endpoint Type | URL | Purpose |
|---|---|---|
| Assertion Consumer Service (ACS) | https://YOUR-FQDN/login/saml2/sso/adfs | Receives SAML authentication responses |
| Entity ID | evtrack-visitor-management | Unique identifier for EvTrack SP |
| SP Metadata | https://YOUR-FQDN/saml2/metadata/adfs | Service Provider metadata (optional) |
| Single Logout Response | https://YOUR-FQDN/logout/saml2/slo | Receives SAML logout responses |
Note: The registration ID
adfsin these URLs can be customized, but must match across all configurations in both AD FS and EvTrack.
SAML Single Logout (SLO) Configuration
Single Logout allows users to log out from both EvTrack and AD FS with a single logout action. This section is * *required** for logout functionality to work correctly.
Why SLO Configuration is Required
SAML logout requires the Service Provider (EvTrack) to sign logout requests using a private key. Without proper signing credentials configured, you will encounter this error:
org.springframework.security.saml2.Saml2Exception: java.lang.IllegalArgumentException:
Failed to resolve any signing credential
Step 1: Generate Signing Credentials
You must generate your own private key and self-signed certificate for signing SAML logout requests:
# Generate RSA 2048-bit private key and self-signed certificate (valid for 10 years)
openssl req -newkey rsa:2048 -nodes \
-keyout saml-signing.key \
-x509 -days 3650 \
-out saml-signing.crt \
-subj "/C=US/ST=State/L=City/O=YourOrganization/OU=IT/CN=evtrack-visitor-management"
This generates two files:
saml-signing.key- Private key (keep this secure and never share it)saml-signing.crt- Public certificate (upload this to AD FS if required)
Certificate Format Requirements:
- Private key must be in PKCS#8 PEM format (unencrypted)
- Certificate must be in PEM format (Base64-encoded with BEGIN/END markers)
- If you have a DER-format certificate (.cer), convert it to PEM:
openssl x509 -inform DER -in certificate.cer -out certificate.pem -outform PEM
Step 2: Configure Signing Credentials in EvTrack
Add the signing credentials to your application.properties:
# Signing Credentials for SAML Logout (Required)
spring.security.saml2.relyingparty.registration.adfs.signing.credentials[0].private-key-location=file:/absolute/path/to/saml-signing.key
spring.security.saml2.relyingparty.registration.adfs.signing.credentials[0].certificate-location=file:/absolute/path/to/saml-signing.crt
Important Notes:
- Use absolute file paths or paths relative to the application working directory
- The
file:protocol is required when referencing files outside the classpath - Ensure the application has read permissions for these files
Step 3: Configure Single Logout Endpoint
AD FS typically uses the WS-Federation logout endpoint for SAML logout:
# Single Logout URL and Binding
spring.security.saml2.relyingparty.registration.adfs.assertingparty.singlelogout.url=https://adfs.yourdomain.com/adfs/ls/?wa=wsignout1.0
spring.security.saml2.relyingparty.registration.adfs.assertingparty.singlelogout.binding=REDIRECT
spring.security.saml2.relyingparty.registration.adfs.singlelogout.response-url={baseUrl}/logout/saml2/slo
AD FS Logout URL Format:
AD FS uses the WS-Federation signout endpoint for compatibility:
- Format:
https://adfs.yourdomain.com/adfs/ls/?wa=wsignout1.0 - Replace
adfs.yourdomain.comwith your AD FS server FQDN
Binding Configuration by Provider:
- AD FS: Use
REDIRECT(most common) - Azure Entra ID: Use
REDIRECT - Okta: Use
POST - Other providers: Check the Identity Provider’s metadata XML for the
SingleLogoutServicebinding
To verify the correct logout URL and binding, check your AD FS metadata URL for:
<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://adfs.yourdomain.com/adfs/ls/?wa=wsignout1.0"/>
Step 4: Upload Certificate to AD FS (If Required)
Some AD FS configurations require uploading the public certificate to verify signed logout requests. Check with your AD FS administrator.
If certificate upload is required:
- Open AD FS Management
- Navigate to Trust Relationships → Relying Party Trusts
- Right-click EvTrack Visitor Management → Properties
- Go to the Signature tab
- Click Add… and select your
saml-signing.crtfile - Click OK to save
Note: Not all AD FS versions require this step. Test logout functionality first; if it fails, upload the certificate.
Complete Configuration Example
Here’s a complete working example for AD FS with Single Logout:
# SSO Enable
evtrack.security.config.sso.enable=true
evtrack.security.config.sso.auto-provision-new-user=true
evtrack.security.config.sso.auto-update-entity-username=true
# AD FS SAML Configuration
spring.security.saml2.relyingparty.registration.adfs.entity-id=evtrack-visitor-management
spring.security.saml2.relyingparty.registration.adfs.assertingparty.metadata-uri=https://adfs.yourdomain.com/FederationMetadata/2007-06/FederationMetadata.xml
# Signing Credentials (Required for logout)
spring.security.saml2.relyingparty.registration.adfs.signing.credentials[0].private-key-location=file:/etc/evtrack/saml-signing.key
spring.security.saml2.relyingparty.registration.adfs.signing.credentials[0].certificate-location=file:/etc/evtrack/saml-signing.crt
# Single Logout Configuration
spring.security.saml2.relyingparty.registration.adfs.assertingparty.singlelogout.url=https://adfs.yourdomain.com/adfs/ls/?wa=wsignout1.0
spring.security.saml2.relyingparty.registration.adfs.assertingparty.singlelogout.binding=REDIRECT
spring.security.saml2.relyingparty.registration.adfs.singlelogout.response-url={baseUrl}/logout/saml2/slo
Security Best Practices
- Private Key Security:
- Store private keys outside the application directory
- Set restrictive file permissions:
chmod 600 saml-signing.key - Never commit private keys to version control
- Consider using a secrets management system (Azure Key Vault, HashiCorp Vault)
- Certificate Rotation:
- Set calendar reminders before certificate expiration
- Generate new certificates well before expiration
- Update both EvTrack configuration and AD FS settings
- Test the new configuration before removing old certificates
- Backup:
- Keep secure backups of your signing credentials
- Document the certificate generation process
- Store backup copies in a secure location
SSL Certificate Configuration
SSL can be configured in two ways:
Option 1: Web Application Firewall (WAF) / Load Balancer
If SSL termination is handled by a WAF or load balancer:
- Ensure the WAF/LB forwards the proper headers
- EvTrack is configured to handle forwarded headers with
server.forward-headers-strategy=native
Option 2: Direct Server SSL
If SSL is configured directly on the EvTrack server:
- Obtain the following certificate files from your certificate provider:
ca_bundle.crt- Certificate Authority bundlecertificate.crt- SSL certificateprivate.key- Private key
- Convert to PKCS12 format (if needed):
openssl pkcs12 -export -out keystore.p12 -inkey private.key -in certificate.crt -certfile ca_bundle.crt -name evtrack - Update
application.properties:server.ssl.enabled=true server.ssl.key-store-type=PKCS12 server.ssl.key-store=keystore.p12 server.ssl.key-store-password=YOUR_KEYSTORE_PASSWORD server.ssl.key-alias=evtrack
Note: On an onsite server the web service listens on port 5443 by default (
server.port=5443). If HTTPS does not come up after a restart, verify that the keystore file is at the location configured inapplication.properties, that the keystore password is correct, and that port 5443 is open in the firewall and not used by another service.
For detailed SSL configuration instructions, refer to: https://docs.evtrack.com/onsite-deployment/https-configuration
Testing the Configuration
Step 1: Restart EvTrack
After updating the configuration, restart the EvTrack application to apply changes:
# Systemd service
sudo systemctl restart evtrack
# Or if running directly
./mvnw spring-boot:run
Step 2: Access SSO Login Page
- Open a web browser
- Navigate to
https://YOUR-FQDN/login/sso - You should see the EvTrack login page with an “Login with AD FS” button
Step 3: Test Authentication
- Click the Login with AD FS button
- You will be redirected to your AD FS login page
- Enter your Active Directory credentials (username@domain.com and password)
- If using Windows Integrated Authentication, you may be logged in automatically
- After successful authentication, you should be redirected to the EvTrack dashboard
Step 4: Verify User Provisioning
If auto-provisioning is enabled (evtrack.security.config.sso.auto-provision-new-user=true):
- Log in with a user account that doesn’t exist in EvTrack yet
- Verify the user is created automatically in EvTrack
- Check that user attributes are populated correctly:
- First Name (from
givennameclaim) - Last Name (from
surnameclaim) - Email or Username (from
emailaddressorupnclaim)
- First Name (from
Step 5: Test Single Logout
- After logging in successfully, click the logout button in EvTrack
- You should be redirected to AD FS and logged out
- Attempting to access protected EvTrack pages should require re-authentication
- Verify you’re also logged out of other AD FS-connected applications
Troubleshooting
Common AD FS-Specific Issues
1. “Page cannot be displayed” or redirect loop after AD FS login
Possible Causes:
- Incorrect ACS URL in AD FS configuration
- SSL/HTTPS not properly configured
- Network connectivity issues
Solutions:
- Verify the ACS URL in AD FS exactly matches:
https://YOUR-FQDN/login/saml2/sso/adfs - Ensure your FQDN resolves correctly and is accessible over HTTPS
- Check AD FS Event Viewer logs (Applications and Services Logs → AD FS → Admin)
- Verify SSL certificate is valid and trusted by browsers
- Test network connectivity from user’s location to both AD FS and EvTrack servers
2. “Invalid SAML Response” error
Possible Causes:
- Entity ID mismatch
- Clock synchronization issues
- Incorrect metadata URL
Solutions:
- Verify Entity ID in EvTrack (
evtrack-visitor-management) matches the Relying Party Trust Identifier in AD FS - Check system time synchronization on both AD FS and EvTrack servers (SAML is time-sensitive, typically ±5 minutes)
# Check time on Linux timedatectl status # Sync time if needed sudo ntpdate -s time.nist.gov - Verify the metadata URL is correct and accessible from EvTrack server
- Check that the metadata URL returns valid XML (not an error page)
3. Claim mapping issues - Missing name or email
Possible Causes:
- LDAP attributes not populated in Active Directory
- Incorrect claim rule configuration
- Attribute name mismatch
Solutions:
- Verify LDAP attribute names in your Active Directory schema:
# PowerShell - Check user attributes Get-ADUser -Identity "username" -Properties GivenName,Surname,EmailAddress,UserPrincipalName - Ensure the attributes have values (not blank)
- Review claim rules in AD FS Management → Relying Party Trusts → EvTrack → Edit Claim Issuance Policy
- Check exact LDAP attribute names used in claim rules (case-sensitive):
Given-Name(notGivenName)Surname(notLastName)E-Mail-Addresses(notEmailorMail)User-Principal-Name(notUPN)
4. SAML attribute debugging
Enable SAML response debugging to see what claims AD FS is sending:
In EvTrack: Add to application.properties:
logging.level.org.springframework.security.saml2=DEBUG
In AD FS:
- Open Event Viewer on AD FS server
- Navigate to Applications and Services Logs → AD FS → Admin
- Look for Event ID 1200 (successful token issuance) or 364 (failed authentication)
- Review the claim values in the event details
Browser SAML Tracer (Advanced): Install a SAML tracer browser extension (e.g., SAML-tracer for Firefox/Chrome) to inspect SAML requests and responses in real-time.
5. “Failed to resolve any signing credential” error during logout
Possible Causes:
- Missing or incorrectly configured signing credentials
- Incorrect file paths
- File permission issues
- Certificate format issues
Solutions:
- Verify signing credentials are configured in
application.properties:spring.security.saml2.relyingparty.registration.adfs.signing.credentials[0].private-key-location=file:/path/to/saml-signing.key spring.security.saml2.relyingparty.registration.adfs.signing.credentials[0].certificate-location=file:/path/to/saml-signing.crt - Check that private key and certificate files exist and are readable:
ls -la /path/to/saml-signing.* # Ensure read permissions (at least 644 for certificate, 600 for private key) chmod 600 /path/to/saml-signing.key chmod 644 /path/to/saml-signing.crt - Verify file paths are absolute paths or correct relative paths
- Ensure certificate is in PEM format (starts with
-----BEGIN CERTIFICATE-----) - Check application startup logs for certificate loading errors
6. “Missing certificates or unrecognized format” error
Possible Causes:
- Certificate file is in DER (binary) format instead of PEM format
Solutions: Convert the certificate to PEM format:
openssl x509 -inform DER -in certificate.cer -out certificate.pem -outform PEM
Update configuration to use certificate.pem instead of certificate.cer
7. Logout redirects to AD FS but fails to complete
Possible Causes:
- Incorrect logout URL
- Incorrect logout binding
- Missing logout response URL
Solutions:
- Verify logout URL format for AD FS:
https://adfs.yourdomain.com/adfs/ls/?wa=wsignout1.0 - Ensure binding is set to
REDIRECT:spring.security.saml2.relyingparty.registration.adfs.assertingparty.singlelogout.binding=REDIRECT - Verify logout response URL is configured:
spring.security.saml2.relyingparty.registration.adfs.singlelogout.response-url={baseUrl}/logout/saml2/slo - Check AD FS metadata for the correct SingleLogoutService endpoint
8. Certificate validation errors
Possible Causes:
- AD FS using self-signed certificate
- Certificate trust chain issues
- Expired certificates
Solutions:
- If AD FS uses a self-signed certificate, add it to EvTrack’s Java truststore:
# Export AD FS certificate from browser or AD FS server # Import into Java truststore keytool -import -alias adfs-cert -file adfs.crt -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit - Verify AD FS certificate validity:
openssl s_client -connect adfs.yourdomain.com:443 -showcerts - Check certificate expiration dates on both AD FS and EvTrack
9. Network connectivity issues
Possible Causes:
- Firewall blocking HTTPS traffic
- DNS resolution issues
- Proxy configuration
Solutions:
- Test connectivity from EvTrack server to AD FS:
curl -v https://adfs.yourdomain.com/FederationMetadata/2007-06/FederationMetadata.xml - Check firewall rules allow HTTPS (port 443) to AD FS server
- Verify DNS resolution:
nslookup adfs.yourdomain.com - If using a proxy, configure Java proxy settings:
-Dhttps.proxyHost=proxy.company.com -Dhttps.proxyPort=8080
Enable Debug Logging
For comprehensive troubleshooting, enable debug logging in application.properties:
# SAML Protocol Debugging
logging.level.org.springframework.security.saml2=DEBUG
# HTTP Request Debugging
logging.level.org.springframework.web=DEBUG
Common Error Messages and Solutions
| Error Message | Cause | Solution |
|---|---|---|
SAML 2.0 response validation failed | Clock skew or invalid signature | Synchronize clocks, verify metadata URL |
InResponseToField does not correspond to sent message | Session timeout or replay attack detection | Increase session timeout, check for duplicate requests |
Audience validation failed | Entity ID mismatch | Verify Entity ID matches in both AD FS and EvTrack |
No assertion consumer service found | Incorrect ACS URL | Verify ACS URL matches exactly |
Unable to decrypt NameID | Encryption mismatch | Check if AD FS is encrypting assertions (usually not needed) |
Security Considerations
Network Security
- HTTPS Enforcement:
- Ensure HTTPS is enforced for all SSO-related endpoints
- Use valid, trusted SSL certificates (not self-signed for production)
- Configure HSTS (HTTP Strict Transport Security) headers
- Network Segmentation:
- Place AD FS servers in a secure network zone
- Restrict network access to AD FS management interfaces
- Use firewall rules to limit connections
Access Control
- User Access:
- Regularly audit SSO user access logs
- Implement proper role-based access control (RBAC) in EvTrack
- Use AD security groups to control who can access EvTrack
- Multi-Factor Authentication (MFA):
- Configure MFA in AD FS for enhanced security
- Require MFA for administrative accounts
- Consider requiring MFA for all EvTrack users
- Access Control Policies:
- Use AD FS Access Control Policies to restrict access by:
- Device compliance
- Network location
- Group membership
- Time of day
- Use AD FS Access Control Policies to restrict access by:
Certificate Management
- Certificate Lifecycle:
- Monitor certificate expiration dates (both AD FS and SAML signing)
- Implement automated certificate renewal processes
- Test certificate rollover procedures
- Private Key Protection:
- Store private keys with restrictive permissions (chmod 600)
- Use hardware security modules (HSMs) for high-security environments
- Never commit private keys to version control
Monitoring and Auditing
- Log Monitoring:
- Enable and monitor AD FS audit logs
- Monitor EvTrack application logs for authentication events
- Set up alerts for failed authentication attempts
- Regular Reviews:
- Conduct regular security audits of SAML configuration
- Review and update claim rules as needed
- Audit user provisioning and access patterns
- Incident Response:
- Have a plan for responding to authentication failures
- Document rollback procedures for configuration changes
- Maintain emergency access procedures (break-glass accounts)
Additional Resources
Microsoft AD FS Documentation
EvTrack Documentation
SAML Resources
Support
For additional assistance with AD FS SAML SSO configuration, please contact EvTrack support with:
- Your application.properties SSO configuration (excluding sensitive data like private keys)
- Any error messages from the EvTrack application logs
- AD FS Event Viewer logs showing authentication attempts
- The Federation Metadata URL from AD FS
- Network diagram showing connectivity between users, AD FS, and EvTrack