Skip to content

Commit

Permalink
fix: skip validate scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
shahargl committed Jan 23, 2025
1 parent 2855363 commit 0afc60a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ class VictoriametricsProviderAuthConfig:
default=None,
)

SkipValidation: bool = dataclasses.field(
metadata={
"required": False,
"description": "Enter 'true' to skip validation of authentication",
"config_sub_group": "validation",
"config_main_group": "validation",
},
default=False,
)


class VictoriametricsProvider(BaseProvider):
"""Install Webhooks and receive alerts from Victoriametrics."""
Expand Down Expand Up @@ -211,6 +221,8 @@ def _get_auth(self):
def validate_scopes(self) -> dict[str, bool | str]:
"""Validate scopes by checking configured services."""
results = []
if self.authentication_config.SkipValidation == True:
return {"connected": True}

if self.vmalert_enabled:
vmalert_response = requests.get(self.vmalert_host, auth=self._get_auth())
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "keep"
version = "0.34.11"
version = "0.34.12"
description = "Alerting. for developers, by developers."
authors = ["Keep Alerting LTD"]
packages = [{include = "keep"}]
Expand Down

0 comments on commit 0afc60a

Please sign in to comment.