/** * Ziti configuration interface representing essential * connection information needed for API operations. */ export interface ZitiConfig { /** * OpenZiti Controller host. * Used to construct OpenZiti Controller API endpoints. * Essential for routing requests to the correct Ziti network instance. */ zitiControllerHost: string; /** * Authentication token for Ziti Management API access. * Must be valid and non-expired for API operations to succeed. * Used in the Authorization header for all API requests. */ token: string; /** * IdP tenant domain (e.g., "your-tenant.auth0.com"). * Used to construct API endpoints and identify the tenant. * Essential for routing requests to the correct IdP instance. */ domain: string; /** * Human-readable name for the IdP tenant. * Used primarily for display purposes in logs and user interfaces. * Defaults to domain if not explicitly provided. */ tenantName?: string; /** * Authentication mode: 'token' for OAuth2 Bearer flow, * 'identity' for certificate-based mTLS flow. */ authMode: 'token' | 'identity' | 'updb'; } /** * Loads and prepares configuration for API interactions. * * This function retrieves stored credentials from the system keychain * to establish a secure connection with Ziti. It handles * the authentication flow behind the scenes, ensuring a valid * access token is available for API operations. * * @returns {Promise} Configuration object with token and domain * or null if retrieval fails */ export declare function loadConfig(): Promise; /** * Validates configuration to ensure it can be used for Ziti Management API operations. * * This comprehensive validation ensures that: * 1. The configuration object exists * 2. The required token is present * 3. The required domain is specified * 4. The token has not expired * * Security validation is critical since invalid or expired credentials could * lead to API failures or security vulnerabilities. This function prevents * operations from proceeding with invalid authentication states. * * Note: This validation complements the user-oriented validation in `run.ts`. * While `run.ts` provides detailed CLI error messages during startup, * this function serves as an ongoing validation layer during server operation, * particularly when handling tool requests. Both mechanisms work together * to create a secure yet user-friendly experience. * * @param {ZitiConfig | null} config - The configuration to validate * @returns {Promise} True if config is valid and usable, false otherwise */ export declare function validateConfig(config: ZitiConfig | null): Promise;