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

Create system.users table. #2235

Merged
merged 1 commit into from
Aug 25, 2015
Merged

Create system.users table. #2235

merged 1 commit into from
Aug 25, 2015

Conversation

mberhault
Copy link
Contributor

Work towards #2090.

This creates a new system table storing username/hashed-password
that is currently in the users config (removal will come next).

The main part of this change is applying custom permissions based
on the system table. descriptor and namespace are read-only,
but users needs to be modified.

@mberhault mberhault mentioned this pull request Aug 24, 2015
// only (SELECT and GRANT). These must remain set for the root user.
allowedPrivileges := privilege.SELECT.Mask() | privilege.GRANT.Mask()
if IsSystemID(id) {
// System databases and tables has custom maximum allowed privileges.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/has/have/

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

LGTM

if p == privilege.ALL {
// We need to reset privileges as Revoke(ALL) will clear
// all bits.
descriptor.Revoke(security.RootUser, privilege.List{p})
Copy link
Contributor

Choose a reason for hiding this comment

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

this can get hoisted out

@mrtracy
Copy link
Contributor

mrtracy commented Aug 24, 2015

LGTM

mberhault pushed a commit that referenced this pull request Aug 24, 2015
Work towards #2090.

* remove UserConfig proto
* remove admin users endpoint
* change cli/user commands to use basic sql statements to store the data
  in the system.users table (#2235)
Work towards #2090.

This creates a new system table storing username/hashed-password
that is currently in the users config (removal will come next).

The main part of this change is applying custom permissions based
on the system table. descriptor and namespace are read-only,
but users needs to be modified.
mberhault added a commit that referenced this pull request Aug 25, 2015
@mberhault mberhault merged commit 332de1c into master Aug 25, 2015
@mberhault mberhault deleted the marc/system.users_table branch August 25, 2015 13:08
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.

4 participants