Skip to main content
This page explains how user permissions work in Atoti What-If simulations and Atoti Server branches. It covers built-in security managers, role-based access control, and how to implement custom permission logic.

How to configure security with the Spring Boot Starter

When using the Spring Boot Starter, security is configured through properties:

Security type options

Disabling branch permissions

By default, the security manager delegates branch-level permission checks to the Atoti Server branch permissions manager. To disable this:

What are Atoti Server branches?

Atoti Server uses branches to isolate data changes. Each branch can have:
  • Owners: Users who can modify or delete the branch.
  • Readers: Users who can view the branch.
If no owners or readers are specified, all users have full access. To restrict access, users must have the required roles. For more information, head over to the Atoti Server access control documentation and the Atoti Server branch permission manager documentation.

How are simulations secured in Atoti What-If?

Simulations are grouped by branch and secured using an IDatabaseSimulationsSecurityManager. Two built-in managers are available:

NoOpDatabaseSimulationsSecurityManager

  • Allows all actions for every user.
  • Intended for testing only.
  • Enabled by setting atoti.what-if.security.type: none.

SpringDatabaseSimulationsSecurityManager

  • Integrates with Spring Security.
  • Checks user roles.
  • Delegates branch-level checks to the Atoti Server branch permissions manager.
  • Enabled by default, or by setting atoti.what-if.security.type: spring.
Default behavior:
  • Any user can create simulations.
  • Only the creator or users with ROLE_ADMIN can update, delete, or execute simulations.

How do I implement custom simulation permissions?

You can customize permissions by extending the Spring-based manager or implementing your own. When using the Spring Boot Starter with a custom security manager, set atoti.what-if.security.type: custom and provide your bean. See How to customize auto-configured beans for details.

Option 1: Extend SpringDatabaseSimulationsSecurityManager

Use the setDatabaseSimulationsRoles method to define role-based access:

Option 2: Implement IDatabaseSimulationsSecurityManager directly

Use this for advanced logic, such as checking external services or user attributes:

What should be checked for consistency?

To ensure correct branch-level permissions, verify that the permissions for Atoti Server and Atoti What-If are consistent.