graviton.protocol.http

Members list

Type members

Classlikes

Bearer-token authentication middleware.

Bearer-token authentication middleware.

Extracts Authorization: Bearer <jwt> from the request, delegates to the configured JwtVerifier, and installs the resulting CallerContext on the fiber for the lifetime of the handler. Every downstream resource check, DB read, and audit event sees the same identity.

The middleware is a plain handler combinator — no dependency on HttpAppMiddleware — so it can be composed into both the HttpApi.routes pipeline and the legacy internal pipeline without bringing in the full middleware stack from zio-http.

Routes that should stay open (e.g. /api/health) should not be wrapped.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object DevAuthRoutes

Development-only token mint endpoint. Active only when a dev shared secret has been configured via GRAVITON_SECURITY_DEV_SHARED_SECRET.

Development-only token mint endpoint. Active only when a dev shared secret has been configured via GRAVITON_SECURITY_DEV_SHARED_SECRET.

Never mount this endpoint in production. It exists so an operator or a developer can mint an HS256 JWT locally — no external IdP required — and immediately curl the protected HTTP routes. For production, configure an OIDC issuer and an RS256 verifier instead.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final case class HttpApi(blobStore: BlobStore, dashboard: DatalakeDashboardService, metrics: Option[MetricsHttpApi] = ...)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class InternalHttpApi(token: String, legacyRepo: LegacyRepoHttpApi)

Internal-only HTTP surface.

Internal-only HTTP surface.

Rules:

  • Runs on a separate listener/port.
  • Guarded by an explicit internal token (or mTLS in production).
  • Default off in deployment wiring.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Minimal "internal-only" guardrail:

Minimal "internal-only" guardrail:

  • not meant for public clients
  • token check is explicit and easy to wire behind a separate listener

Prefer mTLS in real deployments; this is the v1 minimum for avoiding accidental exposure.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object JsonCodecs

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
JsonCodecs.type
final case class LegacyRepoHttpApi(repos: LegacyRepos, catalog: LegacyCatalog, fs: LegacyFs, metrics: Option[MetricsRegistry] = ...)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class MetricsHttpApi(registry: MetricsRegistry)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class UploadNodeHttpClient

High level HTTP client for talking to upload nodes.

High level HTTP client for talking to upload nodes.

The client wraps the multipart lifecycle exposed by the node and provides helpers for single-shot uploads backed by streamed request bodies. All methods are effectful and express failures as UploadNodeHttpClient.Error to keep transport concerns separate from application failures.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class UploadResponse(key: String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all