Welcome to the User Framework SpringBoot Configuration Guide! This document outlines the key configuration values you'll need to set up and customize the framework for your specific needs. Configuration values which can generally be left as defaults are not included in this document. Please review the applicaiton.yml file for more information on all the available configuration values.
- Username (
spring.mail.username): Set this to your mail server's username. - Password (
spring.mail.password): Your mail server's password goes here. - Host (
spring.mail.host): Set this to your mail server's hostname - Port (
spring.mail.port): Set to587by default. Modify if your mail server uses a different port.
- URL (
spring.datasource.url): The JDBC URL for your database. - Username (
spring.datasource.username): Database username. - Password (
spring.datasource.password): Database password. - Driver Class Name (
spring.datasource.driverClassName): The JDBC driver, defaults toorg.mariadb.jdbc.Driver.
- DDL Auto (
spring.jpa.hibernate.ddl-auto): Hibernate schema generation strategy, defaults toupdate. - Dialect (
spring.jpa.properties.hibernate.dialect): Set this to the appropriate dialect for your database, defaults toorg.hibernate.dialect.MariaDBDialect.
- Name (
spring.application.name): Set your application's name, defaults toUser Framework.
- Account Deletion (
user.actuallyDeleteAccount): Set totrueto enable account deletion. Defaults tofalsewhere accounts are disabled instead of deleted. - Registration Email Verification (
user.registration.sendVerificationEmail): Enable (true) or disable (false) sending verification emails post-registration.
- Log File Path (
user.audit.logFilePath): The path to the audit log file. - Flush on Write (
user.audit.flushOnWrite): Set totruefor immediate log flushing. Defaults tofalsefor performance.
- Failed Login Attempts (
user.security.failedLoginAttempts): Number of failed login attempts before account lockout. Set to0to disable lockout. - Account Lockout Duration (
user.security.accountLockoutDuration): Duration (in minutes) for account lockout. - BCrypt Strength (
user.security.bcryptStrength): Adjust the bcrypt strength for password hashing. Default is12. - Canonical App URL (
user.security.appUrl): Canonical base URL for security email links (password reset, verification). Set this to prevent Host-header poisoning of those links (CWE-640); when it is unset the framework logs a startup warning and derives the host from the (spoofable) requestHostheader. This demo sets it per profile —http://localhost:8080for local/E2E, and an${APP_URL}env var inprd. - Trusted Hosts (
user.security.trustedHosts): Alternative toappUrl— a comma-separated allow-list of hosts honored for email links whenappUrlis not set; a non-allow-listed request host falls back to the first trusted host. - Require Canonical App URL (
user.security.requireCanonicalAppUrl): Whentrue, startup fails unlessappUrlor a non-emptytrustedHostsis configured (fail-fast instead of a warning). Theprdprofile enables this. - Allow Initial Password Set Without Step-Up (
user.security.allowInitialPasswordSetWithoutStepUp): ControlsPOST /user/setPassword, which lets a passwordless (passkey-only) account set an initial password. As of the framework's SUF-02 hardening this endpoint is disabled by default (returnsHTTP 403) unless you provide aStepUpServicebean or set this totrue. This demo sets ittruein the interactive profiles (local,mfa,playwright-test) so the passkey "set a password" flow works, and leaves itfalse(secure default) inprd.
- From Address (
user.mail.fromAddress): The email address used as the sender in outgoing emails.
- First Year (
spring.copyrightFirstYear): The starting year for the copyright notice.
- Roles and Privileges (
spring.roles-and-privileges): Map out roles to their respective privileges. - Role Hierarchy (
spring.role-hierarchy): Define the hierarchy and inheritance of roles.
- API Key and Account ID (
management.newrelic.metrics.export): Required if you're integrating with New Relic for monitoring.
- Session Timeout (
server.servlet.session.timeout): The session timeout period, defaults to30m(30 minutes).
- Log File Path (
logging.file.name): Set the path to the application log file.
Remember, this guide covers the most critical settings to get you started. Depending on your specific use case, you may need to explore and adjust additional configurations. Always refer to the official SpringBoot and related libraries' documentation for more detailed information.