authorization

command
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command authorization is the deployable Lambda entrypoint for the htsget-rs authorization callout interface of the Authorization Service.

It is wiring only: it reads configuration from the environment, constructs a DynamoDB client from the Lambda execution role, and delegates to the existing auth.CalloutHandler in internal/auth. No business logic lives here; the handler logic has exactly one implementation, shared with the CLI's tests.

Environment variables (read once at cold start):

SHARE_RECORDS_TABLE_NAME  (required) DynamoDB table holding share records.
CACHE_TTL_CEILING         (optional) max-age ceiling as a Go duration, e.g. "1h".
                          Default 1h. Caps the allow Cache-Control.
CACHE_DENY_TTL            (optional) negative-cache max-age as a Go duration,
                          e.g. "60s". Default 60s.

The source VPC ARN of the requester arrives as the "Htsget-Context-SourceVpcArn" request header. htsget-rs issues the authorization callout as a bare GET with headers only — it never appends a query string — so the header is the real transport. The "sourceVpcArn" query string parameter is still accepted as a fallback so that out-of-band probes (the CLI's validate command) and manual curl testing keep working.

The handler emits a Cache-Control header computed from the matched shares' remaining lifetimes; that value is copied onto the proxy response.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL