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: remove connect privilege warning #61568

Merged

Conversation

RichardJCai
Copy link
Contributor

@RichardJCai RichardJCai commented Mar 5, 2021

sql: remove connect privilege warning

Release justification: No functionality, removing warning
Release note: None

Resolves #61560

Release justification: No functionality, removing warning
Release note: None
@RichardJCai RichardJCai requested a review from rafiss March 5, 2021 20:47
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

lgtm! thoughts on giving the admin role the connect privilege?

@RichardJCai
Copy link
Contributor Author

lgtm! thoughts on giving the admin role the connect privilege?

admin role should have connect privilege already as it's has ALL when a new db is created.

However it does not for the system db though as admin is only given GRANT/SELECT on it. We should give it CONNECT though, I'll open a separate PR for it.

I think we also need a migration to give CONNECT to admin for system dbs created before 21.1. Thoughts?

@RichardJCai
Copy link
Contributor Author

Thanks for the review!
bors r=rafiss

@RichardJCai
Copy link
Contributor Author

Wait oops, I'll wait for CI to pass first
bors r-

@craig
Copy link
Contributor

craig bot commented Mar 5, 2021

Canceled.

@RichardJCai
Copy link
Contributor Author

bors r=rafiss

@craig
Copy link
Contributor

craig bot commented Mar 5, 2021

Build failed:

@RichardJCai
Copy link
Contributor Author

bors r=rafiss

@rafiss
Copy link
Collaborator

rafiss commented Mar 6, 2021

I think we also need a migration to give CONNECT to admin for system dbs created before 21.1. Thoughts?

Hmm yes I suppose we should. I guess if it's annoying to do we can always push it off until we decide to enforce CONNECT privilege rules. lol or maybe we should just hardcode every role/user to have CONNECT privilege and make it impossible to revoke....

@craig
Copy link
Contributor

craig bot commented Mar 6, 2021

Build succeeded:

@craig craig bot merged commit 2b11985 into cockroachdb:master Mar 6, 2021
@RichardJCai
Copy link
Contributor Author

I think we also need a migration to give CONNECT to admin for system dbs created before 21.1. Thoughts?

Hmm yes I suppose we should. I guess if it's annoying to do we can always push it off until we decide to enforce CONNECT privilege rules. lol or maybe we should just hardcode every role/user to have CONNECT privilege and make it impossible to revoke....

I don't think it would be annoying to do the migration, I wouldn't say it's urgent or necessary as of now as CONNECT only allows users to see metadata and admin can already see metadata on the system database anyway.

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: warning in demo on use system - CONNECT privilege
3 participants