Documentation ¶
Index ¶
- func InitSecurityAgent(app *newrelic.Application, opts ...ConfigOption) error
- type ConfigOption
- func ConfigIastScanRequestRateLimit(limit int) ConfigOption
- func ConfigScanInstanceCount(limit int) ConfigOption
- func ConfigScanScheduleAllowIastSampleCollection(isAllowed bool) ConfigOption
- func ConfigScanScheduleDelay(delay int) ConfigOption
- func ConfigScanScheduleDuration(duration int) ConfigOption
- func ConfigScanScheduleSetSchedule(schedule string) ConfigOption
- func ConfigSecurityDetectionDisableRxss(isDisable bool) ConfigOption
- func ConfigSecurityEnable(isEnabled bool) ConfigOption
- func ConfigSecurityFromEnvironment() ConfigOption
- func ConfigSecurityFromYaml() ConfigOption
- func ConfigSecurityIastTestIdentifier(testIdentifier string) ConfigOption
- func ConfigSecurityMode(mode string) ConfigOption
- func ConfigSecurityRequestBodyLimit(bodyLimit int) ConfigOption
- func ConfigSecurityValidatorServiceEndPointUrl(url string) ConfigOption
- type SecurityConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitSecurityAgent ¶
func InitSecurityAgent(app *newrelic.Application, opts ...ConfigOption) error
InitSecurityAgent initializes the nrsecurityagent integration package from user-supplied configuration values.
Types ¶
type ConfigOption ¶
type ConfigOption func(*SecurityConfig)
ConfigOption functions are used to programmatically provide configuration values to the nrsecurityagent integration package.
func ConfigIastScanRequestRateLimit ¶ added in v1.3.4
func ConfigIastScanRequestRateLimit(limit int) ConfigOption
ConfigScanControllersIastScanRequestRateLimit is used to set IAST scan request rate limit. The IAST Scan Rate Limit settings limit the maximum number of analysis probes or requests that can be sent to the application in a minute
func ConfigScanInstanceCount ¶ added in v1.3.4
func ConfigScanInstanceCount(limit int) ConfigOption
ConfigScanIstanceCount is used to set scan instance count. This configuration allows users to the number of application instances for a specific entity where IAST analysis is performed.
func ConfigScanScheduleAllowIastSampleCollection ¶ added in v1.3.4
func ConfigScanScheduleAllowIastSampleCollection(isAllowed bool) ConfigOption
ConfigScanScheduleAllowIastSampleCollection is used to allow or disallow IAST sample collection always_sample_traces permits IAST to actively gather trace data in the background, and the collected data will be used by Security Agent to perform an IAST Scan at the scheduled time.
func ConfigScanScheduleDelay ¶ added in v1.3.4
func ConfigScanScheduleDelay(delay int) ConfigOption
ConfigScanScheduleDelay is used to set delay for scan schedule. The delay field indicated time in minutes before the IAST scan starts after the application starts
func ConfigScanScheduleDuration ¶ added in v1.3.4
func ConfigScanScheduleDuration(duration int) ConfigOption
ConfigScanScheduleDuration is used to set duration for scan schedule. The duration field specifies the duration of the IAST scan in minutes. This determines how long the scan will run.
func ConfigScanScheduleSetSchedule ¶ added in v1.3.4
func ConfigScanScheduleSetSchedule(schedule string) ConfigOption
ConfigScanScheduleSetSchedule is used to set schedule for scan schedule. The schedule field specifies a cron expression that defines when the IAST scan should run.
func ConfigSecurityDetectionDisableRxss ¶
func ConfigSecurityDetectionDisableRxss(isDisable bool) ConfigOption
ConfigSecurityDetectionDisableRxss is used to enable or disable RXSS validation.
func ConfigSecurityEnable ¶
func ConfigSecurityEnable(isEnabled bool) ConfigOption
ConfigSecurityEnable enables or disables the security integration.
func ConfigSecurityFromEnvironment ¶
func ConfigSecurityFromEnvironment() ConfigOption
func ConfigSecurityFromYaml ¶
func ConfigSecurityFromYaml() ConfigOption
ConfigSecurityFromYaml directs the nrsecurityagent integration to read an external YAML-formatted file to obtain its configuration values.
The path to this file must be provided by setting the environment variable NEW_RELIC_SECURITY_CONFIG_PATH.
func ConfigSecurityIastTestIdentifier ¶ added in v1.3.4
func ConfigSecurityIastTestIdentifier(testIdentifier string) ConfigOption
ConfigSecurityIastTestIdentifier sets the iast test identifier. This configuration allows users to specify a unique test identifier when running IAST Scan with CI/CD.
func ConfigSecurityMode ¶
func ConfigSecurityMode(mode string) ConfigOption
ConfigSecurityMode sets the security mode to use. By default, this is "IAST".
func ConfigSecurityRequestBodyLimit ¶ added in v1.1.3
func ConfigSecurityRequestBodyLimit(bodyLimit int) ConfigOption
ConfigSecurityRequestBodyLimit set limit on read request body in kb. By default, this is "300"
func ConfigSecurityValidatorServiceEndPointUrl ¶
func ConfigSecurityValidatorServiceEndPointUrl(url string) ConfigOption
ConfigSecurityValidatorServiceEndPointUrl sets the security validator service endpoint.
type SecurityConfig ¶
type SecurityConfig struct { securityAgent.SecurityAgentConfig Error error }