Skip to content

RFC: SQL privileges #2054

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

Merged
merged 1 commit into from
Aug 12, 2015
Merged

RFC: SQL privileges #2054

merged 1 commit into from
Aug 12, 2015

Conversation

mberhault
Copy link
Contributor

No description provided.

@tbg tbg added the PTAL label Aug 11, 2015
@mberhault mberhault force-pushed the marc/RFC_sql_privileges branch from 6f3c7cd to a4f294b Compare August 11, 2015 13:59
@XisiHuang XisiHuang closed this Aug 11, 2015
@XisiHuang XisiHuang deleted the marc/RFC_sql_privileges branch August 11, 2015 14:15
@tbg tbg removed the PTAL label Aug 11, 2015
@mberhault mberhault reopened this Aug 11, 2015
@tbg tbg added the PTAL label Aug 11, 2015
### Cockroach

* the `root` user has default `ALL` privileges on all new databases. It is also the only
user allowd to create databases.
Copy link
Member

Choose a reason for hiding this comment

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

s/wd/wed/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@petermattis
Copy link
Collaborator

Looks good, just needs a few adjustments based on comments.

@tbg
Copy link
Member

tbg commented Aug 11, 2015

LGTM, this seems simple enough to build and useful for users.


Postgres and mysql both have global user tables. We do not require users
to be in the user config, only to be properly authenticated. This means
that we cannot have user-defined super users.
Copy link
Contributor

Choose a reason for hiding this comment

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

For completeness: we could make it an attribute of the certificate. Although I guess that is more or less equivalent to simply granting multiple certificates for user root.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we will ultimately want a "users" table or config. We sort of have one, but it's only for the website login, it's not required. The major reason not to have it right now it performance (it's yet another lookup), but we'll need a story for privileges, accounting, and zones other than storing them all in the descriptor. At that point, the users config can follow and become required.

@bdarnell
Copy link
Contributor

LGTM

@mberhault
Copy link
Contributor Author

if there are no further objections, I'll merge this later today.

@tbg
Copy link
Member

tbg commented Aug 12, 2015

👍

| Privilege | Level |
|-----------|-----------|
| ALL | DB, Table |
| CREATE | DB |
Copy link
Contributor

Choose a reason for hiding this comment

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

what about CREATE Table?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the level at which the permission is stored, not what they're used for.
CREATE TABLE is documented further down, it requires CREATE at the database level.
CREATE DATABASE requires the root user.

@vivekmenezes
Copy link
Contributor

LGTM

@mberhault mberhault force-pushed the marc/RFC_sql_privileges branch from bda0356 to 7db375b Compare August 12, 2015 17:30
@mberhault
Copy link
Contributor Author

status changed to in-progress and merging.

mberhault added a commit that referenced this pull request Aug 12, 2015
@mberhault mberhault merged commit 149a97a into master Aug 12, 2015
@tbg tbg removed the PTAL label Aug 12, 2015
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.

6 participants