-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add help cards for security commands (#1027)
* Add help cards for security commands
- Loading branch information
Showing
15 changed files
with
814 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
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 = ( | ||
<> | ||
<p> | ||
The <code>ALTER USER</code> command can be used to modify an existing | ||
user. | ||
</p> | ||
<div className="links"> | ||
<div className="link"> | ||
<p className="title">Reference</p> | ||
<p className="content"> | ||
<ManualLink | ||
chapter="cypher-manual" | ||
page="/administration/security/users-and-roles/#administration-security-users-alter" | ||
minVersion="4.0.0" | ||
> | ||
ALTER USER | ||
</ManualLink>{' '} | ||
manual page | ||
</p> | ||
</div> | ||
<div className="link"> | ||
<p className="title">Related</p> | ||
<p className="content"> | ||
<a help-topic="show-users">:help SHOW USERS</a>{' '} | ||
<a help-topic="create-user">:help CREATE USER</a>{' '} | ||
<a help-topic="drop-user">:help DROP USER</a>{' '} | ||
<a help-topic="cypher">:help Cypher</a> | ||
</p> | ||
</div> | ||
</div> | ||
<section className="example"> | ||
<figure> | ||
<pre className="code runnable standalone-example"> | ||
ALTER USER jake SET PASSWORD 'abc123' | ||
<br /> | ||
CHANGE NOT REQUIRED SET STATUS | ||
<br /> | ||
ACTIVE | ||
</pre> | ||
<figcaption> | ||
Modify the user jake with a new password and active status as well as | ||
remove the requirement to change his password. | ||
</figcaption> | ||
</figure> | ||
<figure> | ||
<pre className="code runnable standalone-example"> | ||
ALTER CURRENT USER SET PASSWORD FROM 'abc123' TO '123xyz' | ||
</pre> | ||
<figcaption> | ||
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. | ||
</figcaption> | ||
</figure> | ||
</section> | ||
<AdminOnSystemDb /> | ||
</> | ||
) | ||
export default { title, subtitle, category, content } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
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 = ( | ||
<> | ||
<p> | ||
The <code>CREATE ROLE</code> command can be used to create roles. | ||
</p> | ||
<div className="links"> | ||
<div className="link"> | ||
<p className="title">Reference</p> | ||
<p className="content"> | ||
<ManualLink | ||
chapter="cypher-manual" | ||
page="/administration/security/users-and-roles/#administration-security-roles-create" | ||
minVersion="4.0.0" | ||
> | ||
CREATE ROLE | ||
</ManualLink>{' '} | ||
manual page | ||
</p> | ||
</div> | ||
<div className="link"> | ||
<p className="title">Related</p> | ||
<p className="content"> | ||
<a help-topic="show-roles">:help SHOW ROLES</a>{' '} | ||
<a help-topic="drop-role">:help DROP ROLE</a>{' '} | ||
<a help-topic="grant-role">:help GRANT ROLE</a>{' '} | ||
<a help-topic="revoke-role">:help REVOKE ROLE</a>{' '} | ||
<a help-topic="cypher">:help Cypher</a> | ||
</p> | ||
</div> | ||
</div> | ||
<section className="example"> | ||
<figure> | ||
<pre className="code runnable standalone-example"> | ||
CREATE ROLE myrole | ||
</pre> | ||
</figure> | ||
<figure> | ||
<pre className="code runnable standalone-example"> | ||
CREATE ROLE mysecondrole AS COPY OF myrole | ||
</pre> | ||
<figcaption> | ||
A role can also be copied, keeping its privileges. | ||
</figcaption> | ||
</figure> | ||
</section> | ||
<AdminOnSystemDb /> | ||
</> | ||
) | ||
export default { title, subtitle, category, content } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
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 = ( | ||
<> | ||
<p> | ||
The <code>DENY</code> command allows an administrator to deny a privilege | ||
to a role in order to prevent access to an entity. | ||
</p> | ||
<div className="links"> | ||
<div className="link"> | ||
<p className="title">Reference</p> | ||
<p className="content"> | ||
<ManualLink | ||
chapter="cypher-manual" | ||
page="/administration/security/subgraph/#administration-security-subgraph-introduction" | ||
minVersion="4.0.0" | ||
> | ||
Subgraph security | ||
</ManualLink>{' '} | ||
manual page | ||
<br /> | ||
<ManualLink | ||
chapter="cypher-manual" | ||
page="/administration/security/administration/#administration-security-administration-database-privileges" | ||
minVersion="4.0.0" | ||
> | ||
Database administration | ||
</ManualLink>{' '} | ||
manual page | ||
</p> | ||
</div> | ||
<div className="link"> | ||
<p className="title">Related</p> | ||
<p className="content"> | ||
<a help-topic="show-privileges">:help SHOW PRIVILEGES</a>{' '} | ||
<a help-topic="grant">:help GRANT</a>{' '} | ||
<a help-topic="revoke">:help REVOKE</a>{' '} | ||
<a help-topic="cypher">:help Cypher</a> | ||
</p> | ||
</div> | ||
</div> | ||
<section className="example"> | ||
<figure> | ||
<pre className="code runnable standalone-example"> | ||
DENY graph-privilege ON GRAPH dbname entity TO role | ||
</pre> | ||
<figcaption> | ||
Deny a subgraph privilege to a role (eg. write nodes/relationships). | ||
</figcaption> | ||
</figure> | ||
<figure> | ||
<pre className="code runnable standalone-example"> | ||
DENY database-privilege ON DATABASE dbname TO role | ||
</pre> | ||
<figcaption> | ||
Deny a database administrative privilege to a role (eg. create index | ||
or start/stop database). | ||
</figcaption> | ||
</figure> | ||
</section> | ||
<AdminOnSystemDb /> | ||
</> | ||
) | ||
export default { title, subtitle, category, content } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
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 = ( | ||
<> | ||
<p> | ||
The <code>DROP ROLE</code> command can be used to delete roles. | ||
</p> | ||
<div className="links"> | ||
<div className="link"> | ||
<p className="title">Reference</p> | ||
<p className="content"> | ||
<ManualLink | ||
chapter="cypher-manual" | ||
page="/administration/security/users-and-roles/#administration-security-roles-drop" | ||
minVersion="4.0.0" | ||
> | ||
DROP ROLE | ||
</ManualLink>{' '} | ||
manual page | ||
</p> | ||
</div> | ||
<div className="link"> | ||
<p className="title">Related</p> | ||
<p className="content"> | ||
<a help-topic="show-roles">:help SHOW ROLES</a>{' '} | ||
<a help-topic="create-role">:help CREATE ROLE</a>{' '} | ||
<a help-topic="grant-role">:help GRANT ROLE</a>{' '} | ||
<a help-topic="revoke-role">:help REVOKE ROLE</a>{' '} | ||
<a help-topic="cypher">:help Cypher</a> | ||
</p> | ||
</div> | ||
</div> | ||
<section className="example"> | ||
<figure> | ||
<pre className="code runnable standalone-example">DROP ROLE myrole</pre> | ||
</figure> | ||
</section> | ||
<AdminOnSystemDb /> | ||
</> | ||
) | ||
export default { title, subtitle, category, content } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.