UNPKG

@fntio/infra-client

Version:

Self-hosted AWS access portal: credential vending, target-account trust, and grant-driven private networking as CDK stacks and constructs.

19 lines (18 loc) • 1.12 kB
import type * as dynamodb from "aws-cdk-lib/aws-dynamodb"; import type * as iam from "aws-cdk-lib/aws-iam"; /** `audit` — the activity log's knobs (wiki Configuration Reference). */ export interface AuditConfig { /** How long activity rows are kept, in days (30–3650). Default 400: outlasts the 12-month access review. */ readonly retentionDays?: number; } export declare const DEFAULT_AUDIT_RETENTION_DAYS = 400; /** Validated at synth: an out-of-range retention would silently become the default in the Lambda. */ export declare function resolveAuditRetentionDays(config: AuditConfig | undefined): number; /** Where a Lambda writes activity rows: the table and the retention every row's TTL derives from. */ export interface AuditLogTarget { readonly table: dynamodb.ITable; readonly retentionDays: number; } /** Env + grant for any Lambda that records activity (services/auditService.ts reads both names). */ export declare function auditLogEnv(target: AuditLogTarget): Record<string, string>; export declare function grantAuditLogWrite(grantee: iam.IGrantable, target: AuditLogTarget): void;