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

Adapt RLS-CLS VS to DB version 8. #105

Merged
merged 2 commits into from
Jan 13, 2025
Merged

Conversation

allipatev
Copy link
Contributor

No description provided.

@@ -3,7 +3,7 @@

## Background:

**The official project to implement Row Level Security via Virtual Schemas is described here: <https://github.com/exasol/row-level-security-lua>. We recommend to use the Github Project to implement your own Row Level Security. The below article is only an example of a custom connector and is not officially supported**
Copy link

@PeggySchmidtMittenzwei PeggySchmidtMittenzwei Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This article describes how you could implement a custom Virtual Schema adapter to implement Column Level Security (CLS) in addition to Row Level Security (RLS). RLS with EXASOL can be used to restrict access to rows (datasets) in tables to set of roles, tenants (owners), group of users, combination of tenant and role, and combination of tenant and group. CLS allows customers to control access to table columns.

The official project to implement Row Level Security via Virtual Schemas is described here: https://github.com/exasol/row-level-security-lua. We recommend to use the Github Project to implement your own Row Level Security. The below article is only an example of a custom connector and is not officially supported.

This article consists of 4 parts:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the paragraph accordingly and also fixed word case below.

@@ -25,13 +25,13 @@ At the same time, there are also bank employees that are not working for a parti
To prepare for this demo, you will need to download these 2 files:

* RLS-CLS-data_schema_customer.csv
* RLS-CLS-Demo_V2.sql
* RLS-CLS-Demo_PYTHON3.sql

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you pls explain in more detail?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added hyperlink and changed the second to "PYTHON3" version.

@@ -119,7 +119,7 @@ INSERT INTO ADAPTER_SCHEMA.RESTRICTIONS_COLUMNS VALUES
```
Now, the E-mail column is also hidden for all users with the CLS_DETAILS_SECURED role.

With this framework, you can specify as many restrictions on as many tables as you want. You can even expand the adapter to script to fit your exact use case. 
With this framework, you can specify as many restrictions on as many tables as you want. You can even expand the adapter to script to fit your exact use case.

## Additional References:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to publish _V2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, to not break potential existing links.

Nevertheless, I've added now a comment inside the "RLS-CLS-Demo_V2.sql" file and also link to it from article as RLS-CLS-Demo_V2 _OLD.sql now.

@allipatev allipatev force-pushed the vs-rls-cls-v8 branch 2 times, most recently from 5b48bde to 20fcb51 Compare January 13, 2025 10:39
Copy link

@PeggySchmidtMittenzwei PeggySchmidtMittenzwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect

@@ -119,7 +119,7 @@ INSERT INTO ADAPTER_SCHEMA.RESTRICTIONS_COLUMNS VALUES
```
Now, the E-mail column is also hidden for all users with the CLS_DETAILS_SECURED role.

With this framework, you can specify as many restrictions on as many tables as you want. You can even expand the adapter to script to fit your exact use case. 
With this framework, you can specify as many restrictions on as many tables as you want. You can even expand the adapter to script to fit your exact use case.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there performance restrictions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not analyze it in detail and prefer to think that this VS isn't a good fit for high workload scenarios (a note in bold in the beginning).

@allipatev allipatev merged commit 8b79dc0 into exasol:main Jan 13, 2025
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

Successfully merging this pull request may close these issues.

2 participants