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: allow non-admin users to RESTORE #52581

Closed
solongordon opened this issue Aug 10, 2020 · 1 comment
Closed

sql: allow non-admin users to RESTORE #52581

solongordon opened this issue Aug 10, 2020 · 1 comment
Assignees
Labels
A-sql-privileges SQL privilege handling and permission checks. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@solongordon
Copy link
Contributor

Add the ability for non-admin users to perform RESTORE and IMPORT INTO operations. For a database restore, the user must have the CREATEDB privilege. For a table restore, they must have the CREATE privilege on the parent database. For IMPORT INTO, the user must have INSERT and DROP on the target table. (DROP is required because the IMPORT implementation makes the table unavailable for the duration of the operation.)

We do restrict what source URLs non-admins can use for these operations. nodelocal, HTTP, and AWS/GCS/Azure sources which rely on implicit credentials will continue to require the admin role.

@solongordon solongordon added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-privileges SQL privilege handling and permission checks. labels Aug 10, 2020
@solongordon solongordon self-assigned this Aug 10, 2020
@solongordon
Copy link
Contributor Author

Fixed by #53650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-privileges SQL privilege handling and permission checks. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

1 participant