|  | 
| 1 | 1 | [role=enterprise-edition] | 
| 2 | 2 | [[auth-access-control]] | 
| 3 | 3 | = Fine-grained access control | 
| 4 |  | -:description: Describes an example that illustrates various aspects of security and fine-grained access control.  | 
|  | 4 | +:description: Describes an example that illustrates various aspects of security and fine-grained access control. | 
| 5 | 5 | 
 | 
| 6 | 6 | When creating a database, administrators may want to establish which users have the ability to access certain information. | 
| 7 | 7 | 
 | 
| 8 |  | -As described in xref:authentication-authorization/built-in-roles/auth-built-in-roles[Built-in roles], Neo4j already offers preset roles configured to specific permissions (i.e. read, edit, or write).  | 
|  | 8 | +As described in xref:authentication-authorization/built-in-roles.adoc[Built-in roles], Neo4j already offers preset roles configured to specific permissions (i.e. read, edit, or write). | 
| 9 | 9 | While these built-in roles cover many common daily scenarios, it is also possible to create custom roles for specific needs. | 
| 10 | 10 | 
 | 
| 11 | 11 | This page contains an example that illustrates various aspects of security and fine-grained access control. | 
| @@ -35,7 +35,7 @@ They can be described using the properties: | 
| 35 | 35 | * `description` | 
| 36 | 36 | 
 | 
| 37 | 37 | `(:Disease)`:: | 
| 38 |  | -Known illnesses mapped in a catalog found in the database.  | 
|  | 38 | +Known illnesses mapped in a catalog found in the database. | 
| 39 | 39 | They can be described using the properties: | 
| 40 | 40 | + | 
| 41 | 41 | * `name` | 
| @@ -85,7 +85,7 @@ This allows users to be created entirely within the database security model, a s | 
| 85 | 85 | For more information, see link:{neo4j-docs-base-uri}/cypher-manual/{page-version}/administration/access-control/[Cypher Manual -> Access control]. | 
| 86 | 86 | 
 | 
| 87 | 87 | The following examples show two different approaches to using Neo4j security features to support the _healthcare_ database application. | 
| 88 |  | -The first approach uses xref:authentication-authorization/built-in-roles/auth-built-in-roles[Built-in roles], whereas the second uses more advanced resources with fine-grained privileges for <<auth-access-control-using-privileges, sub-graph access control>>. | 
|  | 88 | +The first approach uses xref:authentication-authorization/built-in-roles.adoc[Built-in roles], whereas the second uses more advanced resources with fine-grained privileges for <<auth-access-control-using-privileges, sub-graph access control>>. | 
| 89 | 89 | 
 | 
| 90 | 90 | In this example, consider five users of the _healthcare_ database: | 
| 91 | 91 | 
 | 
| @@ -122,13 +122,13 @@ Neo4j comes with built-in roles that cover a number of common needs: | 
| 122 | 122 | * `architect` - Has all the capabilities of the publisher as well as the ability to manage indexes and constraints. | 
| 123 | 123 | * `admin` - Can perform architect actions as well as manage databases, users, roles, and privileges. | 
| 124 | 124 | 
 | 
| 125 |  | -Consider Charlie from the example of users.  | 
|  | 125 | +Consider Charlie from the example of users. | 
| 126 | 126 | As a researcher, they do not need write access to the database, so they are assigned the `reader` role. | 
| 127 | 127 | 
 | 
| 128 |  | -On the other hand, Alice (the doctor), Daniel (the nurse), and Bob (the receptionist) all need to update the database with new patient information, but do not need to expand the schema with new labels, relationship types, property names or indexes.  | 
|  | 128 | +On the other hand, Alice (the doctor), Daniel (the nurse), and Bob (the receptionist) all need to update the database with new patient information, but do not need to expand the schema with new labels, relationship types, property names or indexes. | 
| 129 | 129 | For this reason, they are all assigned the `editor` role. | 
| 130 | 130 | 
 | 
| 131 |  | -Tina, the IT administrator who installs and manages the database, needs to be assigned the `admin` role.  | 
|  | 131 | +Tina, the IT administrator who installs and manages the database, needs to be assigned the `admin` role. | 
| 132 | 132 | 
 | 
| 133 | 133 | Here is how to grant roles to the users: | 
| 134 | 134 | 
 | 
| @@ -171,11 +171,11 @@ Has the permission to save _diagnoses_ to the database, but not expand the schem | 
| 171 | 171 | Receptionist:: | 
| 172 | 172 | Should be able to read and write all patient data, but not be able to see the symptoms, diseases, or diagnoses. | 
| 173 | 173 | Researcher:: | 
| 174 |  | -Should be able to perform statistical analysis of all data, except patients’ personal information, to which they should have restricted access.  | 
|  | 174 | +Should be able to perform statistical analysis of all data, except patients’ personal information, to which they should have restricted access. | 
| 175 | 175 | To illustrate two different ways of setting up the same effective privileges, two roles are created for comparison. | 
| 176 | 176 | Nurse:: | 
| 177 | 177 | Should be able to perform all tasks that both the doctor and the receptionist can do. | 
| 178 |  | -Granting both roles (doctor and receptionist) to the nurse does not work as expected.  | 
|  | 178 | +Granting both roles (doctor and receptionist) to the nurse does not work as expected. | 
| 179 | 179 | This is explained in the section dedicated to the creation of the `nurse` role. | 
| 180 | 180 | Junior nurse:: | 
| 181 | 181 | While the senior nurse is able to save diagnoses just as a doctor can, some (junior) nurses might not be allowed to do that. | 
| @@ -679,7 +679,7 @@ RETURN n.name, n.ssn, n.address, n.dateOfBirth; | 
| 679 | 679 | 
 | 
| 680 | 680 | [[detach-delete-restricted-user]] | 
| 681 | 681 | 
 | 
| 682 |  | -With the `receptionist` role, Bob can delete any new patient nodes they have just created, but they are not able to delete patients that have already received diagnoses since those are connected to parts of the graph that Bob cannot see.  | 
|  | 682 | +With the `receptionist` role, Bob can delete any new patient nodes they have just created, but they are not able to delete patients that have already received diagnoses since those are connected to parts of the graph that Bob cannot see. | 
| 683 | 683 | Here is a demonstration of both scenarios: | 
| 684 | 684 | 
 | 
| 685 | 685 | [source, cypher] | 
|  | 
0 commit comments