The OIDC protocol is the modern authentication standard. Anjana Data allows you to configure multiple providers simultaneously via security.authentication.oidc.
Prerequisite: the user must exist in Anjana
For login via OIDC to succeed, the user must already be registered in the Anjana database. OIDC 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. Redirect URL (Callback / Redirect URI)
For the integration to work, it is critical to correctly register the return URL in your Identity Provider. This is the address the provider will send the user to after authenticating.
The URL is built following this pattern: https://{dominio-anjana}/gateway/oidc2/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
https://app.midominio.com/gateway/oidc2/sso/google
2. Configuration properties
Each OIDC provider is configured in security.authentication.oidc.providers.<registrationId>, where <registrationId> is a unique internal name (e.g.: google, okta-corp).
|
Property |
Required |
Description |
|---|---|---|
|
|
✅ Yes |
Friendly name that will be shown to users on the login screen (e.g.: "Sign in with Google" or "Corporate Login"). |
|
|
❌ No |
Provider subtype used to adapt the graphical interface (logos, styles). Allowed values: |
|
|
✅ Yes |
Base URL of the Identity Provider (IdP). The application uses this URL to append |
|
|
✅ Yes |
Public identifier of the application registered with the provider. |
|
|
✅ Yes |
Password or shared secret used to authenticate the application with the provider. |
|
|
❌ No |
List of permissions requested from the user during login. Only needs to be specified if scopes other than the defaults are required. Defaults by
|
|
|
❌ No |
Name of the attribute (claim) from the IdP's
|
Claims available in /userinfo by provider: The attribute configured in username-attribute must exist in the response of the IdP's /userinfo endpoint, not in the ID token. Claims reference by provider:
-
Azure AD v2:
sub,name,email,picture. Does not includepreferred_username. -
AWS Cognito:
sub,email(if the scope is enabled),username,cognito:username. -
Google:
sub,name,email,picture. Does not includepreferred_username. -
Auth0:
sub,nickname,name,email. -
Okta:
sub,preferred_username,email. -
Keycloak:
sub,preferred_username,email.
Coming from a previous configuration? If you are migrating from a previous version, check the legacy configuration pages for each provider, which detail the equivalences with the new properties: SSO AWS (Deprecated), SSO Azure (Deprecated), SSO GCP (Deprecated), SSO OKTA/AUTH0 (Deprecated).
3. Configuration by provider
Below are the steps to obtain credentials and the configuration example for the main providers.
Base YAML structure
security:
authentication:
oidc:
# (Optional) Customize paths if needed
# authenticate-path: /authenticate
# redirection-base-uri: /sso/{registrationId}
providers:
# Add the specific providers here
A. AWS Cognito
Use this type if your identity management resides in Amazon Cognito User Pools.
Step 1: Obtaining data in the AWS Console
-
Go to Amazon Cognito > User Pools and select your User Pool.
-
Issuer URI: Format:
https://cognito-idp.<region>.amazonaws.com/<user_pool_id> -
Go to the App integration tab.
-
In App client list, create or select a client. Copy the Client ID and Client Secret.
-
Allowed Callback URLs: Add Anjana's return URL:
https://<dominio-anjana>/gateway/oidc2/sso/aws-pool
Step 2: YAML configuration
security:
authentication:
oidc:
providers:
aws-pool:
name: AWS Login
type: AWS
issuer-uri: https://cognito-idp.eu-west-1.amazonaws.com/eu-west-1_Example
client-id: "1234567890abcdef"
client-secret: "secret-key-from-aws..."
# default scopes for type AWS: [openid, profile]
# default username-attribute for type AWS: cognito:username
AWS Cognito and the email scope: By default, Cognito App clients only have the openid and profile scopes enabled. That's why the default for type: AWS does not include email, avoiding the invalid_scope error. If you need the user's email, you can enable it in AWS Console → Cognito → User pool → App integration → App client → OAuth grants and add scopes: [openid, profile, email] in the YAML.
B. Okta
For organizations using Okta Identity Cloud.
Step 1: Obtaining data in Okta Admin
-
Go to Applications > Create App Integration (OIDC - Web Application).
-
Sign-in redirect URIs: Add the URL ending with the provider's key (e.g.
okta-corp):https://<dominio-anjana>/gateway/oidc2/sso/okta-corp -
Copy the Client ID and Client Secret.
-
Issuer URI: Usually
https://<su-org>.okta.com.
Step 2: YAML configuration
security:
authentication:
oidc:
providers:
okta-corp:
name: Okta Corporate
type: OKTA
issuer-uri: https://dev-123456.okta.com
client-id: "0oa..."
client-secret: "secret..."
# default scopes: [openid, profile, email]
# default username-attribute for type OKTA: preferred_username
C. Auth0
For integrations with Auth0.
Step 1: Obtaining data in the Auth0 Dashboard
-
Create a Regular Web App.
-
Settings: Copy the Domain (this will be your Issuer URI), Client ID, and Client Secret.
-
Allowed Callback URLs: Add the URL ending with the key (e.g.
auth0-login):https://<dominio-anjana>/gateway/oidc2/sso/auth0-login
Step 2: YAML configuration
security:
authentication:
oidc:
providers:
auth0-login:
name: Auth0 Access
type: AUTH0
issuer-uri: https://mi-tenant.eu.auth0.com/
client-id: "A1b2C3d4..."
client-secret: "secret..."
# default scopes: [openid, profile, email]
# default username-attribute for type AUTH0: email
Auth0 and username-attribute: With type: AUTH0, the default value of username-attribute is email. If Auth0 users need to be identified by a username other than email, you can explicitly specify username-attribute: nickname.
D. Microsoft Azure AD (Entra ID)
For Microsoft 365 / Azure users.
Step 1: Obtaining data in the Azure Portal
-
App registrations > New registration.
-
Redirect URI (Web):
https://<dominio-anjana>/gateway/oidc2/sso/azure-oidc -
Copy the Application (client) ID and Directory (tenant) ID.
-
Generate a Client secret and copy the value.
-
Issuer URI:
https://login.microsoftonline.com/<tenant-id>/v2.0
Step 2: YAML configuration
security:
authentication:
oidc:
providers:
azure-oidc:
name: Microsoft Login
type: AZURE
issuer-uri: https://login.microsoftonline.com/8888-9999-aaaa-bbbb/v2.0
client-id: "client-id-uuid"
client-secret: "client-secret-value"
# default scopes: [openid, profile, email]
# default username-attribute for type AZURE: email
Azure AD v2 and preferred_username: Azure AD v2 does not return the preferred_username claim in the /userinfo endpoint. If username-attribute: preferred_username is configured, login will fail. With type: AZURE, the default value email is correct and does not need to be specified.
E. Google
For Google Workspace or Cloud Identity accounts.
Step 1: Obtaining data in the Google Cloud Console
-
Credentials > OAuth client ID > Web application.
-
Authorized redirect URIs:
https://<dominio-anjana>/gateway/oidc2/sso/google -
Copy the Client ID and Client Secret.
-
Issuer URI:
https://accounts.google.com
Step 2: YAML configuration
security:
authentication:
oidc:
providers:
google:
name: Google Workspace
type: GOOGLE
issuer-uri: https://accounts.google.com
client-id: "123456-abc.apps.googleusercontent.com"
client-secret: "GOCSPX-..."
# default scopes: [openid, profile, email]
# default username-attribute for type GOOGLE: email
Google and username-attribute: Google's /userinfo endpoint does not include preferred_username. With type: GOOGLE, the default value of username-attribute is email, so it does not need to be specified.
F. Keycloak
For organizations using Keycloak as an identity and access server.
Step 1: Configuration in the Keycloak Admin Console
-
Access Keycloak's Admin Console and select the corresponding realm.
-
In Clients > Create client:
-
Client type:
OpenID Connect -
Client ID: Define a name, e.g.
anjana-oidc
-
-
In the Settings tab:
-
Client authentication:
ON(confidential mode, required to obtain theclient-secret) -
Valid redirect URIs:
https://<dominio-anjana>/gateway/oidc2/sso/keycloak-corp
-
-
In the Credentials tab, copy the Client Secret.
-
Issuer URI:
https://<keycloak-server>/realms/<realm>(verify that/.well-known/openid-configurationis accessible from Anjana).
Step 2: YAML configuration
security:
authentication:
oidc:
providers:
keycloak-corp:
name: Keycloak Login
type: KEYCLOAK
issuer-uri: https://sso.mi-dominio.com/realms/mi-realm
client-id: "anjana-oidc"
client-secret: "secret-uuid..."
# default scopes for type KEYCLOAK: [openid, profile, email]
# default username-attribute for type KEYCLOAK: preferred_username
Keycloak and preferred_username: Keycloak exposes preferred_username in the /userinfo endpoint, which is why it is the default username-attribute for type: KEYCLOAK. If you want to use the email as the identifier, explicitly specify username-attribute: email.
G. Generic provider (ADFS, Shibboleth, others)
For any other OIDC-compatible provider not listed above (for example: Active Directory Federation Services, Shibboleth, PingFederate).
Step 1: Required data
-
Base server URL (Issuer URI) with the
/.well-known/openid-configurationendpoint accessible from Anjana. -
Register a confidential OIDC client with the Redirect URI:
https://<dominio-anjana>/gateway/oidc2/sso/mi-proveedor
Step 2: YAML configuration
security:
authentication:
oidc:
providers:
mi-proveedor:
name: Login Corporativo
type: OTHER
issuer-uri: https://sso.mi-empresa.com
client-id: "anjana-client"
client-secret: "secret-uuid..."
# default scopes: [openid, profile, email]
# default username-attribute for type OTHER: preferred_username