-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1_build_dir_structure_certs.sh
More file actions
42 lines (35 loc) · 1.44 KB
/
1_build_dir_structure_certs.sh
File metadata and controls
42 lines (35 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# create directory structure in project folder
mkdir -p neo4j/{certificates/{bolt,https},conf,data,import,logs,metrics}
mkdir -p privatemode/certs
mkdir -p mcp/certs
# Uncomment the chmod command if you have no neo4j user created (neo4j user is preferred)
# Change neo4j directory permssions (less secure)
#chmod -R 777 ./neo4j/
# For bolt
openssl req -newkey rsa:4096 -nodes -keyout neo4j/certificates/bolt/private.key \
-x509 -days 365 -out neo4j/certificates/bolt/public.crt \
-subj "/CN=localhost/O=edgelessNeo/C=DE"
# For https
openssl req -newkey rsa:4096 -nodes -keyout neo4j/certificates/https/private.key \
-x509 -days 365 -out neo4j/certificates/https/public.crt \
-subj "/CN=localhost/O=edgelessNeo/C=DE"
# Generate private key and certificate for Privatemode proxy
openssl req -newkey rsa:4096 -nodes \
-keyout privatemode/certs/localhost-key.pem \
-x509 -days 365 \
-out privatemode/certs/localhost-cert.pem \
-subj "/CN=localhost/O=edgelessNeo/C=DE"
# Generate private key and certificate for Neo4j MCP Server
openssl req -newkey rsa:4096 -nodes \
-keyout mcp/certs/server.key \
-x509 -days 365 \
-out mcp/certs/server.crt \
-subj "/CN=localhost/O=edgelessNeo/C=DE"
# Change neo4j permssions
chmod -R 777 ./neo4j/
# Change permissions accordingly
chmod 600 neo4j/certificates/*/private.key
chmod 644 neo4j/certificates/*/public.crt
chmod 600 privatemode/certs/*.pem
chmod 600 mcp/certs/server.key
chmod 644 mcp/certs/server.crt