Gyoji is a transparent HTTP(S) proxy that rewrites Sumo Logic Universal Collector requests on the fly so they can satisfy strict third-party API contracts (Check Point, Microsoft Graph, etc.). It injects authentication headers, reshapes payloads, and optionally auto-fetches logs after an authentication flow completes.
- Terminates TLS through Fluxzy and rewrites both request and response bodies in-flight (optionally via BouncyCastle).
- Normalizes Check Point CloudGuard OAuth calls and converts token responses into Sumo-friendly envelopes.
- Exchanges Microsoft Graph client credentials without exposing secrets inside collectors.
- Auto-fetches logs immediately after successful Check Point authentication, reducing the number of round-trips Sumo must issue.
- Emits structured JSON logs (
ProxyLogger) so you can ingest telemetry into any SIEM or log aggregator.
Sumo Logic Collector ──► HTTPS Proxy (Gyoji) ──► Check Point Auth / Logs
│
└──► Microsoft Graph Token Endpoint
- Sumo Logic is configured to egress via the Gyoji HTTP proxy.
- Fluxzy inspects every outbound exchange; hosts that match Check Point or Microsoft Graph are rewritten.
- Requests/responses that are not recognized are forwarded untouched.
- .NET 8.0 SDK (for local builds) or ASP.NET Core runtime if you only run published bits.
- Network egress from the proxy host to Check Point and Microsoft Graph endpoints.
- TLS certificates that the collector trusts (Gyoji uses system trust; install corporate roots if needed).
- Clone and restore dependencies:
git clone <repo-url> cd gyoji dotnet restore src/gyoji_proxy/gyoji_proxy.csproj
- Export the required environment variables (see the table below) or copy
.env.sampleinto place if you maintain one. - Run the proxy:
dotnet run --project src/gyoji_proxy/gyoji_proxy.csproj
- Point the Sumo Logic Universal Collector at the proxy by setting
httpProxyHost/httpProxyPort(or the equivalent UI fields) so that calls destined for Check Point or Microsoft Graph traverselisten_address:listen_port. - Watch the structured logs for
gyoji_listeningandcheckpoint_*events to confirm the listener is healthy.
Use curl with the proxy flag to verify the rewrite logic before involving a collector:
curl -x http://127.0.0.1:44344 \
https://cloudinfra-gw.portal.checkpoint.com/auth/external \
-d "client_id=<id>&client_secret=<secret>&auto_fetch_logs=true"You should see a JSON body with access_token in the response.
| Variable | Description | Default |
|---|---|---|
GYOJI_LISTEN_ADDRESS |
Interface to bind the proxy listener to. Use 0.0.0.0 to accept remote collectors. |
0.0.0.0 |
GYOJI_LISTEN_PORT |
TCP port for the Fluxzy listener. Ensure firewalls/security groups allow inbound traffic. | 44344 |
GYOJI_CHECKPOINT_AUTH_URL |
Target Check Point auth endpoint that receives rewritten OAuth payloads. | https://cloudinfra-gw.portal.checkpoint.com/auth/external |
GYOJI_CHECKPOINT_LOG_URL |
Target Check Point log endpoint used for manual or auto-fetch requests. | https://cloudinfra-gw-us.portal.checkpoint.com/app/hec-api/v1.0/search/query |
GYOJI_GRAPH_TOKEN_URL |
Microsoft identity endpoint for client credential grants. | https://login.microsoftonline.com/.../oauth2/token |
GYOJI_AUTO_FETCH_LOGS |
Enables follow-up log pulls after successful auth responses. Collectors can still override per request via auto_fetch_logs flags. |
true |
GYOJI_VERBOSE |
Turns on verbose Fluxzy traces for debugging. Disable in production. | false |
GYOJI_USE_BOUNCY_CASTLE |
Forces Fluxzy to use the BouncyCastle TLS engine (useful for modern cipher suites in locked-down environments). | false |
GYOJI_UPSTREAM_TIMEOUT_SECONDS |
Timeout for outbound auto-fetch HTTP calls (5–240 seconds). | 30 |
Store secrets (client IDs/keys) in the collector configuration or a secrets manager, not inside the proxy host.
- The Function App consumes the strongly-typed
Gyoji:Proxy:*settings (e.g.,Gyoji:Proxy:CheckpointAuthUri). Any legacyGYOJI_*variables are still honored but should be phased out. config/azure_app_settings.mapping.jsonenumerates every legacy → modern key mapping so you can scriptaz functionapp config appsettings setwithout guesswork.- For local development, mirror these keys inside
src/Gyoji.Proxy.Function/local.settings.json(the sample file already shows the required structure). - To source secrets from Azure Key Vault, set
Gyoji:KeyVault:Uri(orKEYVAULT_URI) and grant the Function's managed identity access to the vault. Optional overrides:Gyoji:ManagedIdentity:ClientId/MANAGED_IDENTITY_CLIENT_IDGyoji:ManagedIdentity:TenantId/MANAGED_IDENTITY_TENANT_ID
- The host automatically layers Key Vault secrets on top of environment settings, so sensitive values (client secrets, API tokens) never reside in
local.settings.jsonor App Settings.
- Collector issues a form-encoded request (
client_id,client_secret, optionalauto_fetch_logs) through the proxy. CheckpointFlow.TransformAuthRequestrewrites it into JSON (clientId,accessKey), strips sensitive query/body keys, and records the sanitized parameters inFlowStateStore.CheckpointFlow.TransformAuthResponseAsyncnormalizes the upstream response so the collector receives a standard OAuth envelope.
If both the collector and proxy enable auto-fetching, CheckpointFlow immediately calls GYOJI_CHECKPOINT_LOG_URL with the newly minted access_token, merges any stored query/body parameters, injects x-av-req-id when csrf was present, and returns the log data as the response body. Timeouts are governed by GYOJI_UPSTREAM_TIMEOUT_SECONDS.
Requests that target GYOJI_GRAPH_TOKEN_URL are recast with the appropriate Content-Type, grant type, scope, and resource defaults (https://graph.microsoft.com/.default). The collector’s secrets never leave the proxy host outside of the proxied call.
- HTTP Source: Add or edit your Check Point or Microsoft Graph source and configure its “Proxy” settings to point to
listen_address:listen_port. Gyoji only rewrites hosts that match the configured URIs, so other collector traffic passes through transparently. - Certificate trust: Ensure the collector trusts the root CA used by the proxy (for outbound MITM) if you use custom certificates.
- Per-source options: Include
auto_fetch_logs=true(snake or camel case) in the source request body to request immediate log retrieval after auth.
- Systemd: Wrap
dotnet /path/to/gyoji_proxy.dllinside a service and setEnvironment=entries for eachGYOJI_*variable. - Containers: Publish with
dotnet publish -c Releaseand bake the output into a minimal distroless or Alpine image. Exposelisten_portand pass configuration as env vars. - Scaling: Gyoji is stateful only for the lifetime of an exchange (stored in-memory). Run a single instance per collector cluster or front it with a TCP load balancer that provides session affinity if you must scale horizontally.
- Logs are JSON with
timestamp,level,eventName, and adatapayload. They are emitted to stdout/stderr, making them easy to ship via Fluent Bit, CloudWatch agents, etc. - Notable events:
gyoji_starting,gyoji_listening,checkpoint_auth_request_rewritten,checkpoint_auto_fetch_failed,microsoft_graph_request_transformed. - Pair the proxy with a process supervisor that restarts on non-zero exits and scrape metrics (e.g., number of open sockets) via your platform tooling.
- Proxy never binds: Verify the port is free and you have permission to bind the requested address. Look for
SocketExceptiondetails in the logs. - Collector still sees
client_secreterrors: Confirm traffic is actually egressing via Gyoji (tcpdump orcurl -x). The proxy only rewrites hosts that exactly match the configured URIs. - Auto-fetch silent failures: Increase
GYOJI_UPSTREAM_TIMEOUT_SECONDSand inspectcheckpoint_auto_fetch_failedlogs for upstream HTTP status codes. - TLS handshake problems: Enable
GYOJI_USE_BOUNCY_CASTLE=truefor newer cipher coverage, or update the system’s OpenSSL/Schannel stack.
With these steps you can test, operate, and extend Gyoji confidently in front of Sumo Logic collectors.