-
Bug
-
Resolution: Done
-
Blocker
-
None
-
None
-
Undefined
According to the data roles documentation, I should be able to do this:
CREATE DATABASE test VERSION '1.0.0'; USE DATABASE test VERSION '1.0.0'; CREATE ROLE user_role WITH FOREIGN ROLE ROLE_user; CREATE SERVER accounts FOREIGN DATA WRAPPER h2; CREATE SCHEMA public SERVER accounts; IMPORT FOREIGN SCHEMA PUBLIC FROM SERVER accounts INTO public; GRANT SELECT ON TABLE public.ACCOUNT TO user_role; GRANT SELECT ON COLUMN public.ACCOUNT.SSN MASK 'xxxx' TO user_role;
Unfortunately I can't get it to work.
I'm using a modified version of the odata sample from the spring-boot project. My modifications are:
- Add a dependency on spring-boot-starter-security
- Delete the tests (they break due to the dependency)
- Add the above SQL to a file called teiid.ddl in the resources folder
- Add the following lines to the application.properties
spring.security.user.username=user spring.security.user.password=user spring.security.user.roles=user
- is caused by
-
TEIID-5798 Mixed PERMISSION GRANTS
- Resolved