---
title: "Configuring Spring Profiles for Authentication (LDAP, SSO, SAML)"
canonical: "https://sesame-software-documentation.refined.site/space/bandr/673644545/Configuring%20Spring%20Profiles%20for%20Authentication%20(LDAP%2C%20SSO%2C%20SAML)"
format: markdown
---
## ⚙️This article outlines the available Spring authentication profiles and the different ways to activate them in your environment.

Spring profiles allow you to control which authentication configuration is active at runtime. Selecting the correct profile ensures the application uses the intended authentication method.


---

## ⚙️** Available Spring Profile Configurations**

The following authentication profiles are supported:

### **ldap**

Use this profile if you are using **LDAP authentication**.

### **sso**

Use this profile if you are using **Single Sign-On (SSO) authentication**.

### **saml**

Use this profile if you are using **SAML authentication**.

---

## ⚙️** SaaS Deployments**

For SaaS environments, LDAP, SSO, or SAML authentication is configured directly in the application UI.

No manual Spring profile configuration is required unless specifically instructed.

---

## ⚙️** Ways to Set the Active Spring Profile**

You can define the active profile using one of the following methods.

### **1️⃣ System Property (Environment Variable)**

Set the `SPRING_PROFILES_ACTIVE` environment variable:

SPRING_PROFILES_ACTIVE=ldap

Replace `ldap` with `sso` or `saml` as needed.

### **2️⃣ Command Line Argument**

If starting the application from the command line, use:

--spring.profiles.active=ldap

Example:

java -jar bandr.jar --spring.profiles.active=ldap

### **3️⃣ Docker Configuration**

If running the application in Docker, define the profile in the container entrypoint.

Example:

ENTRYPOINT ["java","-Xms512m","-Xmx2g","-Djava.security.egd=file:/dev/./urandom","-jar","/bandr.jar","-Dspring.profiles.active=ldap"]

Ensure the `-Dspring.profiles.active` parameter matches your desired authentication method.

### 4️⃣ **application.properties**

If using a specific `application.properties` file at startup, define:

spring.profiles.active=ldap

Replace with `sso` or `saml` as required.

---

## **❗Important Notes**

- Only one authentication profile should be active at a time.
- If multiple configuration methods are used, command-line arguments typically override environment variables and properties files.
- Ensure the selected profile matches your authentication infrastructure.