Skip to content

Conversation

@rmloveland
Copy link
Contributor

@rmloveland rmloveland commented Apr 14, 2025

Fixes DOC-10439, DOC-12948

Summary of changes:

  • Add 'Row-level security' overview page
  • Add SQL statement docs for:
    • CREATE POLICY
    • ALTER POLICY
    • DROP POLICY
    • SHOW POLICIES
    • ALTER TABLE {ENABLE,DISABLE} ROW LEVEL SECURITY
    • ALTER TABLE {FORCE,UNFORCE} ROW LEVEL SECURITY
    • CREATE ROLE ... WITH BYPASSRLS
    • ALTER ROLE ... WITH BYPASSRLS

@rmloveland rmloveland marked this pull request as draft April 14, 2025 21:05
@github-actions
Copy link

github-actions bot commented Apr 14, 2025

@netlify
Copy link

netlify bot commented Apr 14, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit e934cec
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/68235fd536900a00086200ce

@netlify
Copy link

netlify bot commented Apr 14, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit e934cec
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/68235fd5ba27be00089cf828

@netlify
Copy link

netlify bot commented Apr 14, 2025

Netlify Preview

Name Link
🔨 Latest commit e934cec
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/68235fd56394060008c52604
😎 Deploy Preview https://deploy-preview-19527--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rmloveland rmloveland force-pushed the 20250414-DOC-10439-row-level-security branch 7 times, most recently from dc16ae3 to 2cb3af9 Compare April 23, 2025 15:50
@rmloveland rmloveland force-pushed the 20250414-DOC-10439-row-level-security branch 9 times, most recently from 56780c5 to f07bb90 Compare May 1, 2025 14:32
@rmloveland rmloveland force-pushed the 20250414-DOC-10439-row-level-security branch 4 times, most recently from 181509f to 0046485 Compare May 5, 2025 19:08
@rmloveland rmloveland marked this pull request as ready for review May 5, 2025 19:30
Fixes DOC-10439, DOC-12948

Summary of changes:

- Add 'Row-level security' overview page
- Add or update SQL statement docs for:
  - `CREATE POLICY`
  - `ALTER POLICY`
  - `DROP POLICY`
  - `SHOW POLICIES`
  - `ALTER TABLE {ENABLE,DISABLE} ROW LEVEL SECURITY`
  - `ALTER TABLE {FORCE,UNFORCE} ROW LEVEL SECURITY`
  - `CREATE ROLE ... WITH BYPASSRLS`
  - `ALTER ROLE ... WITH BYPASSRLS`
@rmloveland rmloveland force-pushed the 20250414-DOC-10439-row-level-security branch from 0046485 to 20ddc91 Compare May 5, 2025 19:32
@rmloveland rmloveland requested review from rafiss and spilchen May 5, 2025 19:32
@rmloveland rmloveland requested a review from dikshant May 5, 2025 19:32
@rmloveland rmloveland requested a review from spilchen May 9, 2025 17:32
@rmloveland
Copy link
Contributor Author

thanks for the review @spilchen, i've tried to address your feedback, this is RFAL - changes are in latest commit Update with spilchen feedback (1)

Copy link
Contributor

@spilchen spilchen left a comment

Choose a reason for hiding this comment

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

This is looking good.

@rmloveland rmloveland requested a review from taroface May 12, 2025 14:05
@rmloveland rmloveland requested a review from spilchen May 12, 2025 15:50
@rmloveland
Copy link
Contributor Author

thanks for the additional comments @spilchen , this is RFAL again!

ALTER POLICY policy_name ON table_name RENAME TO new_policy_name;
ALTER POLICY policy_name ON table_name
[ TO { role_name | PUBLIC | CURRENT_USER | SESSION_USER } [, ...] ]
Copy link
Contributor

Choose a reason for hiding this comment

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

Are the { } brackets here part of the SQL syntax convention or are you using it to denote a placeholder as we do elsewhere in the docs? If the latter, I'd recommend excluding it from the SQL syntax as it might be confusing to mix with [ ] and ( ).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah my bad, just a mistake, i have changed them from {} to () since the latter usually represents a list of OR things in a BNF grammar AIUI

Copy link
Contributor

Choose a reason for hiding this comment

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

These still look like { } to me, but maybe I'm out of sync?

@rmloveland
Copy link
Contributor Author

thanks @spilchen ! addressed your latest comments in 8f3b6b4

... also fix a busted link
@rmloveland
Copy link
Contributor Author

@spilchen and @taroface i've incorporated your latest rounds of feedback, PTAL and let me know what you think! would love to merge this on Tuesday 5/13 if possible

@rmloveland rmloveland requested review from spilchen and taroface May 13, 2025 01:14
Copy link
Contributor

@spilchen spilchen left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for revising.

Copy link
Contributor

@taroface taroface left a comment

Choose a reason for hiding this comment

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

Have a few follow-up comments but overall LGTM!

ALTER POLICY policy_name ON table_name RENAME TO new_policy_name;
ALTER POLICY policy_name ON table_name
[ TO { role_name | PUBLIC | CURRENT_USER | SESSION_USER } [, ...] ]
Copy link
Contributor

Choose a reason for hiding this comment

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

These still look like { } to me, but maybe I'm out of sync?

@rmloveland rmloveland enabled auto-merge (squash) May 13, 2025 15:05
@rmloveland rmloveland merged commit 5337dd9 into main May 13, 2025
6 checks passed
@rmloveland rmloveland deleted the 20250414-DOC-10439-row-level-security branch May 13, 2025 15:22
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.

3 participants