Skip to content

Commit 9577cbd

Browse files
committed
Document ALTER COMPOSITE DATABASE privilege
also update to not say we can manage aliases using the database management privileges
1 parent d86efda commit 9577cbd

File tree

4 files changed

+73
-18
lines changed

4 files changed

+73
-18
lines changed

modules/ROOT/images/privileges_grant_and_deny_syntax_dbms_privileges.svg

Lines changed: 1 addition & 1 deletion
Loading

modules/ROOT/images/privileges_hierarchy_dbms.svg

Lines changed: 1 addition & 1 deletion
Loading

modules/ROOT/pages/authentication-authorization/dbms-administration.adoc

Lines changed: 70 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ CREATE ROLE databaseDropper IF NOT EXISTS;
2626
CREATE ROLE compositeDatabaseDropper IF NOT EXISTS;
2727
CREATE ROLE databaseModifier IF NOT EXISTS;
2828
CREATE ROLE accessModifier IF NOT EXISTS;
29+
CREATE ROLE languageModifier IF NOT EXISTS;
30+
CREATE ROLE compositeDatabaseModifier IF NOT EXISTS;
2931
CREATE ROLE compositeDatabaseManager IF NOT EXISTS;
3032
CREATE ROLE databaseManager IF NOT EXISTS;
3133
CREATE ROLE aliasAdder IF NOT EXISTS;
@@ -864,19 +866,19 @@ For more details about the syntax descriptions, see xref:database-administration
864866
GRANT [IMMUTABLE] CREATE DATABASE
865867
ON DBMS
866868
TO role[, ...]
867-
| Enables the specified roles to create new standard databases and aliases.
869+
| Enables the specified roles to create new standard databases.
868870

869871
| [source, syntax, role=noheader]
870872
GRANT [IMMUTABLE] DROP DATABASE
871873
ON DBMS
872874
TO role[, ...]
873-
| Enables the specified roles to delete standard databases and aliases.
875+
| Enables the specified roles to delete standard databases.
874876

875877
| [source, syntax, role=noheader]
876878
GRANT [IMMUTABLE] ALTER DATABASE
877879
ON DBMS
878880
TO role[, ...]
879-
| Enables the specified roles to modify standard databases and aliases.
881+
| Enables the specified roles to modify standard databases.
880882

881883
| [source, syntax, role=noheader]
882884
GRANT [IMMUTABLE] SET DATABASE ACCESS
@@ -888,7 +890,7 @@ GRANT [IMMUTABLE] SET DATABASE ACCESS
888890
GRANT [IMMUTABLE] SET DATABASE DEFAULT LANGUAGE
889891
ON DBMS
890892
TO role[, ...]
891-
| Enables the specified roles to set the default query language on a database.
893+
| Enables the specified roles to set the default query language on a standard database.
892894

893895
| [source, syntax, role=noheader]
894896
GRANT CREATE COMPOSITE DATABASE
@@ -902,30 +904,36 @@ GRANT DROP COMPOSITE DATABASE
902904
TO role[, ...]
903905
| Enables the specified roles to delete composite databases.
904906

907+
| [source, syntax, role=noheader]
908+
GRANT ALTER COMPOSITE DATABASE
909+
ON DBMS
910+
TO role[, ...]
911+
| Enables the specified roles to modify composite databases.
912+
905913
| [source, syntax, role=noheader]
906914
GRANT COMPOSITE DATABASE MANAGEMENT
907915
ON DBMS
908916
TO role[, ...]
909-
| Enables the specified roles to create and delete composite databases.
917+
| Enables the specified roles to create, delete or modify composite databases.
910918

911919
| [source, syntax, role=noheader]
912920
GRANT [IMMUTABLE] DATABASE MANAGEMENT
913921
ON DBMS
914922
TO role[, ...]
915-
| Enables the specified roles to create, delete, and modify databases and aliases.
923+
| Enables the specified roles to create, delete, and modify databases.
916924

917925
|===
918926

919927

920-
The ability to create standard databases and aliases can be granted via the `CREATE DATABASE` privilege.
928+
The ability to create standard databases can be granted via the `CREATE DATABASE` privilege.
921929
See an example:
922930

923931
[source, cypher, role=noplay]
924932
----
925933
GRANT CREATE DATABASE ON DBMS TO databaseAdder
926934
----
927935

928-
The resulting role has privileges that only allow creating standard databases and aliases.
936+
The resulting role has privileges that only allow creating standard databases.
929937
List all privileges for the role `databaseAdder` as commands by using the following query:
930938

931939
[source, cypher, role=noplay]
@@ -965,15 +973,15 @@ SHOW ROLE compositeDatabaseAdder PRIVILEGES AS COMMANDS
965973
a|Rows: 1
966974
|===
967975

968-
The ability to delete standard databases and aliases can be granted via the `DROP DATABASE` privilege.
976+
The ability to delete standard databases can be granted via the `DROP DATABASE` privilege.
969977
See an example:
970978

971979
[source, cypher, role=noplay]
972980
----
973981
GRANT DROP DATABASE ON DBMS TO databaseDropper
974982
----
975983

976-
The resulting role has privileges that only allow deleting standard databases and aliases.
984+
The resulting role has privileges that only allow deleting standard databases.
977985
List all privileges for the role `databaseDropper` as commands by using the following query:
978986

