BaseSecurityDecorator
Defined in: packages/core/src/decorators/base.ts:25
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BaseSecurityDecorator(
config,logger?):BaseSecurityDecorator
Defined in: packages/core/src/decorators/base.ts:32
Parameters
Section titled “Parameters”config
Section titled “config”agentApiKey
Section titled “agentApiKey”string | null = ...
agentBackoffFactor
Section titled “agentBackoffFactor”number | null = ...
agentBufferOverflowPolicy
Section titled “agentBufferOverflowPolicy”"drop" | "block" | "raise" | null = ...
agentBufferSize
Section titled “agentBufferSize”number = ...
agentCompressionEnabled
Section titled “agentCompressionEnabled”boolean | null = ...
agentCompressionThreshold
Section titled “agentCompressionThreshold”number | null = ...
agentEnableEvents
Section titled “agentEnableEvents”boolean = ...
agentEnableMetrics
Section titled “agentEnableMetrics”boolean = ...
agentEndpoint
Section titled “agentEndpoint”string = ...
agentFlushInterval
Section titled “agentFlushInterval”number = ...
agentGuardVersion
Section titled “agentGuardVersion”string | null = ...
agentHighWatermarkRatio
Section titled “agentHighWatermarkRatio”number | null = ...
agentInstallId
Section titled “agentInstallId”string | null = ...
agentMaxConcurrentFlushes
Section titled “agentMaxConcurrentFlushes”number | null = ...
agentMaxPayloadSize
Section titled “agentMaxPayloadSize”number | null = ...
agentPayloadSigningSecret
Section titled “agentPayloadSigningSecret”string | null = ...
agentProjectEncryptionKey
Section titled “agentProjectEncryptionKey”string | null = ...
agentProjectId
Section titled “agentProjectId”string | null = ...
agentRetryAttempts
Section titled “agentRetryAttempts”number = ...
agentSensitiveHeaders
Section titled “agentSensitiveHeaders”string[] | null = ...
agentStatusInterval
Section titled “agentStatusInterval”number = ...
agentStrict
Section titled “agentStrict”boolean = ...
agentTimeout
Section titled “agentTimeout”number = ...
authVerifier?
Section titled “authVerifier?”(request, credential) => unknown = ...
autoBanDuration
Section titled “autoBanDuration”number = ...
autoBanThreshold
Section titled “autoBanThreshold”number = ...
behaviorMaxResponseBodyInspectBytes
Section titled “behaviorMaxResponseBodyInspectBytes”number = ...
behaviorScanResponseBody
Section titled “behaviorScanResponseBody”boolean = ...
blacklist
Section titled “blacklist”string[] = ...
blockCloudProviders
Section titled “blockCloudProviders”Set<"AWS" | "GCP" | "Azure"> = ...
blockedCountries
Section titled “blockedCountries”string[] = ...
blockedUserAgents
Section titled “blockedUserAgents”string[] = ...
bodyReadMaxConcurrent
Section titled “bodyReadMaxConcurrent”number = ...
bodyReadTimeout
Section titled “bodyReadTimeout”number = ...
cloudIpRefreshInterval
Section titled “cloudIpRefreshInterval”number = ...
corsAllowCredentials
Section titled “corsAllowCredentials”boolean = ...
corsAllowHeaders
Section titled “corsAllowHeaders”string[] = ...
corsAllowMethods
Section titled “corsAllowMethods”string[] = ...
corsAllowOrigins
Section titled “corsAllowOrigins”string[] = ...
corsExposeHeaders
Section titled “corsExposeHeaders”string[] = ...
corsMaxAge
Section titled “corsMaxAge”number = ...
customErrorResponses
Section titled “customErrorResponses”Record<number, string> = ...
customLogFile
Section titled “customLogFile”string | null = ...
customRequestCheck?
Section titled “customRequestCheck?”(req) => Promise<GuardResponse | null> = ...
customResponseModifier?
Section titled “customResponseModifier?”(res) => Promise<GuardResponse> = ...
detectionAnomalyEmissionCooldown
Section titled “detectionAnomalyEmissionCooldown”number = ...
detectionAnomalyThreshold
Section titled “detectionAnomalyThreshold”number = ...
detectionBinaryMinRunLength
Section titled “detectionBinaryMinRunLength”number = ...
detectionCompilerTimeout
Section titled “detectionCompilerTimeout”number = ...
detectionMaxBodyInspectBytes
Section titled “detectionMaxBodyInspectBytes”number = ...
detectionMaxContentLength
Section titled “detectionMaxContentLength”number = ...
detectionMaxJsonDepth
Section titled “detectionMaxJsonDepth”number = ...
detectionMaxScanChars
Section titled “detectionMaxScanChars”number = ...
detectionMaxScanValues
Section titled “detectionMaxScanValues”number = ...
detectionMaxTrackedPatterns
Section titled “detectionMaxTrackedPatterns”number = ...
detectionMinSamplesForAnomaly
Section titled “detectionMinSamplesForAnomaly”number = ...
detectionMonitorHistorySize
Section titled “detectionMonitorHistorySize”number = ...
detectionPatternValidationCachePath
Section titled “detectionPatternValidationCachePath”string | null = ...
detectionPreserveAttackPatterns
Section titled “detectionPreserveAttackPatterns”boolean = ...
detectionScanBody
Section titled “detectionScanBody”boolean = ...
detectionScanWorkerPool
Section titled “detectionScanWorkerPool”boolean = ...
detectionSemanticThreshold
Section titled “detectionSemanticThreshold”number = ...
detectionSlowPatternThreshold
Section titled “detectionSlowPatternThreshold”number = ...
detectionThreatScoreThreshold
Section titled “detectionThreatScoreThreshold”number = ...
dynamicRuleInterval
Section titled “dynamicRuleInterval”number = ...
dynamicRulesCachePath
Section titled “dynamicRulesCachePath”string | null = ...
emergencyMode
Section titled “emergencyMode”boolean = ...
emergencyWhitelist
Section titled “emergencyWhitelist”string[] = ...
enableAgent
Section titled “enableAgent”boolean = ...
enableCors
Section titled “enableCors”boolean = ...
enabledDetectionCategories
Section titled “enabledDetectionCategories”string[] = ...
enableDynamicRules
Section titled “enableDynamicRules”boolean = ...
enableEnrichment
Section titled “enableEnrichment”boolean = ...
enableIpBanning
Section titled “enableIpBanning”boolean = ...
enableLogfire
Section titled “enableLogfire”boolean = ...
enableOtel
Section titled “enableOtel”boolean = ...
enablePenetrationDetection
Section titled “enablePenetrationDetection”boolean = ...
enableRateLimitAutoBan
Section titled “enableRateLimitAutoBan”boolean = ...
enableRateLimiting
Section titled “enableRateLimiting”boolean = ...
enableRedis
Section titled “enableRedis”boolean = ...
endpointRateLimits
Section titled “endpointRateLimits”Record<string, [number, number]> = ...
enforceHttps
Section titled “enforceHttps”boolean = ...
excludedDetectionBodyFields
Section titled “excludedDetectionBodyFields”string[] = ...
excludedDetectionHeaders
Section titled “excludedDetectionHeaders”string[] = ...
excludedDetectionParams
Section titled “excludedDetectionParams”string[] = ...
excludePaths
Section titled “excludePaths”string[] = ...
exemptIps
Section titled “exemptIps”string[] = ...
failSecure
Section titled “failSecure”boolean = ...
geoIpDbMaxAge
Section titled “geoIpDbMaxAge”number = ...
geoIpHandler?
Section titled “geoIpHandler?”GeoIPHandler = ...
geoResolver?
Section titled “geoResolver?”(ip) => string | null = ...
globalBehaviorRules
Section titled “globalBehaviorRules”object[] = ...
ipinfoDbPath
Section titled “ipinfoDbPath”string = ...
ipinfoToken
Section titled “ipinfoToken”string | null = ...
lazyInit
Section titled “lazyInit”boolean = ...
logCountryCheckLevel
Section titled “logCountryCheckLevel”"INFO" | "DEBUG" | "WARNING" | "ERROR" | "CRITICAL" | null = ...
logfireServiceName
Section titled “logfireServiceName”string = ...
logFormat
Section titled “logFormat”"text" | "json" = ...
logger?
Section titled “logger?”Logger = ...
logRequestLevel
Section titled “logRequestLevel”"INFO" | "DEBUG" | "WARNING" | "ERROR" | "CRITICAL" | null = ...
logSensitiveBodyFields
Section titled “logSensitiveBodyFields”string[] = ...
logSensitiveHeaders
Section titled “logSensitiveHeaders”string[] = ...
logSensitiveParams
Section titled “logSensitiveParams”string[] = ...
logSuspiciousLevel
Section titled “logSuspiciousLevel”"INFO" | "DEBUG" | "WARNING" | "ERROR" | "CRITICAL" | null = ...
mutedCheckLogs
Section titled “mutedCheckLogs”string[] = ...
mutedEventTypes
Section titled “mutedEventTypes”string[] = ...
mutedMetricTypes
Section titled “mutedMetricTypes”string[] = ...
onBlock?
Section titled “onBlock?”(request, payload) => unknown = ...
onError?
Section titled “onError?”(stage, error, context) => void = ...
otelExporterEndpoint
Section titled “otelExporterEndpoint”string | null = ...
otelResourceAttributes
Section titled “otelResourceAttributes”Record<string, string> = ...
otelServiceName
Section titled “otelServiceName”string = ...
passiveMode
Section titled “passiveMode”boolean = ...
rateLimit
Section titled “rateLimit”number = ...
rateLimitWindow
Section titled “rateLimitWindow”number = ...
redisFailOpen
Section titled “redisFailOpen”boolean = ...
redisHealthCheckInterval
Section titled “redisHealthCheckInterval”number = ...
redisMaxConnections
Section titled “redisMaxConnections”number | null = ...
redisPrefix
Section titled “redisPrefix”string = ...
redisRetries
Section titled “redisRetries”number = ...
redisSocketConnectTimeout
Section titled “redisSocketConnectTimeout”number | null = ...
redisSocketTimeout
Section titled “redisSocketTimeout”number | null = ...
redisUrl
Section titled “redisUrl”string = ...
routeResolutionStrict
Section titled “routeResolutionStrict”boolean = ...
securityHeaders
Section titled “securityHeaders”{ contentTypeOptions: string; csp: Record<string, string[]> | null; custom: Record<string, string> | null; enabled: boolean; frameOptions: "DENY" | "SAMEORIGIN"; hsts?: { includeSubdomains: boolean; maxAge: number; preload: boolean; }; permissionsPolicy: string; referrerPolicy: string; xssProtection: string; } | null = ...
threatBanConfig
Section titled “threatBanConfig”Record<string, { duration: number; threshold: number; }> = ...
trustedProxies
Section titled “trustedProxies”string[] = ...
trustedProxyDepth
Section titled “trustedProxyDepth”number = ...
trustXForwardedProto
Section titled “trustXForwardedProto”boolean = ...
whitelist
Section titled “whitelist”string[] | null = ...
whitelistCountries
Section titled “whitelistCountries”string[] = ...
logger?
Section titled “logger?”Returns
Section titled “Returns”BaseSecurityDecorator
Properties
Section titled “Properties”agentHandler
Section titled “agentHandler”agentHandler:
AgentHandlerProtocol|null=null
Defined in: packages/core/src/decorators/base.ts:28
behaviorTracker
Section titled “behaviorTracker”behaviorTracker:
BehaviorTracker
Defined in: packages/core/src/decorators/base.ts:27
config
Section titled “config”
readonlyconfig:object
Defined in: packages/core/src/decorators/base.ts:30
agentApiKey
Section titled “agentApiKey”agentApiKey:
string|null
agentBackoffFactor
Section titled “agentBackoffFactor”agentBackoffFactor:
number|null
agentBufferOverflowPolicy
Section titled “agentBufferOverflowPolicy”agentBufferOverflowPolicy:
"drop"|"block"|"raise"|null
agentBufferSize
Section titled “agentBufferSize”agentBufferSize:
number
agentCompressionEnabled
Section titled “agentCompressionEnabled”agentCompressionEnabled:
boolean|null
agentCompressionThreshold
Section titled “agentCompressionThreshold”agentCompressionThreshold:
number|null
agentEnableEvents
Section titled “agentEnableEvents”agentEnableEvents:
boolean
agentEnableMetrics
Section titled “agentEnableMetrics”agentEnableMetrics:
boolean
agentEndpoint
Section titled “agentEndpoint”agentEndpoint:
string
agentFlushInterval
Section titled “agentFlushInterval”agentFlushInterval:
number
agentGuardVersion
Section titled “agentGuardVersion”agentGuardVersion:
string|null
agentHighWatermarkRatio
Section titled “agentHighWatermarkRatio”agentHighWatermarkRatio:
number|null
agentInstallId
Section titled “agentInstallId”agentInstallId:
string|null
agentMaxConcurrentFlushes
Section titled “agentMaxConcurrentFlushes”agentMaxConcurrentFlushes:
number|null
agentMaxPayloadSize
Section titled “agentMaxPayloadSize”agentMaxPayloadSize:
number|null
agentPayloadSigningSecret
Section titled “agentPayloadSigningSecret”agentPayloadSigningSecret:
string|null
agentProjectEncryptionKey
Section titled “agentProjectEncryptionKey”agentProjectEncryptionKey:
string|null
agentProjectId
Section titled “agentProjectId”agentProjectId:
string|null
agentRetryAttempts
Section titled “agentRetryAttempts”agentRetryAttempts:
number
agentSensitiveHeaders
Section titled “agentSensitiveHeaders”agentSensitiveHeaders:
string[] |null
agentStatusInterval
Section titled “agentStatusInterval”agentStatusInterval:
number
agentStrict
Section titled “agentStrict”agentStrict:
boolean
agentTimeout
Section titled “agentTimeout”agentTimeout:
number
authVerifier?
Section titled “authVerifier?”
optionalauthVerifier?: (request,credential) =>unknown
Parameters
Section titled “Parameters”request
Section titled “request”credential
Section titled “credential”string
Returns
Section titled “Returns”unknown
autoBanDuration
Section titled “autoBanDuration”autoBanDuration:
number
autoBanThreshold
Section titled “autoBanThreshold”autoBanThreshold:
number
behaviorMaxResponseBodyInspectBytes
Section titled “behaviorMaxResponseBodyInspectBytes”behaviorMaxResponseBodyInspectBytes:
number
behaviorScanResponseBody
Section titled “behaviorScanResponseBody”behaviorScanResponseBody:
boolean
blacklist
Section titled “blacklist”blacklist:
string[]
blockCloudProviders
Section titled “blockCloudProviders”blockCloudProviders:
Set<"AWS"|"GCP"|"Azure">
blockedCountries
Section titled “blockedCountries”blockedCountries:
string[]
blockedUserAgents
Section titled “blockedUserAgents”blockedUserAgents:
string[]
bodyReadMaxConcurrent
Section titled “bodyReadMaxConcurrent”bodyReadMaxConcurrent:
number
bodyReadTimeout
Section titled “bodyReadTimeout”bodyReadTimeout:
number
cloudIpRefreshInterval
Section titled “cloudIpRefreshInterval”cloudIpRefreshInterval:
number
corsAllowCredentials
Section titled “corsAllowCredentials”corsAllowCredentials:
boolean
corsAllowHeaders
Section titled “corsAllowHeaders”corsAllowHeaders:
string[]
corsAllowMethods
Section titled “corsAllowMethods”corsAllowMethods:
string[]
corsAllowOrigins
Section titled “corsAllowOrigins”corsAllowOrigins:
string[]
corsExposeHeaders
Section titled “corsExposeHeaders”corsExposeHeaders:
string[]
corsMaxAge
Section titled “corsMaxAge”corsMaxAge:
number
customErrorResponses
Section titled “customErrorResponses”customErrorResponses:
Record<number,string>
customLogFile
Section titled “customLogFile”customLogFile:
string|null
customRequestCheck?
Section titled “customRequestCheck?”
optionalcustomRequestCheck?: (req) =>Promise<GuardResponse|null>
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<GuardResponse | null>
customResponseModifier?
Section titled “customResponseModifier?”
optionalcustomResponseModifier?: (res) =>Promise<GuardResponse>
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<GuardResponse>
detectionAnomalyEmissionCooldown
Section titled “detectionAnomalyEmissionCooldown”detectionAnomalyEmissionCooldown:
number
detectionAnomalyThreshold
Section titled “detectionAnomalyThreshold”detectionAnomalyThreshold:
number
detectionBinaryMinRunLength
Section titled “detectionBinaryMinRunLength”detectionBinaryMinRunLength:
number
detectionCompilerTimeout
Section titled “detectionCompilerTimeout”detectionCompilerTimeout:
number
detectionMaxBodyInspectBytes
Section titled “detectionMaxBodyInspectBytes”detectionMaxBodyInspectBytes:
number
detectionMaxContentLength
Section titled “detectionMaxContentLength”detectionMaxContentLength:
number
detectionMaxJsonDepth
Section titled “detectionMaxJsonDepth”detectionMaxJsonDepth:
number
detectionMaxScanChars
Section titled “detectionMaxScanChars”detectionMaxScanChars:
number
detectionMaxScanValues
Section titled “detectionMaxScanValues”detectionMaxScanValues:
number
detectionMaxTrackedPatterns
Section titled “detectionMaxTrackedPatterns”detectionMaxTrackedPatterns:
number
detectionMinSamplesForAnomaly
Section titled “detectionMinSamplesForAnomaly”detectionMinSamplesForAnomaly:
number
detectionMonitorHistorySize
Section titled “detectionMonitorHistorySize”detectionMonitorHistorySize:
number
detectionPatternValidationCachePath
Section titled “detectionPatternValidationCachePath”detectionPatternValidationCachePath:
string|null
detectionPreserveAttackPatterns
Section titled “detectionPreserveAttackPatterns”detectionPreserveAttackPatterns:
boolean
detectionScanBody
Section titled “detectionScanBody”detectionScanBody:
boolean
detectionScanWorkerPool
Section titled “detectionScanWorkerPool”detectionScanWorkerPool:
boolean
detectionSemanticThreshold
Section titled “detectionSemanticThreshold”detectionSemanticThreshold:
number
detectionSlowPatternThreshold
Section titled “detectionSlowPatternThreshold”detectionSlowPatternThreshold:
number
detectionThreatScoreThreshold
Section titled “detectionThreatScoreThreshold”detectionThreatScoreThreshold:
number
dynamicRuleInterval
Section titled “dynamicRuleInterval”dynamicRuleInterval:
number
dynamicRulesCachePath
Section titled “dynamicRulesCachePath”dynamicRulesCachePath:
string|null
emergencyMode
Section titled “emergencyMode”emergencyMode:
boolean
emergencyWhitelist
Section titled “emergencyWhitelist”emergencyWhitelist:
string[]
enableAgent
Section titled “enableAgent”enableAgent:
boolean
enableCors
Section titled “enableCors”enableCors:
boolean
enabledDetectionCategories
Section titled “enabledDetectionCategories”enabledDetectionCategories:
string[]
enableDynamicRules
Section titled “enableDynamicRules”enableDynamicRules:
boolean
enableEnrichment
Section titled “enableEnrichment”enableEnrichment:
boolean
enableIpBanning
Section titled “enableIpBanning”enableIpBanning:
boolean
enableLogfire
Section titled “enableLogfire”enableLogfire:
boolean
enableOtel
Section titled “enableOtel”enableOtel:
boolean
enablePenetrationDetection
Section titled “enablePenetrationDetection”enablePenetrationDetection:
boolean
enableRateLimitAutoBan
Section titled “enableRateLimitAutoBan”enableRateLimitAutoBan:
boolean
enableRateLimiting
Section titled “enableRateLimiting”enableRateLimiting:
boolean
enableRedis
Section titled “enableRedis”enableRedis:
boolean
endpointRateLimits
Section titled “endpointRateLimits”endpointRateLimits:
Record<string, [number,number]>
enforceHttps
Section titled “enforceHttps”enforceHttps:
boolean
excludedDetectionBodyFields
Section titled “excludedDetectionBodyFields”excludedDetectionBodyFields:
string[]
excludedDetectionHeaders
Section titled “excludedDetectionHeaders”excludedDetectionHeaders:
string[]
excludedDetectionParams
Section titled “excludedDetectionParams”excludedDetectionParams:
string[]
excludePaths
Section titled “excludePaths”excludePaths:
string[]
exemptIps
Section titled “exemptIps”exemptIps:
string[]
failSecure
Section titled “failSecure”failSecure:
boolean
geoIpDbMaxAge
Section titled “geoIpDbMaxAge”geoIpDbMaxAge:
number
geoIpHandler?
Section titled “geoIpHandler?”
optionalgeoIpHandler?:GeoIPHandler
geoResolver?
Section titled “geoResolver?”
optionalgeoResolver?: (ip) =>string|null
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string | null
globalBehaviorRules
Section titled “globalBehaviorRules”globalBehaviorRules:
object[]
ipinfoDbPath
Section titled “ipinfoDbPath”ipinfoDbPath:
string
ipinfoToken
Section titled “ipinfoToken”ipinfoToken:
string|null
lazyInit
Section titled “lazyInit”lazyInit:
boolean
logCountryCheckLevel
Section titled “logCountryCheckLevel”logCountryCheckLevel:
"INFO"|"DEBUG"|"WARNING"|"ERROR"|"CRITICAL"|null
logfireServiceName
Section titled “logfireServiceName”logfireServiceName:
string
logFormat
Section titled “logFormat”logFormat:
"text"|"json"
logger?
Section titled “logger?”
optionallogger?:Logger
logRequestLevel
Section titled “logRequestLevel”logRequestLevel:
"INFO"|"DEBUG"|"WARNING"|"ERROR"|"CRITICAL"|null
logSensitiveBodyFields
Section titled “logSensitiveBodyFields”logSensitiveBodyFields:
string[]
logSensitiveHeaders
Section titled “logSensitiveHeaders”logSensitiveHeaders:
string[]
logSensitiveParams
Section titled “logSensitiveParams”logSensitiveParams:
string[]
logSuspiciousLevel
Section titled “logSuspiciousLevel”logSuspiciousLevel:
"INFO"|"DEBUG"|"WARNING"|"ERROR"|"CRITICAL"|null
mutedCheckLogs
Section titled “mutedCheckLogs”mutedCheckLogs:
string[]
mutedEventTypes
Section titled “mutedEventTypes”mutedEventTypes:
string[]
mutedMetricTypes
Section titled “mutedMetricTypes”mutedMetricTypes:
string[]
onBlock?
Section titled “onBlock?”
optionalonBlock?: (request,payload) =>unknown
Parameters
Section titled “Parameters”request
Section titled “request”payload
Section titled “payload”Record<string, unknown>
Returns
Section titled “Returns”unknown
onError?
Section titled “onError?”
optionalonError?: (stage,error,context) =>void
Parameters
Section titled “Parameters”string
unknown
context
Section titled “context”Record<string, unknown>
Returns
Section titled “Returns”void
otelExporterEndpoint
Section titled “otelExporterEndpoint”otelExporterEndpoint:
string|null
otelResourceAttributes
Section titled “otelResourceAttributes”otelResourceAttributes:
Record<string,string>
otelServiceName
Section titled “otelServiceName”otelServiceName:
string
passiveMode
Section titled “passiveMode”passiveMode:
boolean
rateLimit
Section titled “rateLimit”rateLimit:
number
rateLimitWindow
Section titled “rateLimitWindow”rateLimitWindow:
number
redisFailOpen
Section titled “redisFailOpen”redisFailOpen:
boolean
redisHealthCheckInterval
Section titled “redisHealthCheckInterval”redisHealthCheckInterval:
number
redisMaxConnections
Section titled “redisMaxConnections”redisMaxConnections:
number|null
redisPrefix
Section titled “redisPrefix”redisPrefix:
string
redisRetries
Section titled “redisRetries”redisRetries:
number
redisSocketConnectTimeout
Section titled “redisSocketConnectTimeout”redisSocketConnectTimeout:
number|null
redisSocketTimeout
Section titled “redisSocketTimeout”redisSocketTimeout:
number|null
redisUrl
Section titled “redisUrl”redisUrl:
string
routeResolutionStrict
Section titled “routeResolutionStrict”routeResolutionStrict:
boolean
securityHeaders
Section titled “securityHeaders”securityHeaders: {
contentTypeOptions:string;csp:Record<string,string[]> |null;custom:Record<string,string> |null;enabled:boolean;frameOptions:"DENY"|"SAMEORIGIN";hsts?: {includeSubdomains:boolean;maxAge:number;preload:boolean; };permissionsPolicy:string;referrerPolicy:string;xssProtection:string; } |null
threatBanConfig
Section titled “threatBanConfig”threatBanConfig:
Record<string, {duration:number;threshold:number; }>
trustedProxies
Section titled “trustedProxies”trustedProxies:
string[]
trustedProxyDepth
Section titled “trustedProxyDepth”trustedProxyDepth:
number
trustXForwardedProto
Section titled “trustXForwardedProto”trustXForwardedProto:
boolean
whitelist
Section titled “whitelist”whitelist:
string[] |null
whitelistCountries
Section titled “whitelistCountries”whitelistCountries:
string[]
geoIpHandler
Section titled “geoIpHandler”geoIpHandler:
unknown=null
Defined in: packages/core/src/decorators/base.ts:29
logger
Section titled “logger”
readonlylogger:Logger
Defined in: packages/core/src/decorators/base.ts:31
routeConfigs
Section titled “routeConfigs”routeConfigs:
Map<string,RouteConfig>
Defined in: packages/core/src/decorators/base.ts:26
Accessors
Section titled “Accessors”routeConfigRevision
Section titled “routeConfigRevision”Get Signature
Section titled “Get Signature”get routeConfigRevision():
number
Defined in: packages/core/src/decorators/base.ts:42
Returns
Section titled “Returns”number
Methods
Section titled “Methods”applyRouteConfig()
Section titled “applyRouteConfig()”applyRouteConfig<
T>(fn):T
Defined in: packages/core/src/decorators/base.ts:61
Type Parameters
Section titled “Type Parameters”T extends Function
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”T
ensureRouteConfig()
Section titled “ensureRouteConfig()”ensureRouteConfig(
fn):RouteConfig
Defined in: packages/core/src/decorators/base.ts:50
Parameters
Section titled “Parameters”Function
Returns
Section titled “Returns”getRouteConfig()
Section titled “getRouteConfig()”getRouteConfig(
routeId):RouteConfig|undefined
Defined in: packages/core/src/decorators/base.ts:46
Parameters
Section titled “Parameters”routeId
Section titled “routeId”string
Returns
Section titled “Returns”RouteConfig | undefined
getRouteId()
Section titled “getRouteId()”getRouteId(
fn):string
Defined in: packages/core/src/decorators/base.ts:66
Parameters
Section titled “Parameters”Function
Returns
Section titled “Returns”string
initializeAgent()
Section titled “initializeAgent()”initializeAgent(
agentHandler,geoIpHandler?):Promise<void>
Defined in: packages/core/src/decorators/base.ts:77
Parameters
Section titled “Parameters”agentHandler
Section titled “agentHandler”geoIpHandler?
Section titled “geoIpHandler?”unknown
Returns
Section titled “Returns”Promise<void>
initializeBehaviorTracking()
Section titled “initializeBehaviorTracking()”initializeBehaviorTracking(
redisHandler?):Promise<void>
Defined in: packages/core/src/decorators/base.ts:73
Parameters
Section titled “Parameters”redisHandler?
Section titled “redisHandler?”Returns
Section titled “Returns”Promise<void>
sendAccessDeniedEvent()
Section titled “sendAccessDeniedEvent()”sendAccessDeniedEvent(
request,reason,decoratorType,meta?):Promise<void>
Defined in: packages/core/src/decorators/base.ts:114
Parameters
Section titled “Parameters”request
Section titled “request”reason
Section titled “reason”string
decoratorType
Section titled “decoratorType”string
Record<string, unknown>
Returns
Section titled “Returns”Promise<void>
sendAuthenticationFailedEvent()
Section titled “sendAuthenticationFailedEvent()”sendAuthenticationFailedEvent(
request,reason,authType,meta?):Promise<void>
Defined in: packages/core/src/decorators/base.ts:123
Parameters
Section titled “Parameters”request
Section titled “request”reason
Section titled “reason”string
authType
Section titled “authType”string
Record<string, unknown>
Returns
Section titled “Returns”Promise<void>
sendDecoratorEvent()
Section titled “sendDecoratorEvent()”sendDecoratorEvent(
eventType,request,actionTaken,reason,decoratorType,meta?):Promise<void>
Defined in: packages/core/src/decorators/base.ts:88
Parameters
Section titled “Parameters”eventType
Section titled “eventType”string
request
Section titled “request”actionTaken
Section titled “actionTaken”string
reason
Section titled “reason”string
decoratorType
Section titled “decoratorType”string
Record<string, unknown>
Returns
Section titled “Returns”Promise<void>
sendDecoratorViolationEvent()
Section titled “sendDecoratorViolationEvent()”sendDecoratorViolationEvent(
request,violationType,reason,meta?):Promise<void>
Defined in: packages/core/src/decorators/base.ts:141
Parameters
Section titled “Parameters”request
Section titled “request”violationType
Section titled “violationType”string
reason
Section titled “reason”string
Record<string, unknown>
Returns
Section titled “Returns”Promise<void>
sendRateLimitEvent()
Section titled “sendRateLimitEvent()”sendRateLimitEvent(
request,limit,window,meta?):Promise<void>
Defined in: packages/core/src/decorators/base.ts:132
Parameters
Section titled “Parameters”request
Section titled “request”number
window
Section titled “window”number
Record<string, unknown>
Returns
Section titled “Returns”Promise<void>