Skip to content

Commit 23bee11

Browse files
committed
Add the models/hospital folder from manual-modeling
1 parent 5218ae2 commit 23bee11

18 files changed

+1916
-0
lines changed

models/hospital/README.txt

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
Hospital Database With Security
2+
===============================
3+
4+
This model is for an example hospital database with fine-grained sub-graph
5+
security used to control access to parts of the data based on roles and
6+
privileges.
7+
8+
This forms the background data model for the documentation found at
9+
https://neo4j.com/docs/operations-manual/5/authentication-authorization/
10+
11+
Cypher Scripts
12+
--------------
13+
14+
There are two main types of scripts, those running against `system` used to
15+
setup the users, roles and security privileges, and those running against
16+
the `healthcare` database for setting up the data model itself. These
17+
scripts do not include the queries used by the different users to query the
18+
database. See the docs at
19+
https://neo4j.com/docs/operations-manual/current/authentication-authorization/
20+
for example queries.
21+
22+
Run as `neo4j` against the `system` database:
23+
24+
* setup_healthcare.cypher
25+
* setup_healthcare_privileges.cypher
26+
27+
Run as `neo4j` against the `healthcare` database:
28+
29+
* make_healthcare.cypher
30+
* make_healthcare_meta.cypher
31+
32+
The easiest way to run all scripts is to run the two shell scripts:
33+
34+
* ./setup_healthcare.sh
35+
* ./run_roles.sh
36+
37+
The first will run all the setup and make scripts on the system and
38+
healthcare database to create a complete working model with users, roles and
39+
privileges in the system database, and patients, diseases and symptoms in
40+
the healthcare database.
41+
42+
The second script will run through a set of roles, and for each use a
43+
pre-defined user, grant it the role, find a file named
44+
healthcare_queries_$role.cypher and as that user it will run all commands in
45+
that file against the healthcare database. This allows you to test
46+
everything required in the above mentioned chapter and copy and paste all
47+
query results directly into the chapter contents.
48+
49+
Setting up Neo4j
50+
----------------
51+
52+
Note that the above script assume that the Neo4j server has been configured
53+
to run on non startard ports so that it does not conflict with the documentation build itself.
54+
In particular the bolt port is 7688.
55+
See the contents of the file healthcare_config.sh for the settings, and change any
56+
that you feel are more appropriate to your server configuration (or change your server to match
57+
this configurations).
58+

0 commit comments

Comments
 (0)