Skip to content

Instantly share code, notes, and snippets.

@davidfauth
davidfauth / neo4j_fabric_aura.conf
Last active June 22, 2021 15:16
Neo4j 4.3.0 Fabric with Aura
#*****************************************************************
# Neo4j configuration
#
# For more details and a complete list of settings, please see
# https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/
#*****************************************************************
# The name of the default database.
#dbms.default_database=neo4j
@davidfauth
davidfauth / neo4j-wcc-example.cyp
Created December 1, 2020 14:02
Neo4j WCC Example
// Data was randomly generated data
// Create the Graph
CALL gds.graph.create(
'wcc-graph', {
Customer: { label: 'Customer' },
Email: { label: 'Email' },
Phone: { label: 'Phone' }
},
{
@davidfauth
davidfauth / neo4j_rbac_example.cql
Created October 12, 2020 15:58
neo4j_4.0_rbac_example
// RBAC Example
// Nodes -> Person / Phone / Email / Account
// Relationships -> :HAS_PHONE / :HAS_EMAIL / :HAS_ACCOUNT
// Roles -> Manager / ServiceRep / NoAccount
// Users -> John / Sally / George
// Code
:USE system
@davidfauth
davidfauth / docker-compose-4_0.yml
Created September 24, 2019 13:56
Docker 4.0.0 Compose.yml
version: '3'
networks:
lan:
services:
core1:
image: neo4j:4.0.0-alpha10-enterprise
networks:
version: '3'
services:
accenture:
image: neo4j:3.5.8-enterprise
ports:
- 7474:7474
- 7473:7473
@davidfauth
davidfauth / neo4j_4_docker_ssl
Created June 3, 2020 12:54
Neo4j 4.0.4_DockerCompose_SSL
version: '3'
networks:
lan:
services:
core1:
image: neo4j:4.0.4-enterprise
networks:
dbms.default_listen_address=0.0.0.0
dbms.default_advertised_address=xxx.xxx.xxx.xxx
# Bolt connector
dbms.connector.bolt.enabled=true
dbms.connector.bolt.tls_level=REQUIRED
dbms.connector.bolt.listen_address=:17687
dbms.connector.bolt.advertised_address=:17687
# HTTP Connector. There can be zero or one HTTP connectors.
import json
from py2neo import authenticate, Graph, NodeSelector, Node, Relationship
import sys
import time
from neo4j import GraphDatabase
def run_cypher_query(tx, query):
return tx.run(query)
### neo4jfourloadexample.py
### 22 April 2020
### David Fauth
### @davefauth
import os
import sys
import csv
from io import StringIO
@davidfauth
davidfauth / kafka_neo4j_ssl.adoc
Created October 14, 2019 12:58
Kafa Neo4j SSL Configuration

Overview:

This document, Neo4j Security with Kafka Streams, provides guidance to configure SSL security between Kafka and Neo4j. This will provide data encryption between Kafka and Neo4j.

This does not address ACL confguration inside of KAFKA.

Self Signed Certificates

This section came from https://medium.com/talking-tech-all-around/how-to-enable-and-verify-client-authentication-in-kafka-21e936e670e8
Make sure that you have truststore and keystore JKSs for each server.+ In case you want a self signed certificate, you can use the following commands:+