-
Notifications
You must be signed in to change notification settings - Fork 351
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
Add help cards for security commands #1027
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume there isnt a specific
DENY
section?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see there are a few others like this too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct.
GRANT
,DENY
, andREVOKE
are together in two different sections. One for DB administration (limiting access to specific databases), and the other one for subgraph administration (limiting what kind of queries a role can do).