import { BaseEntityClass } from '../base/base.entity'; import { UserEntity, ResourceAuthorizationAction, ResourceAuthorizationResource } from '..'; import { AUTHORIZATION_APPROVAL_STATUS, AUTHORIZATION_EFFECT } from './enum'; export declare class ResourceAuthorizationPolicyEntity extends BaseEntityClass { reason: string; approvalStatus: AUTHORIZATION_APPROVAL_STATUS; policyVersion: string; /** * The users this authorization policy applies to */ affectedUsers: UserEntity[]; /** * Whether to permit or deny the request */ effect: AUTHORIZATION_EFFECT; /** * Permitted actions * * Source request.route.methods * * Example: [ * 'api:get', * 'api:post' * ] */ actions: string[]; /** * Permitted resources * * Source request.originalUrl * * Only exact matches are supported in v0.0.1 * Example: [ * 'cm:::SignaturesEntity:4dec94e8-947e-4aee-8cce-3df0f3757a0c * 'application:5d83fc02-67a4-4900-8a2a-8ba135dbb19e:::SignaturesEntity:4dec94e8-947e-4aee-8cce-3df0f3757a0c' * ] */ resources: string[]; /** * The time at which the authorization was approved * * The approving user is createdByUser */ approvedOrDeniedAt: Date; /** * A time after which the rule will no longer take effect * set to null to never expire */ expiresAt: number; /** * User that requested this authorization * * The approving user is createdByUser */ requestedByUser: UserEntity; getActions(): ResourceAuthorizationAction[]; getResources(): ResourceAuthorizationResource[]; getEffect(): AUTHORIZATION_EFFECT; isExpired(): boolean; }