mirror of
https://github.com/google/nomulus
synced 2026-02-11 15:21:28 +00:00
Modify Cloud SQL user management scripts (#302)
* Modify Cloud SQL user management scripts Create readonly and readwrite roles that may be granted to users. Also configured default privileges for tables created in the future. Made sure arbitrary users may not create database or tables. * Modify Cloud SQL user management scripts Create readonly and readwrite roles that may be granted to users. Also configured default privileges for tables created in the future. Made sure arbitrary users may not create database or tables.
This commit is contained in:
@@ -14,9 +14,7 @@
|
||||
--
|
||||
-- Script to delete a user from the database.
|
||||
|
||||
REVOKE ALL PRIVILEGES ON DATABASE postgres FROM :username;
|
||||
REVOKE ALL PRIVILEGES ON SCHEMA public FROM :username;
|
||||
REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA public FROM :username;
|
||||
REVOKE ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public FROM :username;
|
||||
REVOKE ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public FROM :username;
|
||||
-- Ignore warnings like :username is not a member of role readonly/write.
|
||||
REVOKE readonly FROM :username;
|
||||
REVOKE readwrite FROM :username;
|
||||
DROP USER :username;
|
||||
|
||||
Reference in New Issue
Block a user