Skip to content

Commit 16cac4d

Browse files
authored
feat(s2s_vpn): use secret manager to store connection psk (scaleway#2795)
1 parent b2f0c2c commit 16cac4d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

api/s2s_vpn/v1alpha1/s2s_vpn_sdk.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,12 @@ type Connection struct {
680680
// Default value: unknown_initiation_policy
681681
InitiationPolicy ConnectionInitiationPolicy `json:"initiation_policy"`
682682

683+
// SecretID: ID of the secret in Secret Manager which contains the PSK.
684+
SecretID string `json:"secret_id"`
685+
686+
// SecretRevision: version number of the secret in Secret Manager which contains the PSK.
687+
SecretRevision uint32 `json:"secret_revision"`
688+
683689
// Ikev2Ciphers: list of IKE v2 ciphers proposed for the IPsec tunnel.
684690
Ikev2Ciphers []*ConnectionCipher `json:"ikev2_ciphers"`
685691

@@ -917,8 +923,8 @@ type CreateConnectionResponse struct {
917923
// Connection: this connection.
918924
Connection *Connection `json:"connection"`
919925

920-
// PreSharedKey: new PSK generated for this connection.
921-
PreSharedKey string `json:"pre_shared_key"`
926+
// Deprecated: PreSharedKey: deprecated, use secret_id & secret_revision fields.
927+
PreSharedKey *string `json:"pre_shared_key,omitempty"`
922928
}
923929

924930
// CreateCustomerGatewayRequest: create customer gateway request.
@@ -1404,8 +1410,8 @@ type RenewConnectionPskResponse struct {
14041410
// Connection: this connection.
14051411
Connection *Connection `json:"connection"`
14061412

1407-
// PreSharedKey: new PSK generated for this connection.
1408-
PreSharedKey string `json:"pre_shared_key"`
1413+
// Deprecated: PreSharedKey: deprecated, use secret_id & secret_revision fields.
1414+
PreSharedKey *string `json:"pre_shared_key,omitempty"`
14091415
}
14101416

14111417
// SetRoutingPolicyRequest: set routing policy request.

0 commit comments

Comments
 (0)