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: support user authentication in frontend #3074
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3074 +/- ##
==========================================
- Coverage 73.47% 73.41% -0.07%
==========================================
Files 734 734
Lines 100209 100346 +137
==========================================
+ Hits 73631 73666 +35
- Misses 26578 26680 +102
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Maybe we should unify the
-u
and-U
later .. - So for now, we can log in as
risingwave
without password. But we need password for any other users? - Do we set different permissions for different users? For example, superuser and other default user.
Rest LGTM
NTFS for 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please reconsider the name of root user :lark-cry:
@yezizp2012 Is it accurate to say that RisingWave now supports "CREATE USER"? Is the syntax same with PG's? Thanks! |
Yes, RisingWave supports "CREATE/DROP USER" now. The syntax is quit the same with PG, but only support some options as follows (some options in PG are not supported currently):
|
@yezizp2012 Seems that 'with' is not optional. Can you confirm on that? |
Yes, currently 'with' is required in risingwave. I will check the behavior in PostgreSQL and fix this if it's optional. |
Will be fix in #4414 . @CharlieSYH |
Can you point out which one in each option pair is the default if not specified? @yezizp2012
|
The default options for all are: |
That's awkward. Then I can create a database with a user role that is not supposed to have CREATEDB previledge:
|
What's changed and what's your intention?
As title, until now we can create a new user to login, the frontend will do the authentication check if password provided. Currently we using
risingwave
root
as default super user and all e2e test is running underrisingwave
root
.Note that:
psql
use-U, --username=USERNAME
as user option,sqllogictest
uses-u
/--user
.Current user is already recorded in each session, this is helpful for #2814. Cc @cnissnzg
Checklist
./risedev check
(or alias,./risedev c
)Refer to a related PR or issue link (optional)