UNPKG

@cloud-copilot/iam-simulate

Version:
24 lines 1.16 kB
import { RequestAnalysis, ResourceAnalysis } from '../evaluate.js'; import { RequestResource } from '../request/requestResource.js'; import { ServiceAuthorizationRequest, ServiceAuthorizer } from './ServiceAuthorizer.js'; /** * The default authorizer for services. */ export declare class DefaultServiceAuthorizer implements ServiceAuthorizer { /** * Authorize a service request after all policy analysis has been completed. * * @param request the service authorization request containing all analyses * @returns the result of the authorization */ authorize(request: ServiceAuthorizationRequest): RequestAnalysis; /** * Determines if the service trusts the principal's Account's IAM policies * * @param sameAccount - If the principal and resource are in the same account * @param resourceAnalysis - The resource policy analysis * @returns true if the service trusts the principal's account IAM policies */ serviceTrustsPrincipalAccount(sameAccount: boolean, resourceAnalysis: ResourceAnalysis, resource: RequestResource): boolean; } //# sourceMappingURL=DefaultServiceAuthorizer.d.ts.map