-
Notifications
You must be signed in to change notification settings - Fork 2
feat: self-contained identity webhook + collector price oracle and metering fixes #36
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b029da6
docs: update README and configuration for OpenMeter collector
eliteprox 01b36c0
fix: correct default interval for price refresh in collector configur…
eliteprox f353984
feat(identity-webhook): API-key identity webhook for remote signer
eliteprox 9f088b0
Merge feat/collector-improvements into feat/identity-webhook
eliteprox 270199c
fix(collector): preserve message body in eth_usd price branch
eliteprox 42e0221
fix(collector): emit billable_usd_micros to satisfy the billable meter
eliteprox ade5256
fix(collector): emit compound subject so usage attributes to the cust…
eliteprox a28f8c5
feat(identity-webhook): self-contained jose webhook (API key + OIDC) …
eliteprox 7438665
refactor(identity-webhook): remove healthcheck from Dockerfile
eliteprox e4985f6
feat: consolidate environment variable management by introducing a si…
eliteprox a2f503c
docs: update README and configuration for remote signer and Docker Co…
eliteprox d0829e2
remove health check for identity webhook to allow running without it
eliteprox bbd6075
fix(collector): fail on negative price oracle values
eliteprox 576672f
docs: enhance README with detailed identity contract explanation
eliteprox e47c273
chore(readme): clarify identity-webhook not required for test
eliteprox 6774662
refactor(identity-webhook): streamline end-user verification process
eliteprox a7f9f31
refactor(openmeter): update environment variable usage and configuration
eliteprox 295b29a
fix(collector): remove empty interval from price warm generation
eliteprox a99a556
feat(identity-webhook): implement payload size limit and improve erro…
eliteprox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # Clearinghouse stack — copy to .env before starting. | ||
| # | ||
| # cp .env.example .env | ||
| # $EDITOR .env | ||
| # | ||
| # Sections list which Compose service reads each variable. Unused vars in a container are ignored. | ||
|
|
||
| # --- Shared (identity-webhook + remote-signer) --- | ||
| # Local dev only — change before any shared or production use. | ||
| WEBHOOK_SECRET=dev-webhook-secret-change-me | ||
|
|
||
| # --- Shared (remote-signer + openmeter-collector) --- | ||
| KAFKA_BROKERS=kafka:9092 | ||
| KAFKA_GATEWAY_TOPIC=livepeer-gateway-events | ||
|
|
||
| # --- identity-webhook --- | ||
| IDENTITY_ISSUER=http://identity-webhook:8090 | ||
| # Demo API key — must match the Bearer token end users send to remote-signer. | ||
| DEMO_API_KEY=sk_demo_local_key | ||
| DEMO_CLIENT_ID=demo-client | ||
| DEMO_USER_ID=demo-user | ||
|
|
||
| # Optional | ||
| USAGE_SUBJECT_TYPE=api_key_user | ||
| # API_KEY_PREFIX=sk_ | ||
| # DEMO_API_KEYS={"sk_other":{"clientId":"app-b","userId":"user-b"}} | ||
|
|
||
| # OAuth / OIDC — set OIDC_ISSUER to enable JWT auth (tried before sk_ keys). | ||
| # Clearinghouse / Auth0 signer JWTs (M2M mint or Builder API exchange): | ||
| # OIDC_ISSUER=https://pymthouse.us.auth0.com/ | ||
| # OIDC_AUDIENCE=livepeer-clearinghouse | ||
| # OIDC_CLIENT_CLAIM=app_client_id | ||
| # OIDC_SUBJECT_CLAIM=external_user_id | ||
| # OIDC_SUBJECT_TYPE=external_user_id | ||
| # OIDC_REQUIRED_SCOPES=sign:job | ||
| # | ||
| # Generic OIDC (raw IdP access tokens with azp/sub): | ||
| # OIDC_ISSUER=https://your-tenant.auth0.com/ | ||
| # OIDC_AUDIENCE=https://api.your-platform.com | ||
| # OIDC_JWKS_URI= # defaults to ${OIDC_ISSUER}/.well-known/jwks.json | ||
| # OIDC_CLIENT_CLAIM=azp | ||
| # OIDC_SUBJECT_CLAIM=sub | ||
| # OIDC_SUBJECT_TYPE=oidc_user | ||
| # OIDC_REQUIRED_SCOPES= | ||
|
|
||
| # Reference only — not read by Compose services; for minting test JWTs. | ||
| # Canonical copy: auth0-provisioner/provision/.env.livepeer | ||
| # DEMO_APP_AUTH0_AUDIENCE=livepeer-clearinghouse | ||
| # DEMO_APP_AUTH0_PUBLIC_CLIENT_ID= | ||
| # DEMO_APP_AUTH0_M2M_CLIENT_ID= | ||
| # DEMO_APP_AUTH0_M2M_CLIENT_SECRET= | ||
|
|
||
| # --- kafka (Redpanda) --- | ||
| KAFKA_ADVERTISED_ADDR=kafka:9092 | ||
|
|
||
| # --- remote-signer --- | ||
| # Leave REMOTE_SIGNER_WEBHOOK_URL empty to skip auth (dev only; loopback-only in Compose). | ||
| # To expose the signer on all host interfaces, use a Compose override — see README. | ||
| REMOTE_SIGNER_WEBHOOK_URL=http://identity-webhook:8090/authorize | ||
| SIGNER_NETWORK=arbitrum-one-mainnet | ||
| SIGNER_PORT=8081 | ||
| ETH_RPC_URL=https://arb1.arbitrum.io/rpc | ||
| SIGNER_ETH_ADDR= | ||
| SIGNER_ETH_KEYSTORE_PATH=/data/keystore | ||
|
|
||
| # Optional — host keystore/password under remote-signer/data/ (mounted at /data). | ||
| # SIGNER_ETH_KEYSTORE_PATH defaults to /data/keystore when that directory exists. | ||
| # ORCH_WEBHOOK_URL and LIVE_AI_CAP_REPORT_INTERVAL apply when SIGNER_REMOTE_DISCOVERY=1. | ||
| SIGNER_REMOTE_DISCOVERY=0 | ||
| # ORCH_WEBHOOK_URL= | ||
| # LIVE_AI_CAP_REPORT_INTERVAL= | ||
|
|
||
| # --- openmeter-collector --- | ||
| # Konnect: https://<region>.api.konghq.com/v3/openmeter/events | ||
| # Self-hosted: https://<host>/api/v1/events | ||
| OPENMETER_INGEST_URL=https://us.api.konghq.com/v3/openmeter/events | ||
| OPENMETER_API_KEY= | ||
|
|
||
| # Optional (collector defaults shown) | ||
| PRICE_ORACLE_URL=https://api.coinbase.com/v2/prices/ETH-USD/spot | ||
| PRICE_ORACLE_REFRESH=5m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| kafka/.env | ||
| remote-signer/.env | ||
| openmeter-collector/.env | ||
| .env | ||
| remote-signer/data/ | ||
| node_modules/ | ||
|
|
||
| # Editor / OS | ||
| .vscode/ | ||
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| FROM node:22-alpine | ||
|
|
||
| RUN apk add --no-cache curl | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY identity-webhook/package.json identity-webhook/package-lock.json ./ | ||
| RUN npm ci --omit=dev | ||
|
|
||
| COPY identity-webhook/keys.mjs identity-webhook/protocol.mjs identity-webhook/verifiers.mjs identity-webhook/server.mjs ./ | ||
|
|
||
| ENV PORT=8090 | ||
|
|
||
| EXPOSE 8090 | ||
|
|
||
| CMD ["node", "server.mjs"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.