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

Propagates SECURITY LABEL ON ROLE stmt (#7304) #7735

Merged
merged 2 commits into from
Nov 13, 2024
Merged

Conversation

emelsimsek
Copy link
Contributor

We propagate SECURITY LABEL [for provider] ON ROLE rolename IS labelname to the worker nodes.
We also make sure to run the relevant SecLabelStmt commands on a newly added node by looking at roles found in pg_shseclabel.

See official docs for explanation on how this command works: https://www.postgresql.org/docs/current/sql-security-label.html This command stores the role label in the pg_shseclabel catalog table.

This commit also fixes the regex string in
check_gucs_are_alphabetically_sorted.sh script such that it escapes the dot. Previously it was looking for all strings starting with "citus" instead of "citus." as it should.

To test this feature, I currently make use of a special GUC to control label provider registration in PG_init when creating the Citus extension.

(cherry picked from commit 0d1f188)

DESCRIPTION: PR description that will go into the change log, up to 78 characters

We propagate `SECURITY LABEL [for provider] ON ROLE rolename IS
labelname` to the worker nodes.
We also make sure to run the relevant `SecLabelStmt` commands on a
newly added node by looking at roles found in `pg_shseclabel`.

See official docs for explanation on how this command works:
https://www.postgresql.org/docs/current/sql-security-label.html
This command stores the role label in the `pg_shseclabel` catalog table.

This commit also fixes the regex string in
`check_gucs_are_alphabetically_sorted.sh` script such that it escapes
the dot. Previously it was looking for all strings starting with "citus"
instead of "citus." as it should.

To test this feature, I currently make use of a special GUC to control
label provider registration in PG_init when creating the Citus extension.

(cherry picked from commit 0d1f188)
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 89.41176% with 9 lines in your changes missing coverage. Please review.

Project coverage is 89.65%. Comparing base (15ecc37) to head (8cb73d9).
Report is 1 commits behind head on release-12.1.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-12.1    #7735      +/-   ##
================================================
+ Coverage         89.64%   89.65%   +0.01%     
================================================
  Files               274      276       +2     
  Lines             59575    59657      +82     
  Branches           7435     7446      +11     
================================================
+ Hits              53407    53488      +81     
+ Misses             4036     4034       -2     
- Partials           2132     2135       +3     

@emelsimsek emelsimsek closed this Nov 13, 2024
@emelsimsek emelsimsek reopened this Nov 13, 2024
@hanefi hanefi merged commit 686d2b4 into release-12.1 Nov 13, 2024
238 checks passed
@hanefi hanefi deleted the release-12.1-emel branch November 13, 2024 11:21
naisila pushed a commit that referenced this pull request Jan 13, 2025
Propagates SECURITY LABEL ON ROLE stmt (#7304)
We propagate `SECURITY LABEL [for provider] ON ROLE rolename IS
labelname` to the worker nodes.
We also make sure to run the relevant `SecLabelStmt` commands on a
newly added node by looking at roles found in `pg_shseclabel`.

See official docs for explanation on how this command works:
https://www.postgresql.org/docs/current/sql-security-label.html
This command stores the role label in the `pg_shseclabel` catalog table.

This commit also fixes the regex string in
`check_gucs_are_alphabetically_sorted.sh` script such that it escapes
the dot. Previously it was looking for all strings starting with "citus"
instead of "citus." as it should.

To test this feature, I currently make use of a special GUC to control
label provider registration in PG_init when creating the Citus extension.

(cherry picked from commit 0d1f188)

Co-authored-by: Naisila Puka <37271756+naisila@users.noreply.github.com>
(cherry picked from commit 686d2b4)
naisila pushed a commit that referenced this pull request Jan 13, 2025
Propagates SECURITY LABEL ON ROLE stmt (#7304)
We propagate `SECURITY LABEL [for provider] ON ROLE rolename IS
labelname` to the worker nodes.
We also make sure to run the relevant `SecLabelStmt` commands on a
newly added node by looking at roles found in `pg_shseclabel`.

See official docs for explanation on how this command works:
https://www.postgresql.org/docs/current/sql-security-label.html
This command stores the role label in the `pg_shseclabel` catalog table.

This commit also fixes the regex string in
`check_gucs_are_alphabetically_sorted.sh` script such that it escapes
the dot. Previously it was looking for all strings starting with "citus"
instead of "citus." as it should.

To test this feature, I currently make use of a special GUC to control
label provider registration in PG_init when creating the Citus extension.

(cherry picked from commit 0d1f188)

Co-authored-by: Naisila Puka <37271756+naisila@users.noreply.github.com>
(cherry picked from commit 686d2b4)
naisila pushed a commit that referenced this pull request Jan 13, 2025
Propagates SECURITY LABEL ON ROLE stmt (#7304)
We propagate `SECURITY LABEL [for provider] ON ROLE rolename IS
labelname` to the worker nodes.
We also make sure to run the relevant `SecLabelStmt` commands on a
newly added node by looking at roles found in `pg_shseclabel`.

See official docs for explanation on how this command works:
https://www.postgresql.org/docs/current/sql-security-label.html
This command stores the role label in the `pg_shseclabel` catalog table.

This commit also fixes the regex string in
`check_gucs_are_alphabetically_sorted.sh` script such that it escapes
the dot. Previously it was looking for all strings starting with "citus"
instead of "citus." as it should.

To test this feature, I currently make use of a special GUC to control
label provider registration in PG_init when creating the Citus extension.

(cherry picked from commit 0d1f188)

Co-authored-by: Naisila Puka <37271756+naisila@users.noreply.github.com>
(cherry picked from commit 686d2b4)
naisila pushed a commit that referenced this pull request Jan 13, 2025
Propagates SECURITY LABEL ON ROLE stmt (#7304)
We propagate `SECURITY LABEL [for provider] ON ROLE rolename IS
labelname` to the worker nodes.
We also make sure to run the relevant `SecLabelStmt` commands on a
newly added node by looking at roles found in `pg_shseclabel`.

See official docs for explanation on how this command works:
https://www.postgresql.org/docs/current/sql-security-label.html
This command stores the role label in the `pg_shseclabel` catalog table.

This commit also fixes the regex string in
`check_gucs_are_alphabetically_sorted.sh` script such that it escapes
the dot. Previously it was looking for all strings starting with "citus"
instead of "citus." as it should.

To test this feature, I currently make use of a special GUC to control
label provider registration in PG_init when creating the Citus extension.

(cherry picked from commit 0d1f188)

Co-authored-by: Naisila Puka <37271756+naisila@users.noreply.github.com>
(cherry picked from commit 686d2b4)
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