979987
[source, cypher, role=noplay]
@@ -1013,15 +1021,15 @@ SHOW ROLE compositeDatabaseDropper PRIVILEGES AS COMMANDS
10131021
a|Rows: 1
10141022
|===
10151023

1016-
The ability to modify standard databases and aliases can be granted via the `ALTER DATABASE` privilege.
1024+
The ability to modify standard databases can be granted via the `ALTER DATABASE` privilege.
10171025
See an example:
10181026

10191027
[source, cypher, role=noplay]
10201028
----
10211029
GRANT ALTER DATABASE ON DBMS TO databaseModifier
10221030
----
10231031

1024-
The resulting role has privileges that only allow modifying standard databases and aliases.
1032+
The resulting role has privileges that only allow modifying standard databases.
10251033
List all privileges for the role `databaseModifier` as commands by using the following query:
10261034

10271035
[source, cypher, role=noplay]
@@ -1061,6 +1069,54 @@ SHOW ROLE accessModifier PRIVILEGES AS COMMANDS
10611069
a|Rows: 1
10621070
|===
10631071

1072+
The ability to modify the default language to standard databases can be granted via the `SET DATABASE DEFAULT LANGUAGE` privilege.
1073+
See an example:
1074+
1075+
[source, cypher, role=noplay]
1076+
----
1077+
GRANT SET DATABASE DEFAULT LANGUAGE ON DBMS TO languageModifier
1078+
----
1079+
1080+
The resulting role has privileges that only allow modifying default language to standard databases.
1081+
List all privileges for the role `languageModifier` as commands by using the following query:
1082+
1083+
[source, cypher, role=noplay]
1084+
----
1085+
SHOW ROLE languageModifier PRIVILEGES AS COMMANDS
1086+
----
1087+
1088+
.Result
1089+
[options="header,footer", width="100%", cols="m"]
1090+
|===
1091+
|command
1092+
|"GRANT SET DATABASE DEFAULT LANGUAGE ON DBMS TO `languageModifier`"
1093+
a|Rows: 1
1094+
|===
1095+
1096+
The ability to modify composite databases can be granted via the `ALTER COMPOSITE DATABASE` privilege.
1097+
See an example:
1098+
1099+
[source, cypher, role=noplay]
1100+
----
1101+
GRANT ALTER COMPOSITE DATABASE ON DBMS TO compositeDatabaseModifier
1102+
----
1103+
1104+
The resulting role has privileges that only allow modifying composite databases.
1105+
List all privileges for the role `compositeDatabaseModifier` as commands by using the following query:
1106+
1107+
[source, cypher, role=noplay]
1108+
----
1109+
SHOW ROLE compositeDatabaseModifier PRIVILEGES AS COMMANDS
1110+
----
1111+
1112+
.Result
1113+
[options="header,footer", width="100%", cols="m"]
1114+
|===
1115+
|command
1116+
|"GRANT ALTER COMPOSITE DATABASE ON DBMS TO `compositeDatabaseModifier`"
1117+
a|Rows: 1
1118+
|===
1119+
10641120
The ability to create and delete composite databases can be granted via the `COMPOSITE DATABASE MANAGEMENT` privilege.
10651121
See an example:
10661122

@@ -1085,15 +1141,15 @@ SHOW ROLE compositeDatabaseManager PRIVILEGES AS COMMANDS
10851141
a|Rows: 1
10861142
|===
10871143

1088-
The ability to create, delete, and modify databases and aliases can be granted via the `DATABASE MANAGEMENT` privilege.
1144+
The ability to create, delete, and modify databases can be granted via the `DATABASE MANAGEMENT` privilege.
10891145
See an example:
10901146

10911147
[source, cypher, role=noplay]
10921148
----
10931149
GRANT DATABASE MANAGEMENT ON DBMS TO databaseManager
10941150
----
10951151

1096-
The resulting role has all privileges to manage standard and composite databases as well as aliases.
1152+
The resulting role has all privileges to manage standard and composite databases.
10971153
List all privileges for the role `databaseManager` as commands by using the following query:
10981154

10991155
[source, cypher, role=noplay]
@@ -1114,7 +1170,6 @@ a|Rows: 1
11141170

11151171
The DBMS privileges for alias management can be assigned by using Cypher administrative commands and can be applied to both local and remote aliases.
11161172
They can be granted, denied and revoked like other privileges.
1117-
It is also possible to manage aliases with <<access-control-dbms-administration-database-management, database management commands>>.
11181173

11191174
[NOTE]
11201175
====

modules/ROOT/pages/database-administration/standard-databases/listing-databases.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ The results of the `SHOW DATABASES` command are filtered according to the `ACCES
208208
However, some privileges enable users to see additional databases regardless of their `ACCESS` privileges:
209209

210210
* Users with `CREATE/DROP/ALTER DATABASE` or `SET DATABASE ACCESS` privileges can see all standard databases.
211-
* Users with `CREATE/DROP COMPOSITE DATABASE` or `COMPOSITE DATABASE MANAGEMENT` privileges can see all composite databases.
211+
* Users with `CREATE/DROP/ALTER COMPOSITE DATABASE` or `COMPOSITE DATABASE MANAGEMENT` privileges can see all composite databases.
212212
* Users with `DATABASE MANAGEMENT` privilege can see all databases.
213213

214214
If a user has not been granted `ACCESS` privilege to any databases nor any of the above special cases, the command can still be executed but it will only return the `system` database, which is always visible.

0 commit comments

Comments
 (0)