Skip to content

[Server] Replace the service account key of a GCP storage credential #2275

Open

Description

@timothyw553

Part of #47.

A storage credential made from a Google Cloud service account key (gcp_service_account_key, added in #2260) cannot have its key replaced. UpdateCredentialRequest has no gcp_service_account_key field, and credential update rejects aws_iam_role and s3_compatible on such a credential.

So rotating the key means deleting the credential and every external location that uses it, then creating them again. Google recommends rotating service account keys regularly, and a key that was disabled or leaked has to be replaced.

Wanted: credential update --name <name> --gcp_service_account_key_file <new key.json> replaces the stored key. The new key goes through the same checks and the same encryption as on create. The credential keeps its id, so its external locations and permissions stay.

updateCredential in api/all.yaml already says an update replaces the stored credential as a whole, so the new key object should be required in full, as s3_compatible is.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions