All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cloud.yaas.servicesdk.springboot.security.BasicAuthenticationProperties Maven / Gradle / Ivy

There is a newer version: 4.17.1
Show newest version
/*
 * © 2017 SAP SE or an SAP affiliate company.
 * All rights reserved.
 * Please see http://www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and
 * notices.
 */
package com.sap.cloud.yaas.servicesdk.springboot.security;

import com.sap.cloud.yaas.servicesdk.springboot.filter.FilterRegistrationPropertiesBase;

import org.springframework.boot.context.properties.ConfigurationProperties;


/**
 * Properties used to configure the
 * {@link com.sap.cloud.yaas.servicesdk.security.basicauthorization.EnforceBasicAuthenticationFilter}, which enforces
 * last-mile security in YaaS.
 */
@ConfigurationProperties(prefix = "yaas.service.basic-auth")
public class BasicAuthenticationProperties extends FilterRegistrationPropertiesBase
{
	/**
	 * The HTTP Basic Authentication realm of the service.
	 * (This is what most web-browsers display when asking the user for Basic Authentication credentials.)
	 */
	private String realm = "YaaS Basic Authentication for trusted clients";

	/**
	 * A list of HTTP Basic Authentication credentials in the following format:
	 * - each white-space delimited token holds one pair of user and password
	 * - everything before the first colon ({@code :}) in the pair is the user
	 * - everything after the first colon ({@code :}) in the pair is the password
	 * Cautions: When credentials are left empty, HTTP Basic Authentication is disabled.
	 */
	private String credentials = "";

	/**
	 * Comma-separated list of URI path prefixes that are exempt of HTTP Basic Authentication.
	 * Use with care!
	 */
	private String excludePaths = "";

	public String getRealm()
	{
		return realm;
	}

	public void setRealm(final String realm)
	{
		this.realm = realm;
	}

	public String getCredentials()
	{
		return credentials;
	}

	public void setCredentials(final String credentials)
	{
		this.credentials = credentials;
	}

	public String getExcludePaths()
	{
		return excludePaths;
	}

	public void setExcludePaths(final String excludePaths)
	{
		this.excludePaths = excludePaths;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy