HUB
Sign inSign up
gateway logo

netgrif/gateway

By netgrif

•Updated 6 days ago

API gateway for the NETGRIF Application Engine: HTTP/gRPC routing, nodes, Redis.

Image
Networking
API management
Web servers
0

277

netgrif/gateway repository overview

⁠NETGRIF Cloud Gateway

API gateway for the NETGRIF Application Engine (NAE). It routes HTTP and gRPC traffic to engine instances, keeps track of nodes and the processes they host, and centralizes routing rules, authentication and observability for a NETGRIF deployment.

⁠Features

  • HTTP + gRPC routing — Spring Cloud Gateway (WebFlux) in front of NAE nodes.
  • Dynamic routes — rules loaded from a JSON file (routes.json): path, methods, order, target URI, headers and body predicates.
  • Process-aware routing — resolves the target node from the workflow/process referenced in the request (/api/workflow, /api/task, /api/petrinet, /api/uri, ...).
  • Node registry — registers itself with the NETGRIF admin node over gRPC and keeps node/process state up to date.
  • Redis-backed sessions and shared state — standalone, TLS or Sentinel.
  • Auth handlers — login verification, authorization token exchange, LDAP, MFA, impersonation and public endpoints.
  • Management API — endpoints under /manage for health, metrics, Prometheus, loggers, logs, beans, env and more.
  • Observability — OpenTelemetry traces and metrics (disabled by default).
  • Plugins — optional module loading from /opt/netgrif/gateway/modules.
  • Hardened runtime — Java 21 JRE, runs as non-root (UID/GID 10001), SIGTERM shutdown.

⁠Quick start

A Redis instance and a reachable NETGRIF admin node are required. The REST port advertised to the admin node (NETGRIF_GATEWAY_NODE_REST_PORT) must be reachable from the admin, so map the container's HTTP port accordingly.

docker run -d --name netgrif-gateway \
  -p 8800:8080 \
  -p 9900:9900 \
  -e NETGRIF_GATEWAY_NODE_HOST=gateway.example.com \
  -e NETGRIF_GATEWAY_NODE_REST_PORT=8800 \
  -e NETGRIF_GATEWAY_DATA_REDIS_HOST=redis \
  -e NETGRIF_GATEWAY_NODE_ADMIN_NODE_GRPC_HOST=admin \
  -e NETGRIF_GATEWAY_NODE_ADMIN_NODE_HTTP_HOST=admin \
  netgrif/netgrif-gateway:latest

⁠Ports

PortProtocolPurpose
8080HTTPGateway REST API (Spring Boot server)
9900gRPCGateway gRPC server
8800HTTPDefault REST port advertised to the admin node

⁠Configuration

All settings use Spring Boot relaxed binding. The most common environment variables:

VariableDefaultDescription
NETGRIF_GATEWAY_NODE_NAMENetgrif GatewayNode name shown in the admin
NETGRIF_GATEWAY_NODE_ZONEdefaultZone used by routing
NETGRIF_GATEWAY_NODE_PROTOCOLhttpProtocol advertised for this node
NETGRIF_GATEWAY_NODE_HOSTlocalhostHostname/IP advertised to the admin node
NETGRIF_GATEWAY_NODE_REST_PORT8800REST port advertised to the admin node
NETGRIF_GATEWAY_NODE_GRPC_PORT9900gRPC server port
NETGRIF_GATEWAY_NODE_ADMIN_NODE_GRPC_HOSTlocalhostAdmin node gRPC host
NETGRIF_GATEWAY_NODE_ADMIN_NODE_GRPC_PORT9999Admin node gRPC port
NETGRIF_GATEWAY_NODE_ADMIN_NODE_HTTP_HOSTlocalhostAdmin node HTTP host
NETGRIF_GATEWAY_NODE_ADMIN_NODE_HTTP_PORT8888Admin node HTTP port
NETGRIF_GATEWAY_DATA_REDIS_HOSTlocalhostRedis host
NETGRIF_GATEWAY_DATA_REDIS_PORT6379Redis port
NETGRIF_GATEWAY_DATA_REDIS_USERNAME—Redis username
NETGRIF_GATEWAY_DATA_REDIS_PASSWORD—Redis password
NETGRIF_GATEWAY_DATA_REDIS_SSLfalseUse TLS for Redis
NETGRIF_GATEWAY_DATA_REDIS_SESSION_NAMESPACEnetgrifRedis session namespace
NETGRIF_GATEWAY_ROUTING_ROUTES_FILEroutes.jsonPath to the routing rules file
NETGRIF_GATEWAY_ROUTING_MAX_REQUEST_BODY_SIZE50MBMax buffered request body
SPRING_PROFILES_ACTIVE—private, public, admin
OTEL_SDK_DISABLEDtrueEnable OpenTelemetry export
OTEL_EXPORTERhttp://localhost:4317OTLP collector endpoint

Redis Sentinel: NETGRIF_GATEWAY_DATA_REDIS_SENTINEL_MASTER and NETGRIF_GATEWAY_DATA_REDIS_SENTINEL_NODES (host:port,host:port).

⁠Volumes

PathPurpose
/opt/netgrif/gateway/modulesPlugin/module JARs (modules/libs for libraries)
/opt/netgrif/gateway/storageLocal persistent storage
/opt/netgrif/gateway/logLog files (gateway.log)

⁠Health and management

  • Liveness/readiness: GET /manage/health/liveness, GET /manage/health/readiness
  • Health: GET /manage/health
  • Prometheus metrics: GET /manage/metric
curl -fsS http://localhost:8800/manage/health

⁠License

NETGRIF Community License 2.0: free for development, testing, evaluation, education, and other non-production use. Production use requires a commercial license from NETGRIF, s.r.o. See netgrif.com/license⁠.

Tag summary
Recent tags
Content type
Image
Digest
sha256:b92c72e7b…
Size
201.7 MB
Last updated
6 days ago
docker pull netgrif/gateway:1.1.1