Enable User Audit Data for Multi Tenant Accounts
Configure user auditing for tenants to restrict access to user audit data to their own user tenant data. Composer account administrators can see aggregated data for all tenants in the Composer account.
You can define this level of separation in the database in one of several ways, depending on tenant connection creation privileges.
Tenants Without Connection Creation Permissions
In environments where tenants don't have permission to create connections, you can set up and use user attribute value, such as ${User.tenant}
define row level filters to limit access to user audit data.
- Set up an attribute for each user, such as
${User.tenant}
, to identify the tenant for each user. - Add the attribute name to the
zoomdata.properties
file. In this example, addtenant
:user-auditing.tenant.attribute=tenant
. - Generate an audit event for any account to trigger audit data table creation.
- As an account administrator, create connection and data sources for the audit data in Composer.
- Add a row level filter to the data source. Compare the column tenant with the user attribute you created. In this example,
tenant=${User.tenant}
Tenants With Connection Creation Permissions
If your tenants do have permission to create connections, there are two ways to restrict user audit data access: by setting up views at the tenant level, or applying row level security. Use the features of your database to control access to the data, once attributes are defined and applied.
Views Per Tenant
- Set up an attribute for each user, such as
${User.tenant}
, to identify the tenant for each user. - Add the attribute name to the
zoomdata.properties
file. In this example, addtenant
:user-auditing.tenant.attribute=tenant
. - Generate an audit event for any account to trigger audit data table creation.
- Create a view for each tenant that filters the audit data table, using a condition such as
tenant='<Tenant>'
. - Create user database accounts for each tenant. Define access rights for account user to query only their own tenant audit data table.
- Create connections to the audit database using each user database account.
Row Level Security
- Set up an attribute for each user, such as
${User.tenant}
, to identify the tenant for each user. - Add the attribute name to the
zoomdata.properties
file. In this example, addtenant
:user-auditing.tenant.attribute=tenant
. - Generate an audit event for any account to trigger audit data table creation.
- Create a separate database user for each tenant, and configure row level security for each account user to query only their own tenant audit data table, using a condition such as
tenant='<Tenant>'
- Create connections to the audit database using each user database account.
Comments
0 comments
Please sign in to leave a comment.