Class YmlFileAuthenticator
java.lang.Object
org.frankframework.lifecycle.servlets.AbstractServletAuthenticator
org.frankframework.lifecycle.servlets.YmlFileAuthenticator
- All Implemented Interfaces:
IAuthenticator
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
Authenticator for in-memory authentication using a YAML file.
This authenticator can be used to authenticate users using a YAML file. It is a simple way to authenticate multiple users without using a database or an external authentication provider.
The default file is `localUsers.yml`, but this can be overridden by setting the `file` property. It should be located in the classpath.
The following properties can be set in this file:
users [array] Set localUsers who can log in on the Frank!
users.username [string] Set the username of the user
users.password [string] Set the password of the user
users.roles [array] Set the roles of the user. Options: `IbisTester`, `IbisDataAdmin`, `IbisAdmin`, `IbisWebService`, `IbisObserver`
Example YAML content:
users:
- username: Tester
password: pencil
roles:
- IbisTester
- IbisObserver
- username: Admin
password: 12345
roles:
- IbisAdmin
This authenticator should be configured by setting its type to 'YML' or 'YAML', for example:
application.security.console.authentication.type=YML
application.security.console.authentication.file=myUsers.yml
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Field Summary
Fields inherited from class org.frankframework.lifecycle.servlets.AbstractServletAuthenticator
ALLOW_OPTIONS_REQUESTS_KEY, DEFAULT_IBIS_ROLES, log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.web.SecurityFilterChain
configure
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) Before building, configure the FilterChain.Methods inherited from class org.frankframework.lifecycle.servlets.AbstractServletAuthenticator
build, configureHttpSecurity, getAuthorizationManager, getEnvironmentProperties, getPrivateEndpoints, registerServlet, setApplicationContext
-
Constructor Details
-
YmlFileAuthenticator
public YmlFileAuthenticator()
-
-
Method Details
-
configure
public org.springframework.security.web.SecurityFilterChain configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception Description copied from class:AbstractServletAuthenticator
Before building, configure the FilterChain.- Specified by:
configure
in classAbstractServletAuthenticator
- Throws:
Exception
-