reduce scopes to gke container api

Signed-off-by: Raghunandan Balachandran <raghunandan@spotify.com>
This commit is contained in:
Raghunandan Balachandran
2025-08-11 17:39:12 +02:00
parent 01d7a497aa
commit c005fbb3dc
2 changed files with 2 additions and 2 deletions
@@ -100,7 +100,7 @@ describe('GoogleServiceAccountStrategy', () => {
expect(MockedClusterManagerClient).toHaveBeenCalledWith({
credentials: serviceAccountKey,
scopes: ['https://www.googleapis.com/auth/cloud-platform'],
scopes: ['https://www.googleapis.com/auth/container.readonly'],
});
expect(mockGetAccessToken).toHaveBeenCalled();
expect(credential).toEqual({
@@ -65,7 +65,7 @@ export class GoogleServiceAccountStrategy implements AuthenticationStrategy {
client = new container.v1.ClusterManagerClient({
credentials: credentialsObject,
scopes: ['https://www.googleapis.com/auth/cloud-platform'],
scopes: ['https://www.googleapis.com/auth/container.readonly'],
});
} catch (error) {
throw new Error(