diff --git a/src/browser/documentation/help/alter-user.jsx b/src/browser/documentation/help/alter-user.jsx new file mode 100644 index 00000000000..2521b20322f --- /dev/null +++ b/src/browser/documentation/help/alter-user.jsx @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2002-2019 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import React from 'react' +import ManualLink from 'browser-components/ManualLink' +import AdminOnSystemDb from './partials/admin-on-systemdb' +const title = 'ALTER USER' +const subtitle = 'Modify a user' +const category = 'administration' +const content = ( + <> +

+ The ALTER USER command can be used to modify an existing + user. +

+
+
+

Reference

+

+ + ALTER USER + {' '} + manual page +

+
+
+

Related

+

+ :help SHOW USERS{' '} + :help CREATE USER{' '} + :help DROP USER{' '} + :help Cypher +

+
+
+
+
+
+          ALTER USER jake SET PASSWORD 'abc123'
+          
+ CHANGE NOT REQUIRED SET STATUS +
+ ACTIVE +
+
+ Modify the user jake with a new password and active status as well as + remove the requirement to change his password. +
+
+
+
+          ALTER CURRENT USER SET PASSWORD FROM 'abc123' TO '123xyz'
+        
+
+ Users can change their own password using ALTER CURRENT USER SET + PASSWORD. The old password is required in addition to the new one, and + either or both can be a string value or a string parameter. When a + user executes this command it will change their password as well as + set the CHANGE NOT REQUIRED flag. +
+
+
+ + +) +export default { title, subtitle, category, content } diff --git a/src/browser/documentation/help/create-role.jsx b/src/browser/documentation/help/create-role.jsx new file mode 100644 index 00000000000..de79505d146 --- /dev/null +++ b/src/browser/documentation/help/create-role.jsx @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2002-2019 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import React from 'react' +import ManualLink from 'browser-components/ManualLink' +import AdminOnSystemDb from './partials/admin-on-systemdb' +const title = 'CREATE ROLE' +const subtitle = 'Create a new role' +const category = 'security' +const content = ( + <> +

+ The CREATE ROLE command can be used to create roles. +

+
+
+

Reference

+

+ + CREATE ROLE + {' '} + manual page +

+
+
+

Related

+

+ :help SHOW ROLES{' '} + :help DROP ROLE{' '} + :help GRANT ROLE{' '} + :help REVOKE ROLE{' '} + :help Cypher +

+
+
+
+
+
+          CREATE ROLE myrole
+        
+
+
+
+          CREATE ROLE mysecondrole AS COPY OF myrole
+        
+
+ A role can also be copied, keeping its privileges. +
+
+
+ + +) +export default { title, subtitle, category, content } diff --git a/src/browser/documentation/help/create-user.jsx b/src/browser/documentation/help/create-user.jsx index c23eb5bf1a7..d556a5e2f7e 100644 --- a/src/browser/documentation/help/create-user.jsx +++ b/src/browser/documentation/help/create-user.jsx @@ -47,6 +47,7 @@ const content = (

Related

:help SHOW USERS{' '} + :help ALTER USER{' '} :help DROP USER{' '} :help Cypher

diff --git a/src/browser/documentation/help/deny.jsx b/src/browser/documentation/help/deny.jsx new file mode 100644 index 00000000000..8aeb7046647 --- /dev/null +++ b/src/browser/documentation/help/deny.jsx @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2002-2019 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import React from 'react' +import ManualLink from 'browser-components/ManualLink' +import AdminOnSystemDb from './partials/admin-on-systemdb' +const title = 'DENY' +const subtitle = 'Deny privileges to roles' +const category = 'security' +const content = ( + <> +

+ The DENY command allows an administrator to deny a privilege + to a role in order to prevent access to an entity. +

+
+
+

Reference

+

+ + Subgraph security + {' '} + manual page +
+ + Database administration + {' '} + manual page +

+
+
+

Related

+

+ :help SHOW PRIVILEGES{' '} + :help GRANT{' '} + :help REVOKE{' '} + :help Cypher +

+
+
+
+
+
+          DENY graph-privilege ON GRAPH dbname entity TO role
+        
+
+ Deny a subgraph privilege to a role (eg. write nodes/relationships). +
+
+
+
+          DENY database-privilege ON DATABASE dbname TO role
+        
+
+ Deny a database administrative privilege to a role (eg. create index + or start/stop database). +
+
+
+ + +) +export default { title, subtitle, category, content } diff --git a/src/browser/documentation/help/drop-role.jsx b/src/browser/documentation/help/drop-role.jsx new file mode 100644 index 00000000000..db6112f9289 --- /dev/null +++ b/src/browser/documentation/help/drop-role.jsx @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2019 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import React from 'react' +import ManualLink from 'browser-components/ManualLink' +import AdminOnSystemDb from './partials/admin-on-systemdb' +const title = 'DROP ROLE' +const subtitle = 'Delete a role' +const category = 'security' +const content = ( + <> +

+ The DROP ROLE command can be used to delete roles. +

+
+
+

Reference

+

+ + DROP ROLE + {' '} + manual page +

+
+
+

Related

+

+ :help SHOW ROLES{' '} + :help CREATE ROLE{' '} + :help GRANT ROLE{' '} + :help REVOKE ROLE{' '} + :help Cypher +

+
+
+
+
+
DROP ROLE myrole
+
+
+ + +) +export default { title, subtitle, category, content } diff --git a/src/browser/documentation/help/drop-user.jsx b/src/browser/documentation/help/drop-user.jsx index 874d080ef40..2054ac6dae0 100644 --- a/src/browser/documentation/help/drop-user.jsx +++ b/src/browser/documentation/help/drop-user.jsx @@ -48,6 +48,7 @@ const content = (

:help SHOW USERS{' '} :help CREATE USER{' '} + :help ALTER USER{' '} :help Cypher

diff --git a/src/browser/documentation/help/grant-role.jsx b/src/browser/documentation/help/grant-role.jsx new file mode 100644 index 00000000000..ead7ded58cd --- /dev/null +++ b/src/browser/documentation/help/grant-role.jsx @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2002-2019 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import React from 'react' +import ManualLink from 'browser-components/ManualLink' +import AdminOnSystemDb from './partials/admin-on-systemdb' +const title = 'GRANT ROLE' +const subtitle = 'Assign roles to users' +const category = 'security' +const content = ( + <> +

+ The GRANT ROLE command can be used to assign roles to users, + giving them access rights. +

+
+
+

Reference

+

+ + GRANT ROLE + {' '} + manual page +

+
+
+

Related

+

+ :help SHOW ROLES{' '} + :help CREATE ROLE{' '} + :help DROP ROLE{' '} + :help REVOKE ROLE{' '} + :help Cypher +

+
+
+
+
+
+          GRANT ROLE myrole TO jake
+        
+
+
+
+          GRANT ROLES role1, role2 TO user1, user2, user3
+        
+
+ It is possible to assign multiple roles to multiple users in one + command. +
+
+
+ + +) +export default { title, subtitle, category, content } diff --git a/src/browser/documentation/help/grant.jsx b/src/browser/documentation/help/grant.jsx new file mode 100644 index 00000000000..32df3c3f659 --- /dev/null +++ b/src/browser/documentation/help/grant.jsx @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2002-2019 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import React from 'react' +import ManualLink from 'browser-components/ManualLink' +import AdminOnSystemDb from './partials/admin-on-systemdb' +const title = 'GRANT' +const subtitle = 'Grant privileges to roles' +const category = 'security' +const content = ( + <> +

+ The GRANT command allows an administrator to grant a + privilege to a role in order to access an entity. +

+
+
+

Reference

+

+ + Subgraph security + {' '} + manual page +
+ + Database administration + {' '} + manual page +

+
+
+

Related

+

+ :help SHOW PRIVILEGES{' '} + :help REVOKE{' '} + :help DENY{' '} + :help Cypher +

+
+
+
+
+
+          GRANT graph-privilege ON GRAPH dbname entity TO role
+        
+
+ Grant a subgraph privilege to a role (eg. write nodes/relationships). +
+
+
+
+          GRANT database-privilege ON DATABASE dbname TO role
+        
+
+ Grant a database administrative privilege to a role (eg. create index + or start/stop database). +
+
+
+ + +) +export default { title, subtitle, category, content } diff --git a/src/browser/documentation/help/revoke-role.jsx b/src/browser/documentation/help/revoke-role.jsx new file mode 100644 index 00000000000..dddcf740860 --- /dev/null +++ b/src/browser/documentation/help/revoke-role.jsx @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2002-2019 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import React from 'react' +import ManualLink from 'browser-components/ManualLink' +import AdminOnSystemDb from './partials/admin-on-systemdb' +const title = 'REVOKE ROLE' +const subtitle = 'Revoke roles from users' +const category = 'security' +const content = ( + <> +

+ The REVOKE ROLE command can be used to revoke roles from + users, removing access rights from them. +

+
+
+

Reference

+

+ + REVOKE ROLE + {' '} + manual page +

+
+
+

Related

+

+ :help SHOW ROLES{' '} + :help CREATE ROLE{' '} + :help DROP ROLE{' '} + :help GRANT ROLE{' '} + :help Cypher +

+
+
+
+
+
+          REVOKE ROLE myrole FROM jake
+        
+
+
+
+          REVOKE ROLES role1, role2 TO user1, user2, user3
+        
+
+ It is possible to revoke multiple roles from multiple users in one + command. +
+
+
+ + +) +export default { title, subtitle, category, content } diff --git a/src/browser/documentation/help/revoke.jsx b/src/browser/documentation/help/revoke.jsx new file mode 100644 index 00000000000..3e18d78bc56 --- /dev/null +++ b/src/browser/documentation/help/revoke.jsx @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2002-2019 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import React from 'react' +import ManualLink from 'browser-components/ManualLink' +import AdminOnSystemDb from './partials/admin-on-systemdb' +const title = 'REVOKE' +const subtitle = 'Revoke granted or denied privileges' +const category = 'security' +const content = ( + <> +

+ The REVOKE command allows an administrator to remove a + previously granted or denied privilege. +

+
+
+

Reference

+

+ + Subgraph security + {' '} + manual page +
+ + Database administration + {' '} + manual page +

+
+
+

Related

+

+ :help SHOW PRIVILEGES{' '} + :help GRANT{' '} + :help DENY{' '} + :help Cypher +

+
+
+
+
+
+          REVOKE GRANT graph-privilege ON GRAPH dbname entity TO role
+        
+
+ Revoke a granted subgraph privilege from a role (eg. write + nodes/relationships). +
+
+
+
+          REVOKE DENY graph-privilege ON GRAPH dbname entity TO role
+        
+
Revoke a denied subgraph privilege from a role.
+
+
+
+          REVOKE graph-privilege ON GRAPH dbname entity TO role
+        
+
+ Revoke a granted or denied subgraph privilege from a role. +
+
+
+
+          REVOKE GRANT database-privilege ON DATABASE dbname TO role
+        
+
+ Revoke a granted database administrative privilege from a role (eg. + create index or start/stop database). +
+
+
+ + +) +export default { title, subtitle, category, content } diff --git a/src/browser/documentation/help/show-privileges.jsx b/src/browser/documentation/help/show-privileges.jsx new file mode 100644 index 00000000000..9467242d759 --- /dev/null +++ b/src/browser/documentation/help/show-privileges.jsx @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2019 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import React from 'react' +import ManualLink from 'browser-components/ManualLink' +import AdminOnSystemDb from './partials/admin-on-systemdb' +const title = 'SHOW PRIVILEGES' +const subtitle = 'List available privileges' +const category = 'security' +const content = ( + <> +

+ The SHOW PRIVILEGES command can be used to list available + privileges for all roles. +

+
+
+

Reference

+

+ + SHOW PRIVILEGES + {' '} + manual page +

+
+
+

Related

+

+ :help GRANT{' '} + :help DENY{' '} + :help REVOKE{' '} + :help Cypher +

+
+
+
+
+
SHOW PRIVILEGES
+
+
+ + +) +export default { title, subtitle, category, content } diff --git a/src/browser/documentation/help/show-roles.jsx b/src/browser/documentation/help/show-roles.jsx new file mode 100644 index 00000000000..bacab8b6f9b --- /dev/null +++ b/src/browser/documentation/help/show-roles.jsx @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2019 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import React from 'react' +import ManualLink from 'browser-components/ManualLink' +import AdminOnSystemDb from './partials/admin-on-systemdb' +const title = 'SHOW ROLES' +const subtitle = 'List available roles' +const category = 'security' +const content = ( + <> +

+ The SHOW ROLES command can be used to list available roles. +

+
+
+

Reference

+

+ + SHOW ROLES + {' '} + manual page +

+
+
+

Related

+

+ :help CREATE ROLE{' '} + :help DROP ROLE{' '} + :help GRANT ROLE{' '} + :help REVOKE ROLE{' '} + :help Cypher +

+
+
+
+
+
SHOW ROLES
+
+
+ + +) +export default { title, subtitle, category, content } diff --git a/src/browser/documentation/help/show-users.jsx b/src/browser/documentation/help/show-users.jsx index 3183d487597..c56730c5e63 100644 --- a/src/browser/documentation/help/show-users.jsx +++ b/src/browser/documentation/help/show-users.jsx @@ -48,6 +48,7 @@ const content = (

Related

:help CREATE USER{' '} + :help ALTER USER{' '} :help DROP USER{' '} :help Cypher

diff --git a/src/browser/documentation/index.js b/src/browser/documentation/index.js index ebbdf83eeca..cdcd753ef49 100644 --- a/src/browser/documentation/index.js +++ b/src/browser/documentation/index.js @@ -19,6 +19,7 @@ */ // Help +import helpAlterUser from './help/alter-user' import helpBolt from './dynamic/bolt' import helpBoltEncryption from './help/bolt-encryption' import helpBoltRouting from './help/bolt-routing' @@ -27,17 +28,22 @@ import helpContains from './help/contains' import helpCreateConstraintOn from './help/create-constraint-on' import helpCreateDatabase from './help/create-database' import helpCreateIndexOn from './help/create-index-on' +import helpCreateRole from './help/create-role' import helpCreateUser from './help/create-user' import helpCreate from './help/create' import helpDelete from './help/delete' +import helpDeny from './help/deny' import helpDropConstraintOn from './help/drop-constraint-on' import helpDropDatabase from './help/drop-database' import helpDropIndexOn from './help/drop-index-on' +import helpDropRole from './help/drop-role' import helpDropUser from './help/drop-user' import helpDetachDelete from './help/detach-delete' import helpEndsWith from './help/ends-with' import helpExplain from './help/explain' import helpForeach from './help/foreach' +import helpGrant from './help/grant' +import helpGrantRole from './help/grant-role' import helpHistory from './help/history' import helpHistoryClear from './help/history-clear' import helpKeys from './help/keys' @@ -56,11 +62,15 @@ import helpRestGet from './help/rest-get' import helpRestPost from './help/rest-post' import helpRestPut from './help/rest-put' import helpReturn from './help/return' +import helpRevoke from './help/revoke' +import helpRevokeRole from './help/revoke-role' import helpSchema from './help/schema' import helpServer from './help/server' import helpServerUser from './help/server-user' import helpSet from './help/set' import helpShowDatabases from './help/show-databases' +import helpShowPrivileges from './help/show-privileges' +import helpShowRoles from './help/show-roles' import helpShowUsers from './help/show-users' import helpStartsWith from './help/starts-with' import helpStyle from './help/style' @@ -117,21 +127,27 @@ export default { cypher: { title: 'Cypher', chapters: { + alterUser: helpAlterUser, contains: helpContains, createConstraintOn: helpCreateConstraintOn, createDatabase: helpCreateDatabase, createIndexOn: helpCreateIndexOn, + createRole: helpCreateRole, createUser: helpCreateUser, create: helpCreate, delete: helpDelete, + deny: helpDeny, detachDelete: helpDetachDelete, dropConstraintOn: helpDropConstraintOn, dropDatabase: helpDropDatabase, dropIndexOn: helpDropIndexOn, + dropRole: helpDropRole, dropUser: helpDropUser, endsWith: helpEndsWith, explain: helpExplain, foreach: helpForeach, + grant: helpGrant, + grantRole: helpGrantRole, loadCsv: helpLoadCsv, match: helpMatch, merge: helpMerge, @@ -146,9 +162,13 @@ export default { restPost: helpRestPost, restPut: helpRestPut, return: helpReturn, + revoke: helpRevoke, + revokeRole: helpRevokeRole, schema: helpSchema, set: helpSet, showDatabases: helpShowDatabases, + showPrivileges: helpShowPrivileges, + showRoles: helpShowRoles, showUsers: helpShowUsers, startsWith: helpStartsWith, template: helpTemplate, diff --git a/src/browser/documentation/templates/DynamicTopics.jsx b/src/browser/documentation/templates/DynamicTopics.jsx index 760954b8776..1c565c805a8 100644 --- a/src/browser/documentation/templates/DynamicTopics.jsx +++ b/src/browser/documentation/templates/DynamicTopics.jsx @@ -40,6 +40,7 @@ const categorize = commands => { cypherHelp: { title: 'Cypher Help' }, schemaClauses: { title: 'Schema Clauses' }, administration: { title: 'Administration' }, + security: { title: 'Security' }, cypherPredicates: { title: 'Cypher Predicates' }, restApiCommands: { title: 'Rest API Commands' }, guides: { title: 'Guides' },