From 3dc9cf493ff0113261c586948fe136617e6400b4 Mon Sep 17 00:00:00 2001 From: Niraj Acharya Date: Tue, 11 Feb 2025 10:06:37 +0545 Subject: [PATCH] adding test for trying to impersonation aad create auth app-token --- tests/acceptance/features/apiAuthApp/token.feature | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/features/apiAuthApp/token.feature b/tests/acceptance/features/apiAuthApp/token.feature index e06118c6b89..b2fd5d002e1 100644 --- a/tests/acceptance/features/apiAuthApp/token.feature +++ b/tests/acceptance/features/apiAuthApp/token.feature @@ -157,4 +157,11 @@ Feature: create auth-app token And the content in the response should include the following content: """ error parsing expiry. Use e.g. 30m or 72h - """ \ No newline at end of file + """ + + @env-config + Scenario: try to create an auth-app token for a user by a non-admin user + Given user "Brian" has been created with default attributes + And the config "AUTH_APP_ENABLE_IMPERSONATION" has been set to "true" + When user "Alice" tries to create auth-app token for user "Brian" with expiration time "72h" using the auth-app API + Then the HTTP status code should be "403"