Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [alloydb] Add new field in GenerateClientCertificate v1 API to allow AlloyDB connectors request client certs with metadata exchange support #4785

Merged
merged 4 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ message Cluster {
// instance IPs for this cluster will be created in the allocated range. The
// range name must comply with RFC 1035. Specifically, the name must be 1-63
// characters long and match the regular expression
// [a-z]([-a-z0-9]*[a-z0-9])?.
// Field name is intended to be consistent with CloudSQL.
// `[a-z]([-a-z0-9]*[a-z0-9])?`.
// Field name is intended to be consistent with Cloud SQL.
string allocated_ip_range = 2 [(google.api.field_behavior) = OPTIONAL];
}

Expand Down Expand Up @@ -835,7 +835,8 @@ message Instance {
// Configuration for query insights.
QueryInsightsInstanceConfig query_insights_config = 21;

// Read pool specific config.
// Read pool instance configuration.
// This is required if the value of instanceType is READ_POOL.
ReadPoolConfig read_pool_config = 14;

// Output only. The IP address for the Instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,11 @@ message GenerateClientCertificateRequest {

// Optional. The public key from the client.
string public_key = 5 [(google.api.field_behavior) = OPTIONAL];

// Optional. An optional hint to the endpoint to generate a client
// ceritificate that can be used by AlloyDB connectors to exchange additional
// metadata with the server after TLS handshake.
bool use_metadata_exchange = 6 [(google.api.field_behavior) = OPTIONAL];
}

// Message returned by a GenerateClientCertificate operation.
Expand Down
6 changes: 6 additions & 0 deletions packages/google-cloud-alloydb/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions packages/google-cloud-alloydb/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions packages/google-cloud-alloydb/protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ function main(parent) {
* Optional. The public key from the client.
*/
// const publicKey = 'abc123'
/**
* Optional. An optional hint to the endpoint to generate a client
* ceritificate that can be used by AlloyDB connectors to exchange additional
* metadata with the server after TLS handshake.
*/
// const useMetadataExchange = true

// Imports the Alloydb library
const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@
"segments": [
{
"start": 25,
"end": 80,
"end": 86,
"type": "FULL"
}
],
Expand All @@ -1310,6 +1310,10 @@
{
"name": "public_key",
"type": "TYPE_STRING"
},
{
"name": "use_metadata_exchange",
"type": "TYPE_BOOL"
}
],
"resultType": ".google.cloud.alloydb.v1.GenerateClientCertificateResponse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,10 @@ export class AlloyDBAdminClient {
* default duration.
* @param {string} [request.publicKey]
* Optional. The public key from the client.
* @param {boolean} [request.useMetadataExchange]
* Optional. An optional hint to the endpoint to generate a client
* ceritificate that can be used by AlloyDB connectors to exchange additional
* metadata with the server after TLS handshake.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
Expand Down