Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the customization for the TenantHasAuthoritiesFunctionDefinitionEnricher type to simplify policy conditions #226

Open
starnowski opened this issue Jan 10, 2022 · 0 comments
Milestone

Comments

@starnowski
Copy link
Owner

Add the customization for the TenantHasAuthoritiesFunctionDefinitionEnricher type to simplify policy conditions.

AC:
The goal is to add new type that implements com.github.starnowski.posmulten.postgresql.core.rls.TenantHasAuthoritiesFunctionInvocationFactory.
The returnTenantHasAuthoritiesFunctionInvocation method should return a simple condition statement that compares tenant column id with the value from a function that returns the current tenant value.
For example:
tenant_id = get_current_tenant_id()
Generated policies should look like below:
USING (tenant_id = get_current_tenant_id())
WITH CHECK (tenant_id = get_current_tenant_id());

@starnowski starnowski added this to the r-0.6 milestone Jan 10, 2022
@starnowski starnowski modified the milestones: r-0.6, r-0.7 Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant