Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: allow gateway apis on editor access (#10646)

Karan Balani29ec71b98f5c
diff --git a/docs/api/openapi.yml b/docs/api/openapi.yml
index c46f9faaf3..eb5c01f211 100644
--- a/docs/api/openapi.yml
+++ b/docs/api/openapi.yml
@@ -5823,9 +5823,9 @@ paths:
description: Internal Server Error
security:
- api_key:
- - ADMIN
+ - EDITOR
- tokenizer:
- - ADMIN
+ - EDITOR
summary: Get ingestion keys for workspace
tags:
- gateway
@@ -5873,9 +5873,9 @@ paths:
description: Internal Server Error
security:
- api_key:
- - ADMIN
+ - EDITOR
- tokenizer:
- - ADMIN
+ - EDITOR
summary: Create ingestion key for workspace
tags:
- gateway
@@ -5913,9 +5913,9 @@ paths:
description: Internal Server Error
security:
- api_key:
- - ADMIN
+ - EDITOR
- tokenizer:
- - ADMIN
+ - EDITOR
summary: Delete ingestion key for workspace
tags:
- gateway
@@ -5957,9 +5957,9 @@ paths:
description: Internal Server Error
security:
- api_key:
- - ADMIN
+ - EDITOR
- tokenizer:
- - ADMIN
+ - EDITOR
summary: Update ingestion key for workspace
tags:
- gateway
@@ -6014,9 +6014,9 @@ paths:
description: Internal Server Error
security:
- api_key:
- - ADMIN
+ - EDITOR
- tokenizer:
- - ADMIN
+ - EDITOR
summary: Create limit for the ingestion key
tags:
- gateway
@@ -6054,9 +6054,9 @@ paths:
description: Internal Server Error
security:
- api_key:
- - ADMIN
+ - EDITOR
- tokenizer:
- - ADMIN
+ - EDITOR
summary: Delete limit for the ingestion key
tags:
- gateway
@@ -6098,9 +6098,9 @@ paths:
description: Internal Server Error
security:
- api_key:
- - ADMIN
+ - EDITOR
- tokenizer:
- - ADMIN
+ - EDITOR
summary: Update limit for the ingestion key
tags:
- gateway
@@ -6158,9 +6158,9 @@ paths:
description: Internal Server Error
security:
- api_key:
- - ADMIN
+ - EDITOR
- tokenizer:
- - ADMIN
+ - EDITOR
summary: Search ingestion keys for workspace
tags:
- gateway
diff --git a/pkg/apiserver/signozapiserver/gateway.go b/pkg/apiserver/signozapiserver/gateway.go
index 339d877577..e34c253b4b 100644
--- a/pkg/apiserver/signozapiserver/gateway.go
+++ b/pkg/apiserver/signozapiserver/gateway.go
@@ -10,7 +10,7 @@ import (
)
func (provider *provider) addGatewayRoutes(router *mux.Router) error {
- if err := router.Handle("/api/v2/gateway/ingestion_keys", handler.New(provider.authZ.AdminAccess(provider.gatewayHandler.GetIngestionKeys), handler.OpenAPIDef{
+ if err := router.Handle("/api/v2/gateway/ingestion_keys", handler.New(provider.authZ.EditAccess(provider.gatewayHandler.GetIngestionKeys), handler.OpenAPIDef{
ID: "GetIngestionKeys",
Tags: []string{"gateway"},
Summary: "Get ingestion keys for workspace",
@@ -23,12 +23,12 @@ func (provider *provider) addGatewayRoutes(router *mux.Router) error {
SuccessStatusCode: http.StatusOK,
ErrorStatusCodes: []int{},
Deprecated: false,
- SecuritySchemes: newSecuritySchemes(types.RoleAdmin),
+ SecuritySchemes: newSecuritySchemes(types.RoleEditor),
})).Methods(http.MethodGet).GetError(); err != nil {
return err
}
- if err := router.Handle("/api/v2/gateway/ingestion_keys/search", handler.New(provider.authZ.AdminAccess(provider.gatewayHandler.SearchIngestionKeys), handler.OpenAPIDef{
+ if err := router.Handle("/api/v2/gateway/ingestion_keys/search", handler.New(provider.authZ.EditAccess(provider.gatewayHandler.SearchIngestionKeys), handler.OpenAPIDef{
ID: "SearchIngestionKeys",
Tags: []string{"gateway"},
Summary: "Search ingestion keys for workspace",
@@ -41,12 +41,12 @@ func (provider *provider) addGatewayRoutes(router *mux.Router) error {
SuccessStatusCode: http.StatusOK,
ErrorStatusCodes: []int{},
Deprecated: false,
- SecuritySchemes: newSecuritySchemes(types.RoleAdmin),
+ SecuritySchemes: newSecuritySchemes(types.RoleEditor),
})).Methods(http.MethodGet).GetError(); err != nil {
return err
}
- if err := router.Handle("/api/v2/gateway/ingestion_keys", handler.New(provider.authZ.AdminAccess(provider.gatewayHandler.CreateIngestionKey), handler.OpenAPIDef{
+ if err := router.Handle("/api/v2/gateway/ingestion_keys", handler.New(provider.authZ.EditAccess(provider.gatewayHandler.CreateIngestionKey), handler.OpenAPIDef{
ID: "CreateIngestionKey",
Tags: []string{"gateway"},
Summary: "Create ingestion key for workspace",
@@ -58,12 +58,12 @@ func (provider *provider) addGatewayRoutes(router *mux.Router) error {
SuccessStatusCode: http.StatusCreated,
ErrorStatusCodes: []int{},
Deprecated: false,
- SecuritySchemes: newSecuritySchemes(types.RoleAdmin),
+ SecuritySchemes: newSecuritySchemes(types.RoleEditor),
})).Methods(http.MethodPost).GetError(); err != nil {
return err
}
- if err := router.Handle("/api/v2/gateway/ingestion_keys/{keyId}", handler.New(provider.authZ.AdminAccess(provider.gatewayHandler.UpdateIngestionKey), handler.OpenAPIDef{
+ if err := router.Handle("/api/v2/gateway/ingestion_keys/{keyId}", handler.New(provider.authZ.EditAccess(provider.gatewayHandler.UpdateIngestionKey), handler.OpenAPIDef{
ID: "UpdateIngestionKey",
Tags: []string{"gateway"},
Summary: "Update ingestion key for workspace",
@@ -75,12 +75,12 @@ func (provider *provider) addGatewayRoutes(router *mux.Router) error {
SuccessStatusCode: http.StatusNoContent,
ErrorStatusCodes: []int{},
Deprecated: false,
- SecuritySchemes: newSecuritySchemes(types.RoleAdmin),
+ SecuritySchemes: newSecuritySchemes(types.RoleEditor),
})).Methods(http.MethodPatch).GetError(); err != nil {
return err
}
- if err := router.Handle("/api/v2/gateway/ingestion_keys/{keyId}", handler.New(provider.authZ.AdminAccess(provider.gatewayHandler.DeleteIngestionKey), handler.OpenAPIDef{
+ if err := router.Handle("/api/v2/gateway/ingestion_keys/{keyId}", handler.New(provider.authZ.EditAccess(provider.gatewayHandler.DeleteIngestionKey), handler.OpenAPIDef{
ID: "DeleteIngestionKey",
Tags: []string{"gateway"},
Summary: "Delete ingestion key for workspace",
@@ -92,12 +92,12 @@ func (provider *provider) addGatewayRoutes(router *mux.Router) error {
SuccessStatusCode: http.StatusNoContent,
ErrorStatusCodes: []int{},
Deprecated: false,
- SecuritySchemes: newSecuritySchemes(types.RoleAdmin),
+ SecuritySchemes: newSecuritySchemes(types.RoleEditor),
})).Methods(http.MethodDelete).GetError(); err != nil {
return err
}
- if err := router.Handle("/api/v2/gateway/ingestion_keys/{keyId}/limits", handler.New(provider.authZ.AdminAccess(provider.gatewayHandler.CreateIngestionKeyLimit), handler.OpenAPIDef{
+ if err := router.Handle("/api/v2/gateway/ingestion_keys/{keyId}/limits", handler.New(provider.authZ.EditAccess(provider.gatewayHandler.CreateIngestionKeyLimit), handler.OpenAPIDef{
ID: "CreateIngestionKeyLimit",
Tags: []string{"gateway"},
Summary: "Create limit for the ingestion key",
@@ -109,12 +109,12 @@ func (provider *provider) addGatewayRoutes(router *mux.Router) error {
SuccessStatusCode: http.StatusCreated,
ErrorStatusCodes: []int{},
Deprecated: false,
- SecuritySchemes: newSecuritySchemes(types.RoleAdmin),
+ SecuritySchemes: newSecuritySchemes(types.RoleEditor),
})).Methods(http.MethodPost).GetError(); err != nil {
return err
}
- if err := router.Handle("/api/v2/gateway/ingestion_keys/limits/{limitId}", handler.New(provider.authZ.AdminAccess(provider.gatewayHandler.UpdateIngestionKeyLimit), handler.OpenAPIDef{
+ if err := router.Handle("/api/v2/gateway/ingestion_keys/limits/{limitId}", handler.New(provider.authZ.EditAccess(provider.gatewayHandler.UpdateIngestionKeyLimit), handler.OpenAPIDef{
ID: "UpdateIngestionKeyLimit",
Tags: []string{"gateway"},
Summary: "Update limit for the ingestion key",
@@ -126,12 +126,12 @@ func (provider *provider) addGatewayRoutes(router *mux.Router) error {
SuccessStatusCode: http.StatusNoContent,
ErrorStatusCodes: []int{},
Deprecated: false,
- SecuritySchemes: newSecuritySchemes(types.RoleAdmin),
+ SecuritySchemes: newSecuritySchemes(types.RoleEditor),
})).Methods(http.MethodPatch).GetError(); err != nil {
return err
}
- if err := router.Handle("/api/v2/gateway/ingestion_keys/limits/{limitId}", handler.New(provider.authZ.AdminAccess(provider.gatewayHandler.DeleteIngestionKeyLimit), handler.OpenAPIDef{
+ if err := router.Handle("/api/v2/gateway/ingestion_keys/limits/{limitId}", handler.New(provider.authZ.EditAccess(provider.gatewayHandler.DeleteIngestionKeyLimit), handler.OpenAPIDef{
ID: "DeleteIngestionKeyLimit",
Tags: []string{"gateway"},
Summary: "Delete limit for the ingestion key",
@@ -143,7 +143,7 @@ func (provider *provider) addGatewayRoutes(router *mux.Router) error {
SuccessStatusCode: http.StatusNoContent,
ErrorStatusCodes: []int{},
Deprecated: false,
- SecuritySchemes: newSecuritySchemes(types.RoleAdmin),
+ SecuritySchemes: newSecuritySchemes(types.RoleEditor),
})).Methods(http.MethodDelete).GetError(); err != nil {
return err
}
diff --git a/tests/integration/src/ingestionkeys/01_ingestion_keys.py b/tests/integration/src/ingestionkeys/01_ingestion_keys.py
index a5a86c7911..09d3f0d873 100644
--- a/tests/integration/src/ingestionkeys/01_ingestion_keys.py
+++ b/tests/integration/src/ingestionkeys/01_ingestion_keys.py
@@ -21,6 +21,9 @@ from fixtures.logger import setup_logger
logger = setup_logger(__name__)
+GATEWAY_APIS_EDITOR_EMAIL = "[email protected]"
+GATEWAY_APIS_EDITOR_PASSWORD = "password123Z$"
+
def test_apply_license(
signoz: types.SigNoz,
@@ -32,6 +35,31 @@ def test_apply_license(
add_license(signoz, make_http_mocks, get_token)
+def test_create_editor_user(
+ signoz: types.SigNoz,
+ create_user_admin: types.Operation, # pylint: disable=unused-argument
+ get_token: Callable[[str, str], str],
+) -> None:
+ """Invite and register an editor user for gateway API tests."""
+ admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+
+ invite_response = requests.post(
+ signoz.self.host_configs["8080"].get("/api/v1/invite"),
+ json={"email": GATEWAY_APIS_EDITOR_EMAIL, "role": "EDITOR"},
+ headers={"Authorization": f"Bearer {admin_token}"},
+ timeout=5,
+ )
+ assert invite_response.status_code == HTTPStatus.CREATED
+ reset_token = invite_response.json()["data"]["token"]
+
+ response = requests.post(
+ signoz.self.host_configs["8080"].get("/api/v1/resetPassword"),
+ json={"password": GATEWAY_APIS_EDITOR_PASSWORD, "token": reset_token},
+ timeout=5,
+ )
+ assert response.status_code == HTTPStatus.NO_CONTENT
+
+
# ---------------------------------------------------------------------------
# Ingestion key CRUD
# ---------------------------------------------------------------------------
@@ -44,7 +72,7 @@ def test_create_ingestion_key(
get_token: Callable[[str, str], str],
) -> None:
"""POST /api/v2/gateway/ingestion_keys creates a key via the gateway."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
make_http_mocks(
signoz.gateway,
@@ -77,7 +105,7 @@ def test_create_ingestion_key(
"tags": ["env:test", "team:platform"],
"expires_at": "2030-01-01T00:00:00Z",
},
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -103,7 +131,7 @@ def test_get_ingestion_keys(
get_token: Callable[[str, str], str],
) -> None:
"""GET /api/v2/gateway/ingestion_keys lists keys via the gateway."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
# Default page=1, per_page=10 → gateway gets ?page=1&per_page=10
make_http_mocks(
@@ -146,7 +174,7 @@ def test_get_ingestion_keys(
response = requests.get(
signoz.self.host_configs["8080"].get("/api/v2/gateway/ingestion_keys"),
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -168,7 +196,7 @@ def test_get_ingestion_keys_custom_pagination(
get_token: Callable[[str, str], str],
) -> None:
"""GET /api/v2/gateway/ingestion_keys with custom pagination params."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
make_http_mocks(
signoz.gateway,
@@ -200,7 +228,7 @@ def test_get_ingestion_keys_custom_pagination(
signoz.self.host_configs["8080"].get(
"/api/v2/gateway/ingestion_keys?page=2&per_page=5"
),
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -221,7 +249,7 @@ def test_search_ingestion_keys(
get_token: Callable[[str, str], str],
) -> None:
"""GET /api/v2/gateway/ingestion_keys/search searches keys by name."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
# name, page, per_page are sorted alphabetically by Go url.Values.Encode()
make_http_mocks(
@@ -266,7 +294,7 @@ def test_search_ingestion_keys(
signoz.self.host_configs["8080"].get(
"/api/v2/gateway/ingestion_keys/search?name=my-test"
),
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -286,7 +314,7 @@ def test_search_ingestion_keys_empty(
get_token: Callable[[str, str], str],
) -> None:
"""Search returns an empty list when no keys match."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
make_http_mocks(
signoz.gateway,
@@ -318,7 +346,7 @@ def test_search_ingestion_keys_empty(
signoz.self.host_configs["8080"].get(
"/api/v2/gateway/ingestion_keys/search?name=nonexistent"
),
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -338,7 +366,7 @@ def test_update_ingestion_key(
get_token: Callable[[str, str], str],
) -> None:
"""PATCH /api/v2/gateway/ingestion_keys/{keyId} updates a key via the gateway."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
gateway_url = f"/v1/workspaces/me/keys/{TEST_KEY_ID}"
@@ -366,7 +394,7 @@ def test_update_ingestion_key(
"tags": ["env:prod"],
"expires_at": "2031-06-15T00:00:00Z",
},
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -388,7 +416,7 @@ def test_delete_ingestion_key(
get_token: Callable[[str, str], str],
) -> None:
"""DELETE /api/v2/gateway/ingestion_keys/{keyId} deletes a key via the gateway."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
gateway_url = f"/v1/workspaces/me/keys/{TEST_KEY_ID}"
@@ -411,7 +439,7 @@ def test_delete_ingestion_key(
signoz.self.host_configs["8080"].get(
f"/api/v2/gateway/ingestion_keys/{TEST_KEY_ID}"
),
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
diff --git a/tests/integration/src/ingestionkeys/02_ingestion_keys_limits.py b/tests/integration/src/ingestionkeys/02_ingestion_keys_limits.py
index e3531004f3..73ef546660 100644
--- a/tests/integration/src/ingestionkeys/02_ingestion_keys_limits.py
+++ b/tests/integration/src/ingestionkeys/02_ingestion_keys_limits.py
@@ -10,7 +10,7 @@ from wiremock.client import (
)
from fixtures import types
-from fixtures.auth import USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD, add_license
+from fixtures.auth import add_license
from fixtures.gatewayutils import (
TEST_KEY_ID,
TEST_LIMIT_ID,
@@ -22,6 +22,9 @@ from fixtures.logger import setup_logger
logger = setup_logger(__name__)
+GATEWAY_APIS_EDITOR_EMAIL = "[email protected]"
+GATEWAY_APIS_EDITOR_PASSWORD = "password123Z$"
+
def test_apply_license(
signoz: types.SigNoz,
@@ -45,7 +48,7 @@ def test_create_ingestion_key_limit_only_size(
get_token: Callable[[str, str], str],
) -> None:
"""Creating a limit with only size omits count from the gateway payload."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
gateway_url = f"/v1/workspaces/me/keys/{TEST_KEY_ID}/limits"
@@ -79,7 +82,7 @@ def test_create_ingestion_key_limit_only_size(
"config": {"day": {"size": 1000}},
"tags": ["test"],
},
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -105,7 +108,7 @@ def test_create_ingestion_key_limit_only_count(
get_token: Callable[[str, str], str],
) -> None:
"""Creating a limit with only count omits size from the gateway payload."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
gateway_url = f"/v1/workspaces/me/keys/{TEST_KEY_ID}/limits"
@@ -139,7 +142,7 @@ def test_create_ingestion_key_limit_only_count(
"config": {"day": {"count": 500}},
"tags": ["test"],
},
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -162,7 +165,7 @@ def test_create_ingestion_key_limit_both_size_and_count(
get_token: Callable[[str, str], str],
) -> None:
"""Creating a limit with both size and count includes both in the gateway payload."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
gateway_url = f"/v1/workspaces/me/keys/{TEST_KEY_ID}/limits"
@@ -199,7 +202,7 @@ def test_create_ingestion_key_limit_both_size_and_count(
},
"tags": ["test"],
},
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -229,7 +232,7 @@ def test_update_ingestion_key_limit_only_size(
get_token: Callable[[str, str], str],
) -> None:
"""Updating a limit with only size omits count from the gateway payload."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
gateway_url = f"/v1/workspaces/me/limits/{TEST_LIMIT_ID}"
@@ -256,7 +259,7 @@ def test_update_ingestion_key_limit_only_size(
"config": {"day": {"size": 2000}},
"tags": ["test"],
},
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -279,7 +282,7 @@ def test_update_ingestion_key_limit_only_count(
get_token: Callable[[str, str], str],
) -> None:
"""Updating a limit with only count omits size from the gateway payload."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
gateway_url = f"/v1/workspaces/me/limits/{TEST_LIMIT_ID}"
@@ -306,7 +309,7 @@ def test_update_ingestion_key_limit_only_count(
"config": {"day": {"count": 750}},
"tags": ["test"],
},
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -328,7 +331,7 @@ def test_update_ingestion_key_limit_both_size_and_count(
get_token: Callable[[str, str], str],
) -> None:
"""Updating a limit with both size and count includes both in the gateway payload."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
gateway_url = f"/v1/workspaces/me/limits/{TEST_LIMIT_ID}"
@@ -355,7 +358,7 @@ def test_update_ingestion_key_limit_both_size_and_count(
"config": {"day": {"size": 1000, "count": 500}},
"tags": ["test"],
},
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)
@@ -382,7 +385,7 @@ def test_delete_ingestion_key_limit(
get_token: Callable[[str, str], str],
) -> None:
"""DELETE /api/v2/gateway/ingestion_keys/limits/{limitId} deletes a limit."""
- admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
+ editor_token = get_token(GATEWAY_APIS_EDITOR_EMAIL, GATEWAY_APIS_EDITOR_PASSWORD)
gateway_url = f"/v1/workspaces/me/limits/{TEST_LIMIT_ID}"
@@ -405,7 +408,7 @@ def test_delete_ingestion_key_limit(
signoz.self.host_configs["8080"].get(
f"/api/v2/gateway/ingestion_keys/limits/{TEST_LIMIT_ID}"
),
- headers={"Authorization": f"Bearer {admin_token}"},
+ headers={"Authorization": f"Bearer {editor_token}"},
timeout=10,
)