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

feat: use bit flags for user privilege check #13033

Merged
merged 5 commits into from
Oct 26, 2023
Merged

Conversation

yezizp2012
Copy link
Member

@yezizp2012 yezizp2012 commented Oct 24, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Resolve #7097 .

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@yezizp2012 yezizp2012 marked this pull request as ready for review October 25, 2023 02:40
@yezizp2012 yezizp2012 requested a review from a team as a code owner October 25, 2023 02:40
@gitguardian
Copy link

gitguardian bot commented Oct 25, 2023

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id Secret Commit Filename
7648795 Generic CLI Secret 4483f42 integration_tests/iceberg-cdc/run_test.sh View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #13033 (f0de95e) into main (7f82929) will decrease coverage by 0.01%.
The diff coverage is 82.37%.

@@            Coverage Diff             @@
##             main   #13033      +/-   ##
==========================================
- Coverage   68.56%   68.55%   -0.01%     
==========================================
  Files        1496     1498       +2     
  Lines      251502   251606     +104     
==========================================
+ Hits       172438   172497      +59     
- Misses      79064    79109      +45     
Flag Coverage Δ
rust 68.55% <82.37%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/frontend/src/handler/alter_user.rs 59.39% <100.00%> (ø)
src/frontend/src/handler/create_index.rs 88.45% <100.00%> (ø)
src/frontend/src/handler/create_mv.rs 93.72% <100.00%> (ø)
src/frontend/src/handler/create_schema.rs 80.35% <100.00%> (ø)
src/frontend/src/handler/create_user.rs 90.57% <100.00%> (ø)
src/frontend/src/handler/drop_user.rs 86.04% <100.00%> (ø)
src/frontend/src/handler/handle_privilege.rs 71.79% <100.00%> (ø)
src/frontend/src/test_utils.rs 71.15% <80.00%> (-1.04%) ⬇️
src/frontend/src/catalog/system_catalog/mod.rs 94.61% <85.71%> (+1.36%) ⬆️
src/frontend/src/handler/privilege.rs 80.89% <89.47%> (-0.73%) ⬇️
... and 5 more

... and 9 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@shanicky shanicky left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@xxchan xxchan left a comment

Choose a reason for hiding this comment

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

cargo.lcok

@yezizp2012 yezizp2012 added this pull request to the merge queue Oct 26, 2023
Merged via the queue into main with commit 46d2ff9 Oct 26, 2023
9 of 11 checks passed
@yezizp2012 yezizp2012 deleted the feat/intro-acl-mode branch October 26, 2023 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: use bit flags for user privilege
3 participants