Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit a5b394f

Browse files
feat: Checksums in Secret Manager (#335)
Users can now use checksums for data integrity assurance when adding and accessing SecretVersions. PiperOrigin-RevId: 425369494 Source-Link: googleapis/googleapis@70d389c Source-Link: https://github.com/googleapis/googleapis-gen/commit/cf9290568284d2f099b9a00cc82a2a133be6dfda Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2Y5MjkwNTY4Mjg0ZDJmMDk5YjlhMDBjYzgyYTJhMTMzYmU2ZGZkYSJ9 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent cd4dc28 commit a5b394f

File tree

4 files changed

+1361
-1234
lines changed

4 files changed

+1361
-1234
lines changed

protos/google/cloud/secretmanager/v1/resources.proto

+18-1
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ syntax = "proto3";
1616

1717
package google.cloud.secretmanager.v1;
1818

19+
import "google/api/annotations.proto";
1920
import "google/api/field_behavior.proto";
2021
import "google/api/resource.proto";
2122
import "google/protobuf/duration.proto";
2223
import "google/protobuf/timestamp.proto";
23-
import "google/api/annotations.proto";
2424

2525
option cc_enable_arenas = true;
2626
option csharp_namespace = "Google.Cloud.SecretManager.V1";
@@ -147,6 +147,11 @@ message SecretVersion {
147147

148148
// Output only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
149149
string etag = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
150+
151+
// Output only. True if payload checksum specified in [SecretPayload][google.cloud.secretmanager.v1.SecretPayload] object has been
152+
// received by [SecretManagerService][google.cloud.secretmanager.v1.SecretManagerService] on
153+
// [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion].
154+
bool client_specified_payload_checksum = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
150155
}
151156

152157
// A policy that defines the replication and encryption configuration of data.
@@ -313,4 +318,16 @@ message Rotation {
313318
message SecretPayload {
314319
// The secret data. Must be no larger than 64KiB.
315320
bytes data = 1;
321+
322+
// Optional. If specified, [SecretManagerService][google.cloud.secretmanager.v1.SecretManagerService] will verify the integrity of the
323+
// received [data][google.cloud.secretmanager.v1.SecretPayload.data] on [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion] calls using
324+
// the crc32c checksum and store it to include in future
325+
// [SecretManagerService.AccessSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion] responses. If a checksum is
326+
// not provided in the [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion] request, the
327+
// [SecretManagerService][google.cloud.secretmanager.v1.SecretManagerService] will generate and store one for you.
328+
//
329+
// The CRC32C value is encoded as a Int64 for compatibility, and can be
330+
// safely downconverted to uint32 in languages that support this type.
331+
// https://cloud.google.com/apis/design/design_patterns#integer_types
332+
optional int64 data_crc32c = 2 [(google.api.field_behavior) = OPTIONAL];
316333
}

0 commit comments

Comments
 (0)