Package com.vaadin.appsec.backend
Class AppSecConfiguration
java.lang.Object
com.vaadin.appsec.backend.AppSecConfiguration
- All Implemented Interfaces:
Serializable
Configuration settings for AppSec Kit.
An instance of this class can be set to configure AppSecService with
{@link AppSecService#setConfiguration(AppSecConfiguration).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the AppSec Kit route.Gets the duration of the interval between automatic scanning for vulnerabilities.Gets the Maven BOM-file path.Gets the npm BOM-file path.Gets the data-file path.intGets the rate per second value for the OpenSourceVulnerability API calls.Gets the executor used to run asynchronous tasks.booleanChecks whether automatic push activation is enabled.booleanGets if the npm development dependencies should be included during vulnerability scanning.voidsetAppSecRoute(String appSecRoute) Sets the AppSec Kit route.voidsetAutomaticallyActivatePush(boolean automaticallyActivatePush) Sets whether server push should be automatically activated if needed.voidsetAutoScanInterval(Duration autoScanInterval) Sets the duration of the interval between automatic scanning for vulnerabilities.voidsetBomFilePath(Path bomFilePath) Sets the Maven BOM-file path.voidsetBomNpmFilePath(Path bomNpmFilePath) Sets the npm BOM-file path.voidsetDataFilePath(Path dataFilePath) Sets the data-file path.voidsetIncludeNpmDevDependencies(boolean includeNpmDevDependencies) Sets if the npm development dependencies should be included during vulnerability scanning.voidsetOsvApiRatePerSecond(int osvApiRatePerSecond) Sets the rate per second value for the OpenSourceVulnerability API calls.voidsetTaskExecutor(ScheduledExecutorService taskExecutor) Sets the executor used to run asynchronous tasks.toString()
-
Constructor Details
-
AppSecConfiguration
public AppSecConfiguration()
-
-
Method Details
-
getAppSecRoute
Gets the AppSec Kit route.- Returns:
- the AppSec Kit route, not
null
-
setAppSecRoute
Sets the AppSec Kit route.- Parameters:
appSecRoute- the AppSec Kit route, notnull. By default, vaadin-appsec-kit
-
getDataFilePath
Gets the data-file path.- Returns:
- the data-file path, not
null
-
setDataFilePath
Sets the data-file path.- Parameters:
dataFilePath- the data-file path, notnull
-
getBomFilePath
Gets the Maven BOM-file path.- Returns:
- the Maven BOM-file path, not
null
-
setBomFilePath
Sets the Maven BOM-file path.- Parameters:
bomFilePath- the Maven BOM-file path, notnull
-
getBomNpmFilePath
Gets the npm BOM-file path.- Returns:
- the npm BOM-file path, not
null
-
setBomNpmFilePath
Sets the npm BOM-file path.- Parameters:
bomNpmFilePath- the npm BOM-file path, notnull
-
getTaskExecutor
Gets the executor used to run asynchronous tasks.- Returns:
- the task executor
-
setTaskExecutor
Sets the executor used to run asynchronous tasks.- Parameters:
taskExecutor- the task executor
-
getAutoScanInterval
Gets the duration of the interval between automatic scanning for vulnerabilities.- Returns:
- the duration of the interval between automatic scanning
-
setAutoScanInterval
Sets the duration of the interval between automatic scanning for vulnerabilities. The default interval is 1 day.A custom interval can be created using
Duration.of(long, java.time.temporal.TemporalUnit).- Parameters:
autoScanInterval- the duration of the interval between automatic scanning
-
getOsvApiRatePerSecond
public int getOsvApiRatePerSecond()Gets the rate per second value for the OpenSourceVulnerability API calls.- Returns:
- the rate per second value for the OpenSourceVulnerability API calls
-
setOsvApiRatePerSecond
public void setOsvApiRatePerSecond(int osvApiRatePerSecond) Sets the rate per second value for the OpenSourceVulnerability API calls.- Parameters:
osvApiRatePerSecond- the rate per second value for the OpenSourceVulnerability API calls
-
isIncludeNpmDevDependencies
public boolean isIncludeNpmDevDependencies()Gets if the npm development dependencies should be included during vulnerability scanning.- Returns:
- true if the npm development dependencies should be included during vulnerability scanning, otherwise false
-
setIncludeNpmDevDependencies
public void setIncludeNpmDevDependencies(boolean includeNpmDevDependencies) Sets if the npm development dependencies should be included during vulnerability scanning.- Parameters:
includeNpmDevDependencies- true if the npm development dependencies should be included during vulnerability scanning, otherwise false
-
setAutomaticallyActivatePush
public void setAutomaticallyActivatePush(boolean automaticallyActivatePush) Sets whether server push should be automatically activated if needed. When enabled, which is the default, AppSec Kit will automatically activatePushMode#AUTOMATICif neither push nor polling is active for a UI where AppSec Kit is used. When disabled, no automatic changes are made to the application's push configuration.- Parameters:
automaticallyActivatePush-trueto automatically activate server push if needed,falseto not make any automatic changes to the push configuration
-
isAutomaticallyActivatePush
public boolean isAutomaticallyActivatePush()Checks whether automatic push activation is enabled.- Returns:
trueif automatic server push configuration is enabled,falseif it's no enabled- See Also:
-
toString
-