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

sql: ensure that CREATELOGIN is needed for CREATE USER #55368

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

knz
Copy link
Contributor

@knz knz commented Oct 9, 2020

Fixes #55367

Release note (bug fix): The CREATE USER statement without explicit
NOLOGIN option implicitly grants LOGIN, and so requires the
CREATELOGIN privilege. This was not checked properly, and is now
enforced. This bug was introduced earlier in the v20.2 development
cycle.

@knz knz requested a review from solongordon October 9, 2020 08:48
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@solongordon solongordon left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @solongordon)

@solongordon
Copy link
Contributor

Looks good though needs a logic test update.

@knz
Copy link
Contributor Author

knz commented Oct 10, 2020

Thanks!

bors r=rsolongordon

@craig
Copy link
Contributor

craig bot commented Oct 10, 2020

Build failed:

@knz
Copy link
Contributor Author

knz commented Oct 10, 2020

bors r=rsolongordon

@craig
Copy link
Contributor

craig bot commented Oct 10, 2020

Build failed:

@knz
Copy link
Contributor Author

knz commented Oct 10, 2020

flake: #55403

bors r=solongordon

@craig
Copy link
Contributor

craig bot commented Oct 10, 2020

Build failed:

@knz
Copy link
Contributor Author

knz commented Oct 10, 2020

another flake: #55407

bors r=solongordon

@craig
Copy link
Contributor

craig bot commented Oct 10, 2020

Build failed:

Release note (bug fix): The `CREATE USER` statement without explicit
NOLOGIN option implicitly grants LOGIN, and so requires the
CREATELOGIN privilege. This was not checked properly, and is now
enforced. This bug was introduced earlier in the v20.2 development
cycle.
@knz
Copy link
Contributor Author

knz commented Oct 13, 2020

bors r=solongordon

craig bot pushed a commit that referenced this pull request Oct 13, 2020
55368: sql: ensure that CREATELOGIN is needed for CREATE USER r=solongordon a=knz

Fixes #55367

Release note (bug fix): The `CREATE USER` statement without explicit
NOLOGIN option implicitly grants LOGIN, and so requires the
CREATELOGIN privilege. This was not checked properly, and is now
enforced. This bug was introduced earlier in the v20.2 development
cycle.

Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net>
@craig
Copy link
Contributor

craig bot commented Oct 13, 2020

Build failed:

@knz
Copy link
Contributor Author

knz commented Oct 13, 2020

new/different flake: #55497

bors r=solongordon

@craig
Copy link
Contributor

craig bot commented Oct 13, 2020

Build succeeded:

@craig craig bot merged commit 23320b3 into cockroachdb:master Oct 13, 2020
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.

sql: a user with CREATEROLE can grant LOGIN via the CREATE USER statement
3 participants