Purpose
This guide explains how to configure single sign-on (SSO) with SAML 2.0 in Anjana.
It also describes the optional but recommended configuration for User Provisioning, which allows Anjana to query and list the users with access from its identity provider (IdP).
How it works: two parts of the configuration
This integration has two independent parts configured in parallel:
-
SAML Authentication (the "Login"): allows a user to sign in. It is configured in your IdP (Azure, Google, AWS) and in the
security.authentication.saml2section of Anjana. -
User Provisioning (the "User List"): allows Anjana to access your provider's API (with administrator permissions) to obtain the list of assigned users. It is configured in the
security.provisioningsection of Anjana.
The provider key (e.g. devazure) links both configurations.
Zeus base configuration
Before configuring your identity provider, define the global properties for the zeus service in Anjana.
1. Global application properties
This property defines the base public URL where zeus is hosted.
app:
# La Host donde se aloja el microservicio de zeus
base-url: https://dominio-anjana.com
# Puerta de enlace a la api pública del microservicio de Zeus
gateway: /gateway/
2. Security configuration template
In the application.yml file of zeus, we will find two main sections within security:
security:
# ===============================================
# SECCIÓN 1: PROVISIÓN DE USUARIOS (OPCIONAL)
# ===============================================
provisioning:
providers:
# Todo los proveedores de tipo Azure deberán ir dentro de este atributo
azure-graph:
# La clave 'azuread' es un ejemplo. Use un nombre único
# por cada proveedor que configure.
azuread:
# ... aquí irán las credenciales de la API que obtendrá de su IdP
# (Ver las guías específicas más abajo)
# Todo los proveedores de tipo Google Workspace deberán ir dentro de este atributo
google:
devgcp:
# ... aquí irán las credenciales de la API que obtendrá de su IdP
# (Ver las guías específicas más abajo)
# Todo los proveedores de tipo AWS IAM IC deberán ir dentro de este atributo
aws-iam-ic:
devaws:
# ... aquí irán las credenciales de la API que obtendrá de su IdP
# (Ver las guías específicas más abajo)
# ===============================================
# SECCIÓN 2: AUTENTICACIÓN SAML (LOGIN)
# ===============================================
authentication:
saml2:
# Rutas base para los endpoints de SAML.
# Se recomienda no cambiar estos valores por defecto.
# P.D.: la generación de dichas url consistirá en app.base_url + "/saml2/" + {ruta}
acs-location-path: /sso/{registrationId}
authenticate-path: /authenticate/{registrationId}
providers:
# La clave 'azuread' debe ser IDÉNTICA a la clave usada en 'provisioning'
azuread:
# Nombre del proveedor para mostrar
name: <name>
# Identificador de la applicación de SAML2 en el proveedor
entityId: <entityID>
# URL/Ruta de fichero donde se recupera el metadata para procesar correctamente la autentificación
idpMetadataUri: <URL/Path>
Configuration guide by provider
Find below the instructions for your identity provider.
SAML 2.0 - AZURE SAML 2.0 - GCP SAML 2.0 - AWS IAM
Final step: restart
After updating your application.yml with the SAML and provisioning configuration for your providers, restart the Zeus microservice to apply the changes.