Common: Add maximum tunnel open time validation to AgentConfigurationSchema

This commit is contained in:
Shreya Malviya 2022-07-27 18:28:52 +05:30
parent 85a11b62bd
commit a603b16573
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Mapping, Tuple
from marshmallow import Schema, fields
from marshmallow import Schema, fields, validate
from marshmallow.exceptions import MarshmallowError
from ..utils.code_utils import freeze_lists_in_mapping
@ -117,7 +117,7 @@ class AgentConfiguration:
class AgentConfigurationSchema(Schema):
keep_tunnel_open_time = fields.Float()
keep_tunnel_open_time = fields.Float(validate=validate.Range(min=0))
custom_pbas = fields.Nested(CustomPBAConfigurationSchema)
post_breach_actions = fields.List(fields.Nested(PluginConfigurationSchema))
credential_collectors = fields.List(fields.Nested(PluginConfigurationSchema))