/** * QuickStartSVID - Simplified SPIRE SVID integration (singleton) * Mirrors Python QuickStartSVID from spire_sdk.py * * Connects directly to SPIRE agent via gRPC and fetches X.509-SVIDs. * Provides automatic certificate renewal every 30 minutes. */ import * as tls from 'node:tls'; export declare class QuickStartSVID { private static instance; private static initPromise; private svid; private grpcClient; private renewalTimer; private running; private constructor(); /** * Initialize SPIRE workload identity (singleton pattern). * * This method: * 1. Connects to SPIRE agent via gRPC * 2. Fetches X.509-SVID from agent * 3. Writes certificates to disk * 4. Starts automatic renewal (every 30 minutes) * * @param socketPath Path to SPIRE agent socket * @param certDir Directory to store certificates (default: /tmp/spiffe-certs) * @returns QuickStartSVID instance with SVID ready for mTLS */ static initialize(socketPath?: string, certDir?: string): Promise; /** * Get the singleton instance (must call initialize() first). */ static get(): Promise; private fetch; private renewSvid; /** Get SPIFFE ID */ get spiffeId(): string; /** Get certificate PEM */ get certificate(): string; /** Get private key PEM */ get privateKey(): string; /** Get trust bundle PEM */ get trustBundle(): string; /** Get certificate file path */ get certFilePath(): string | null; /** Get private key file path */ get keyFilePath(): string | null; /** Get CA bundle file path */ get caFilePath(): string | null; /** * Create TLS options for server. * Returns options suitable for `https.createServer(options, app)`. */ createTlsOptionsForServer(): tls.SecureContextOptions & { requestCert: boolean; rejectUnauthorized: boolean; }; /** * Create TLS options for client. * Returns options suitable for `https.Agent(options)`. */ createTlsOptionsForClient(): tls.SecureContextOptions & { rejectUnauthorized: boolean; }; /** Get certificate data as dict for easy passing to HTTP clients */ getCertificateDict(): { cert: string; key: string; }; /** Shutdown SVID renewal and gRPC client */ shutdown(): Promise; } //# sourceMappingURL=quick-start-svid.d.ts.map