Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: auth hook for local dev setup #121

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ services:
COLLECTOR_OTLP_ENABLED: "true"
COLLECTOR_ZIPKIN_HOST_PORT: "9411"

auth-hook:
build: ../v3-engine/hasura-authn-webhook/dev-auth-webhook
init: true
ports:
- 3050:3050

volumes:
prom_data:
grafana_data:
4 changes: 3 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ start-metrics:

# run the v3 engine binary, pointing it at our connector
run-engine: start-dependencies
docker compose up --wait auth-hook
@echo "http://localhost:3000/ for graphiql console"
@echo "http://localhost:4002/ for jaeger console"
# Run graphql-engine using static Chinook metadata
Expand All @@ -265,7 +266,8 @@ run-engine: start-dependencies
cargo run --release \
--manifest-path ../v3-engine/Cargo.toml \
--bin engine -- \
--metadata-path ./static/chinook-metadata.json
--metadata-path ./static/chinook-metadata.json \
--authn-config-path ./static/auth_config.json

# start a postgres docker image and connect to it using psql
repl-postgres:
Expand Down
12 changes: 12 additions & 0 deletions static/auth_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "v1",
"definition": {
"allowRoleEmulationBy": "admin",
"mode": {
"webhook": {
"url": "http://localhost:3050/validate-request",
"method": "Post"
}
}
}
}
Loading