Skip to content

Commit

Permalink
fix: google drive secret to json converstion for ServiceAccountCreden…
Browse files Browse the repository at this point in the history
…tials creation
  • Loading branch information
danielgrittner committed Nov 20, 2024
1 parent 8f91185 commit 02b996d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions admyral/actions/integrations/compliance/google_drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def list_google_docs_revisions(
secret = ctx.get().secrets.get("GOOGLE_DRIVE_SECRET")
secret = GoogleDriveSecret.model_validate(secret)
creds = ServiceAccountCredentials.from_service_account_info(
info=secret, scopes=["https://www.googleapis.com/auth/drive.readonly"]
info=secret.model_dump(),
scopes=["https://www.googleapis.com/auth/drive.readonly"],
)

drive_service = build("drive", "v3", credentials=creds)
Expand Down Expand Up @@ -185,7 +186,7 @@ def list_google_drive_files_with_link_sharing_enabled(
secret = ctx.get().secrets.get("GOOGLE_DRIVE_SECRET")
secret = GoogleDriveSecret.model_validate(secret)
creds = ServiceAccountCredentials.from_service_account_info(
info=secret,
info=secret.model_dump(),
scopes=[
"https://www.googleapis.com/auth/drive.readonly",
"https://www.googleapis.com/auth/admin.directory.user.readonly",
Expand Down

0 comments on commit 02b996d

Please sign in to comment.