Skip to main content
This feature is not part of the community edition: it needs to be unlocked.
By default, no authentication is required to query an Atoti session and the users have access to all the data in the session. This shows how to configure:
  • An authentication mechanism to secure access to the session.
  • Restrictions to control the data each user is allowed to see.

Configuring authentication

Atoti supports multiple authentication mechanisms. Here we’ll use OpenID Connect:
The users configured in the OIDC provider are:
  • global-user with the role user.
  • french-user with the roles france and atoti.
  • parisian-user with the roles paris and atoti.

Configuring authorization

atoti.tables.Tables.restrictions can be used to limit access to the data within the session. Let’s create restrictions and then assign roles so that:
  • global-user has access to everything.
  • french-user only has access to France data.
  • parisian-user only has access to Paris data.
Since by default users have access to all the data, we only need to create restrictions for the regional users:
We update the role mapping to create a mapping between the roles our users have in the OIDC provider, and the roles we want them to have in the Atoti application.

Querying the session

When navigating to the URL of the session, users are redirected to the login page of the configured authentication provider. Let’s connect using our different users and make sure they can only see the expected data subset.
First, we can check that parisian-user can only see data for shops in Paris:
french-user can only see data for shops in France:
And finally, global-user can see data for all the shops: