A secure middleware that connects GraphXR to various backend databases with zero trust architecture.
- Zero Trust Security: Strict authentication and authorization at the proxy layer
- Direct Browser Connectivity: REST/GraphQL APIs for efficient data access
- Multi-Database Support: Spanner Graph, Neo4j, and more
- Open Source: Fully auditable and customizable
- Pure Python: Easy to deploy and maintain
git clone https://github.com/Kineviz/graphxr-database-proxy.git
cd graphxr-database-proxy
uv venv
uv pip install -r requirements.txt
npm run dev
- Web UI should open automatically in your browser. Or visit http://localhost:8080/.
- Click "Create New Project"
- Project Name: "Test"
- Database Type: "Google Cloud Spanner"
- Authentication Type: "Service Account"
- Upload the credential file you exported from GCP Console or gcloud CLI. Export Instructions
- Select "Instance ID" e.g. "demo"
- Select "Database ID" e.g. "cymbal"
- Select "Property Graph" e.g. "ECommerceGraph"
- Click "Create"
- For the new project, under Actions, copy the API URL. e.g. "http://localhost:8080/api/spanner/Test"
- Go back to GraphXR's Create Project wizard and paste the API URL into GraphXR for a project with a "Database Proxy" database type.
cp .env.example .env
Edit the .env file and add the following variables:
# Optional: Set a password for the admin interface
ADMIN_PASSWORD=your-admin-password-here
# Optional: Set a secure API key for the proxy API
# You can also generate an API key in the Web UI under Settings.
API_KEY=your-secure-api-key-here
# Install from PyPI
pip install graphxr-database-proxy[ui]
# Or from source
git clone https://github.com/Kineviz/graphxr-database-proxy.git
cd graphxr-database-proxy
uv venv
source .venv/bin/activate # or .venv/bin/activate on Windows
uv pip install -e ".[ui]"
uv pip install -r requirements.txt
cd frontend && npm install && npm run build && cd -
pip install -e .[ui]Option 1: Web UI (Recommended)
graphxr-proxy --uiOpen http://localhost:9080/admin for configuration
Option 2: Python Code with Service Account JSON
from graphxr_database_proxy import DatabaseProxy
proxy = DatabaseProxy()
service_account_json = {
"type": "service_account",
"project_id": "your-gcp-project-id",
"private_key": "-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n",
"client_email": "your-service-account@your-gcp-project-id.iam.gserviceaccount.com",
...
}
project_id = proxy.add_project(
project_name="project_name",
database_type="spanner",
project_id="gcp-project-id",
instance_id="spanner-instance-id",
database_id="spanner-database-id",
credentials=service_account_json,
graph_name="graph_name" # Optional
)
proxy.start(
host="0.0.0.0",
port=9080,
show_apis=True
)Option 3: Python Code with Google Cloud ADC
Your should have set up Google Application Default Credentials (ADC) on the machine running the proxy. See Google Cloud ADC Documentation.
from graphxr_database_proxy import DatabaseProxy
proxy = DatabaseProxy()
google_adc_credentials={
"type": "google_ADC"
},
project_id = proxy.add_project(
project_name="project_name",
database_type="spanner",
project_id="gcp-project-id",
instance_id="spanner-instance-id",
database_id="spanner-database-id",
credentials=google_adc_credentials,
graph_name="graph_name" # Optional
)
proxy.start(
host="0.0.0.0",
port=9080,
show_apis=True
)docker run -d -p 9080:9080 \
--name graphxr-database-proxy \
-v ${HOME}/graphxr-database-proxy/config:/app/config \
kineviz/graphxr-database-proxy:latestYou can visit http://localhost:9080/admin for configuration after starting the container.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- 🐛 Issue Tracker
- 📧 Email: support@kineviz.com
Built with ❤️ by Kineviz