The SAML 2.0 protocol is a federation standard widely used in corporate environments. Anjana Data allows you to configure multiple identity providers (IdP) simultaneously under the security.authentication.saml2 section.
Prerequisite: the user must exist in Anjana
For SAML login to succeed, the user must be previously registered in the Anjana database. SAML authentication verifies identity with the external provider, but Anjana always checks that the user exists locally before granting access. If the user authenticates successfully with the IdP but is not registered in Anjana, access will be denied. See how to register users automatically in the User Provisioning guide.
1. Response URL (ACS URL)
For authentication to work, you must correctly register the Assertion Consumer Service (ACS) URL in your Identity Provider. This is the address to which the IdP will send the encrypted/signed SAML response.
The URL is built following this pattern:
https://{dominio-anjana}/gateway/saml2/sso/{registrationId}
-
dominio-anjana: Your public domain (e.g.:
app.midominio.com). -
registrationId: The exact key you use in the YAML to define the provider.
Example: If you configure a provider with the key
azureadin the YAML, the URL to register in Azure will be:
https://app.midominio.com/gateway/saml2/sso/azuread
2. Configuration properties
Each SAML provider is configured under security.authentication.saml2.providers.<registrationId>, where <registrationId> is a unique internal name (e.g.: azuread, okta-corp).
|
Property |
Required |
Description |
|
|
Yes |
Friendly name that will be shown to users on the login screen (e.g.: "Corporate Login"). |
|
|
Yes |
Provider subtype used to adapt the graphical interface (logos, styles). Allowed values: |
|
|
Yes |
The Anjana Data Entity ID or Audience. You define this value (e.g.: |
|
|
Yes |
Location of the IdP metadata XML. It can be a remote URL ( |
|
|
No |
Path to the Private Key (PKCS#8 PEM) used to sign the SAML requests sent to the IdP. Required if the IdP requires signed requests. |
|
|
No |
Path to the Public Certificate (X.509) corresponding to the private key. |
3. Configuration by Provider
Below are the steps to obtain the necessary data and the configuration example for the main providers.
Base YAML structure
security:
authentication:
saml2:
# (Optional) Default base paths. Do not modify unless there is a specific need.
# acs-location-path: /sso/{registrationId}
# authenticate-path: /authenticate/{registrationId}
providers:
# Specific providers are added here
A. Microsoft Azure AD (Entra ID)
For integrations with Microsoft 365 / Azure Enterprise Applications.
Step 1: Configuration in Azure Portal
-
Go to Enterprise Applications > New application > Create your own application > Integrate any other application you don't find in the gallery (Non-gallery).
-
In Single sign-on (SAML), edit the Basic SAML Configuration:
-
Identifier (Entity ID): Define a unique name, for example:
anjana-saml-azure. -
Reply URL (ACS):
https://<dominio-anjana>/gateway/saml2/sso/azuread
-
-
In SAML Signing Certificates, copy the App Federation Metadata Url.
Step 2: YAML Configuration
security:
authentication:
saml2:
providers:
azuread:
name: Azure Login
type: AZURE
entityId: anjana-saml-azure
idpMetadataUri: https://login.microsoftonline.com/uuid-tenant/federationmetadata/2007-06/federationmetadata.xml
B. Google Workspace
For authentication using corporate Google accounts.
Step 1: Configuration in Google Admin Console
-
Go to Apps > Web and mobile apps > Add app > Add custom SAML app.
-
Identity provider details: Download the IdP metadata file and upload it to your Anjana server (e.g.:
/opt/anjana/configs/google-metadata.xml). -
Service provider details:
-
ACS URL:
https://<dominio-anjana>/gateway/saml2/sso/devgcp -
Entity ID: Define a name, for example:
anjana-saml-gcp.
-
Step 2: YAML Configuration
security:
authentication:
saml2:
providers:
devgcp:
name: Google Workspace
type: GOOGLE
entityId: anjana-saml-gcp
idpMetadataUri: file:/opt/anjana/configs/google-metadata.xml
C. AWS IAM Identity Center
For centralized authentication with AWS SSO.
Step 1: Configuration in AWS Console
-
Go to IAM Identity Center > Applications > Add application > Add custom SAML 2.0 application.
-
IAM Identity Center SAML metadata: Copy the IdP SAML metadata URL.
-
Application metadata:
-
ACS URL:
https://<dominio-anjana>/gateway/saml2/sso/devaws -
SAML Audience (Entity ID): Define a name, for example:
anjana-saml-aws.
-
Step 2: YAML Configuration
security:
authentication:
saml2:
providers:
devaws:
name: AWS Access
type: AWS
entityId: anjana-saml-aws
idpMetadataUri: https://portal.sso.eu-west-1.amazonaws.com/saml/metadata/ExampleID
D. Okta (SAML)
For integrations with Okta using the SAML protocol instead of OIDC.
Step 1: Configuration in Okta Admin
-
Go to Applications > Create App Integration.
-
Select SAML 2.0 and click Next.
-
Configure SAML:
-
Single sign on URL (ACS):
https://<dominio-anjana>/gateway/saml2/sso/okta-saml -
Audience URI (SP Entity ID): Define a unique name, for example:
anjana-saml-okta.
-
-
On the Sign On tab, copy the Metadata URL.
Step 2: YAML Configuration
security:
authentication:
saml2:
providers:
okta-saml:
name: Okta Login
type: OKTA
entityId: anjana-saml-okta
idpMetadataUri: https://dev-123456.okta.com/app/exk1.../sso/saml/metadata
E. Auth0 (SAML)
Auth0 supports SAML through an "Addon" on top of a standard web application.
Step 1: Configuration in Auth0 Dashboard
-
Go to Applications > Create Application > Regular Web App.
-
Once created, go to the Addons tab and enable SAML2 Web App.
-
On the Addon configuration screen (Settings tab):
-
Application Callback URL:
https://<dominio-anjana>/gateway/saml2/sso/auth0-saml -
Settings (JSON): Configure the audience:<code class="language-json">{ "audience": "anjana-saml-auth0" }</code>
-
-
Go to the Usage tab and copy the Identity Provider Metadata URL.
Step 2: YAML Configuration
security:
authentication:
saml2:
providers:
auth0-saml:
name: Auth0 Login
type: AUTH0
entityId: anjana-saml-auth0
idpMetadataUri: https://mi-tenant.eu.auth0.com/samlp/metadata/abcdef...
F. Keycloak (SAML)
For organizations that use Keycloak as an identity and access server.
Step 1: Configuration in Keycloak Admin Console
-
Access the Keycloak Admin Console and select the corresponding realm.
-
In Clients > Create client:
-
Client type:
SAML -
Client ID: This value will be your
entityId. Define a unique name, e.g.anjana-saml-keycloak.
-
-
On the Settings tab:
-
Valid redirect URIs:
https://<dominio-anjana>/gateway/saml2/sso/keycloak-saml -
Master SAML Processing URL (ACS URL):
https://<dominio-anjana>/gateway/saml2/sso/keycloak-saml
-
-
IdP metadata URL (Keycloak):
https://<keycloak-server>/realms/<realm>/protocol/saml/descriptor
Step 2: YAML Configuration
security:
authentication:
saml2:
providers:
keycloak-saml:
name: Keycloak Login
type: KEYCLOAK
# Must exactly match the Client ID defined in Keycloak
entityId: anjana-saml-keycloak
# Keycloak realm metadata URL
idpMetadataUri: https://sso.mi-dominio.com/realms/mi-realm/protocol/saml/descriptor
Local metadata download: If the Anjana server does not have direct access to Keycloak, manually download the metadata XML from the URL above, save it on the server (e.g. /opt/anjana/keycloak-metadata.xml) and use idpMetadataUri: file:/opt/anjana/keycloak-metadata.xml.
G. Generic Provider (ADFS, Shibboleth, others)
Use this configuration for any SAML 2.0-compatible identity provider not included in the list above (for example: Active Directory Federation Services, Shibboleth, PingFederate).
Step 1: Configuration in your Identity Provider (IdP)
In your admin panel, create a new SAML client and configure the following Service Provider (SP) parameters:
-
ACS URL (Assertion Consumer Service):
https://<dominio-anjana>/gateway/saml2/sso/generic-idp -
Entity ID (Audience / Issuer): Define a unique identifier, for example:
anjana-saml-generic. -
NameID Format: It is recommended to configure
PersistentorEmailAddress.
Step 2: Obtaining Metadata
Locate the public URL of your IdP's metadata. If the Anjana server does not have access, download the XML and use the path file:/....
Step 3: YAML Configuration
security:
authentication:
saml2:
providers:
generic-idp:
name: Login Corporativo
type: OTHER
entityId: anjana-saml-generic
idpMetadataUri: https://sso.mi-empresa.com/metadata.xml