Skip to content

Commit 9ce668b

Browse files
committed
Add test to ensure anonymous users cannot provide credentials
1 parent b367d62 commit 9ce668b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/integration/test_credentials.py

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ def test_provide_credential(self):
1616
assert len(created_user_credentials[0]["groups"]["default"]["variables"]) == 1
1717
assert len(created_user_credentials[0]["groups"]["default"]["secrets"]) == 3
1818

19+
def test_anon_users_cannot_provide_credentials(self):
20+
payload = self._build_credentials_payload()
21+
response = self._post("/api/users/current/credentials", data=payload, json=True, anon=True)
22+
self._assert_status_code_is(response, 403)
23+
1924
def test_list_user_credentials(self):
2025
source_id = f"test_tool_list_credentials_{uuid4()}"
2126
payload = self._build_credentials_payload(source_id=source_id)

0 commit comments

Comments
 (0)