j8a icon indicating copy to clipboard operation
j8a copied to clipboard

j8a [ dʒʌbbʌ ] is a modern TLS 1.3 reverse proxy server designed as a lightweight API gateway for REST APIs.

Circleci Builds Github Workflows Dependabot Github Issues Github Activity
Go Report Codeclimate Maintainability Codeclimate Test Coverage SSLLabs Rating Go Version License Docker Pulls Version

What's new?

v0.9.6 (01/08/2022)

  • allows go {{template}} variables in config file to substituate env vars.
  • new params for acmeEmail, gracePeriodDays to configure letsencrypt provider
  • new param for disableXRequestInfo to disable debug mode

v0.9.5 (16/06/2022)

  • now logging ulimit (max open files) so admin has visibility next to maxopenconns

v0.9.4 (14/06/2022)

  • changes to standard log levels. All server internal messages now at info, downstream at debug, upstream data at trace level.

What is j8a?

j8a [ dʒʌbbʌ ] is a modern TLS 1.3 reverse proxy server designed as a lightweight API gateway for micro-service style JSON APIs. It is built for DevOps engineers and allows fine-grained traceability of HTTP and Websocket traffic without sacrificing performance.

Features

  • Fast! 5k POST req/s traffic.
  • Secure. TLS1.2, TLS/1.3 termination w/ A+ SSLLabs rating.
  • Zero downtime. Auto-renew certs using ACME RFC 8555.
  • Observable. API request tracing w/ correlation ID for upstream micro-services.
  • APM. CPU, memory logging built-in. Daily TLS health and validity check for your full certificate chain.
  • JWT token validation with full JWK(S) support for RFC 7519.
  • HTTP/1.1 and HTTP/2 support w/ upstream <> downstream protocol translation.
  • Websocket Support for RFC 6455
  • Docker native

Up and running

Docker

docker pull simonmittag/j8a &&
  docker run -e J8ACFG_YML -p443:443 simonmittag/j8a

Homebrew

brew tap simonmittag/cli && 
  brew install j8a && 
  j8a

Golang

go install github.com/simonmittag/j8a/cmd/j8a &&
  j8a

Configuration

Environment Variables

J8ACFG_YML

Supply the server configuration to the running process in .yml format

J8ACFG_YML="---
            connection:
              downstream:
                readTimeoutSeconds: 3
                roundTripTimeoutSeconds: 20
                idleTimeoutSeconds: 30
                http:
                  port: 80
                maxBodyBytes: 65535
              upstream:
                socketTimeoutSeconds: 3
                readTimeoutSeconds: 30
                idleTimeoutSeconds: 10
                maxAttempts: 4
                poolSize: 8
                tlsInsecureSkipVerify: true
            routes:
              - path: "/todos"
                resource: jsonplaceholder
            resources:
              jsonplaceholder:
                - url:
                    scheme: https
                    host: jsonplaceholder.typicode.com
                    port: 443"

LOGLEVEL

Loglevel for stdout, one of TRACE, DEBUG, INFO or WARN

LOGLEVEL="DEBUG"

TZ

TimeZone

TZ="Australia/Sydney"

Contributions

The j8a team welcomes all contributors. Everyone interacting with the project's codebase, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct