graviton.protocol.http

Members list

Type members

Classlikes

Bearer-token authentication middleware.

Bearer-token authentication middleware.

Extracts Authorization: Bearer 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

Source
AuthMiddleware.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait BlobIngest

One streaming ingest path shared by the public API and local operator UI.

One streaming ingest path shared by the public API and local operator UI.

Attributes

Companion
object
Source
BlobIngest.scala
Supertypes
class Object
trait Matchable
class Any
object BlobIngest

Attributes

Companion
trait
Source
BlobIngest.scala
Supertypes
class Object
trait Matchable
class Any
Self type
BlobIngest.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

Source
DevAuthRoutes.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object HttpApi

Attributes

Companion
class
Source
HttpApi.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
HttpApi.type
final case class HttpApi(blobStore: BlobStore, metrics: Option[MetricsHttpApi] = ..., security: Option[HttpSecurityPolicy] = ..., localizedUpload: Option[LocalityAwareUpload] = ..., resumableUploads: Option[ResumableUploadService] = ...)

Attributes

Companion
object
Source
HttpApi.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
HttpSecurityPolicy.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final class HttpSecurityPolicy(config: SecurityConfig, capabilities: CapabilityCheck, rateLimiter: RateLimiter, audit: AuditSink, trafficQuota: DistributedTrafficQuota, metrics: MetricsRegistry)

Enforces transport, origin, capability, rate, size, and audit policy.

Enforces transport, origin, capability, rate, size, and audit policy.

Attributes

Companion
object
Source
HttpSecurityPolicy.scala
Supertypes
class Object
trait Matchable
class Any

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

Source
InternalOnlyMiddleware.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class MetricsHttpApi(registry: MetricsRegistry, security: Option[HttpSecurityPolicy] = ...)

Attributes

Source
MetricsHttpApi.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class TenantHttpApi(provider: TenantStoreProvider, tenantContext: TenantContext, fallbackStore: BlobStore, metrics: Option[MetricsHttpApi] = ..., security: Option[HttpSecurityPolicy] = ..., localizedUpload: Option[LocalityAwareUpload] = ..., resumableUploads: Option[ResumableUploadService] = ...)

Selects a server-owned tenant store before a response body can escape the request handler. Download streams therefore retain a concrete tenant store without depending on a FiberRef after the handler has returned.

Selects a server-owned tenant store before a response body can escape the request handler. Download streams therefore retain a concrete tenant store without depending on a FiberRef after the handler has returned.

Attributes

Source
TenantHttpApi.scala
Supertypes
class Object
trait Matchable
class Any