From ca7ced4e435823edc677efcced06f5689a2e8754 Mon Sep 17 00:00:00 2001 From: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> Date: Fri, 16 Jun 2023 12:24:41 -0500 Subject: [PATCH] Add check for org SM flag in client store (#3007) --- src/Identity/IdentityServer/ClientStore.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Identity/IdentityServer/ClientStore.cs b/src/Identity/IdentityServer/ClientStore.cs index 1ba8896d4..c9b1595d6 100644 --- a/src/Identity/IdentityServer/ClientStore.cs +++ b/src/Identity/IdentityServer/ClientStore.cs @@ -96,6 +96,17 @@ public class ClientStore : IClientStore return null; } + switch (apiKey) + { + case ServiceAccountApiKeyDetails key: + var org = await _organizationRepository.GetByIdAsync(key.ServiceAccountOrganizationId); + if (!org.UseSecretsManager) + { + return null; + } + break; + } + var client = new Client { ClientId = clientId,