1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00

Add check for org SM flag in client store (#3007)

This commit is contained in:
Thomas Avery 2023-06-16 12:24:41 -05:00 committed by GitHub
parent c4614bfb3d
commit ca7ced4e43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,