You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@stigg/sidecar

Package Overview
Dependencies
Maintainers
0
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stigg/sidecar

Stigg sidecar

2.485.0
latest
npmnpm
Version published
Weekly downloads
22
-75.82%
Maintainers
0
Weekly downloads
 
Created
Source

Stigg Sidecar Service

What does Stigg Sidecar do?

Stigg Sidecar is a tiny service that runs alongside the main application, acting as a proxy between the host and the Stigg API, while ensuring low latency entitlement checks, handles caching and provides simplified access to real-time data.

The benefits of deploying the Sidecar:

  • Less CPU consumption and memory footprint for the host application when compared to embedding the SDK directly
  • Language neutral API via Protocol Buffers and gRPC
  • Support for in-memory cache or external cache (Redis) for entitlements and usage data
  • Scaled together with the main application, or independently if deployed as a standalone service
  • Synergy with persistent-cache-service if external cache is in use
  • Easy generation of SDK clients in multiple languages, backed by well-known RPC frameworks and tools

Architecture

Architecture

Prerequisites:

  • Docker
  • Redis instance, if redis cache is used

Usage:

Login to AWS ECR:

aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/stigg

Run the service:

docker run  --rm --name stigg-sidecar --memory=1gb --cpus="1" \
  --publish=8443:8443 --publish=8080:8080 \
  -e SERVER_API_KEY="<SERVER_API_KEY>" \
  public.ecr.aws/stigg/sidecar:latest

Configuration:

Environment VariableTypeDefaultDescription
SERVER_API_KEYString*Environment server API key
API_URLStringhttps://api.stigg.ioStigg API address URL
EDGE_ENABLEDBoolean1Edge API enabled
EDGE_API_URLStringhttps://edge.api.stigg.ioEdge API URL
WS_ENABLEDBoolean1Websocket enabled
WS_URLStringwss://api.stigg.ioWebsocket API URL
REDIS_ENVIRONMENT_PREFIXStringIdentifier of the environment. If provided, Redis cache will be used.
REDIS_HOSTStringlocalhostRedis host address
REDIS_PORTNumber6379Port of your redis
REDIS_DBNumber0DB identifier to use when writing to Redis
REDIS_USERNAMEStringRedis username
REDIS_PASSWORDStringRedis password
REDIS_KEYS_TTL_IN_SECSNumber7 * 24 * 60 * 60Time for entitlements to be cached,
in milliseconds
PORTNumber8443gRPC/Connect server port (HTTPS)
METRICS_PORTNumber8080Metrics and health endpoints port (HTTP)
ENTITLEMENTS_FALLBACKString``Fallback entitlements in a JSON string format.
HEALTH_ENDPOINT_URLStringlivezHealth endpoint URL
READY_ENDPOINT_URLStringreadyzReady endpoint URL
OFFLINEBooleanEnable offline mode for local development

*Required fields

Health and Metrics:

The service exposes health and metrics endpoints on HTTP server (default port 8080).

GET /livez

Returns 200 if the service is alive.

Healthy response: {"status":"UP"}

GET /readyz

Returns 200 if the service is ready.

Healthy response: { "status": "UP" }

GET /metrics

Returns Prometheus metrics in text format.

FAQs

Package last updated on 29 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts