feat(proto): Format protobuf files with buf (#2033)
Formats all protobuf files with buf format. This ensures a consistent style across all our protobuf files, similar to gofumpt.
This commit is contained in:
1 parent
0fb9b35498
commit
f69fbf2255
131 files changed
+2329
-1618
No files matched your search
@@ -2,6 +2,7 @@ syntax = "proto3";
|
||||
|
||||
// Package store provides protobufs for storing types in the credential package.
|
||||
package controller.storage.credential.store.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/credential/store;store";
|
||||
|
||||
message Store {
|
||||
|
||||
@@ -3,10 +3,11 @@ syntax = "proto3";
|
||||
// Package store provides protobufs for storing types in the vault
|
||||
// credential package.
|
||||
package controller.storage.credential.vault.store.v1;
|
||||
option go_package = "github.com/hashicorp/boundary/internal/credential/vault/store;store";
|
||||
|
||||
import "controller/storage/timestamp/v1/timestamp.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "controller/storage/timestamp/v1/timestamp.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/credential/vault/store;store";
|
||||
|
||||
message CredentialStore {
|
||||
// public_id is a surrogate key suitable for use in a public API.
|
||||
@@ -27,11 +28,17 @@ message CredentialStore {
|
||||
|
||||
// name is optional. If set, it must be unique within scope_id.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string name = 5 [(custom_options.v1.mask_mapping) = {this:"Name" that: "name"}];
|
||||
string name = 5 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Name"
|
||||
that: "name"
|
||||
}];
|
||||
|
||||
// description is optional.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string description = 6 [(custom_options.v1.mask_mapping) = {this:"Description" that: "description"}];
|
||||
string description = 6 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Description"
|
||||
that: "description"
|
||||
}];
|
||||
|
||||
// The scope_id of the owning scope.
|
||||
// It must be set.
|
||||
@@ -46,30 +53,45 @@ message CredentialStore {
|
||||
// complete URL.
|
||||
// It must be set.
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
string vault_address = 9 [(custom_options.v1.mask_mapping) = {this:"VaultAddress" that: "attributes.address"}];
|
||||
string vault_address = 9 [(custom_options.v1.mask_mapping) = {
|
||||
this: "VaultAddress"
|
||||
that: "attributes.address"
|
||||
}];
|
||||
|
||||
// namespace is the vault namespace the credential store should use.
|
||||
// It is optional.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string namespace = 10 [(custom_options.v1.mask_mapping) = {this:"Namespace" that: "attributes.namespace"}];
|
||||
string namespace = 10 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Namespace"
|
||||
that: "attributes.namespace"
|
||||
}];
|
||||
|
||||
// ca_cert is a single PEM-encoded CA certificate to verify the Vault
|
||||
// server's SSL certificate.
|
||||
// It is optional.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
bytes ca_cert = 11 [(custom_options.v1.mask_mapping) = {this:"CaCert" that: "attributes.ca_cert"}];
|
||||
bytes ca_cert = 11 [(custom_options.v1.mask_mapping) = {
|
||||
this: "CaCert"
|
||||
that: "attributes.ca_cert"
|
||||
}];
|
||||
|
||||
// tls_server_name is the name to use as the SNI host when connecting to
|
||||
// Vault via TLS.
|
||||
// It is optional.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string tls_server_name = 12 [(custom_options.v1.mask_mapping) = {this:"TlsServerName" that: "attributes.tls_server_name"}];
|
||||
string tls_server_name = 12 [(custom_options.v1.mask_mapping) = {
|
||||
this: "TlsServerName"
|
||||
that: "attributes.tls_server_name"
|
||||
}];
|
||||
|
||||
// tls_skip_verify disables verification of TLS certificates. Using this
|
||||
// option is highly discouraged as it decreases the security of data
|
||||
// transmissions to and from the Vault server.
|
||||
// @inject_tag: `gorm:"default:false"`
|
||||
bool tls_skip_verify = 13 [(custom_options.v1.mask_mapping) = {this:"TlsSkipVerify" that: "attributes.tls_skip_verify"}];
|
||||
bool tls_skip_verify = 13 [(custom_options.v1.mask_mapping) = {
|
||||
this: "TlsSkipVerify"
|
||||
that: "attributes.tls_skip_verify"
|
||||
}];
|
||||
}
|
||||
|
||||
message Token {
|
||||
@@ -81,7 +103,10 @@ message Token {
|
||||
// token is the plain-text of the token data. We are not storing this
|
||||
// plain-text token in the database.
|
||||
// @inject_tag: `gorm:"-" wrapping:"pt,token_data"`
|
||||
bytes token = 2 [(custom_options.v1.mask_mapping) = {this:"Token" that: "attributes.token"}];
|
||||
bytes token = 2 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Token"
|
||||
that: "attributes.token"
|
||||
}];
|
||||
|
||||
// ct_token is the ciphertext of the token data. It is stored in the database.
|
||||
// @inject_tag: `gorm:"column:token;not_null" wrapping:"ct,token_data"`
|
||||
@@ -137,12 +162,18 @@ message ClientCertificate {
|
||||
// certificate is the PEM encoded certificate.
|
||||
// It must be set.
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
bytes certificate = 2 [(custom_options.v1.mask_mapping) = {this:"Certificate" that: "attributes.client_certificate"}];
|
||||
bytes certificate = 2 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Certificate"
|
||||
that: "attributes.client_certificate"
|
||||
}];
|
||||
|
||||
// certificate_key is the plain-text of the certificate key data. We are
|
||||
// not storing this plain-text key in the database.
|
||||
// @inject_tag: `gorm:"-" wrapping:"pt,certificate_key_data"`
|
||||
bytes certificate_key = 3 [(custom_options.v1.mask_mapping) = {this:"CertificateKey" that: "attributes.client_certificate_key"}];
|
||||
bytes certificate_key = 3 [(custom_options.v1.mask_mapping) = {
|
||||
this: "CertificateKey"
|
||||
that: "attributes.client_certificate_key"
|
||||
}];
|
||||
|
||||
// ct_certificate_key is the ciphertext of the certificate key data. It
|
||||
// is stored in the database.
|
||||
@@ -176,11 +207,17 @@ message CredentialLibrary {
|
||||
|
||||
// name is optional. If set, it must be unique within scope_id.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string name = 4 [(custom_options.v1.mask_mapping) = {this:"Name" that: "name"}];
|
||||
string name = 4 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Name"
|
||||
that: "name"
|
||||
}];
|
||||
|
||||
// description is optional.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string description = 5 [(custom_options.v1.mask_mapping) = {this:"Description" that: "description"}];
|
||||
string description = 5 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Description"
|
||||
that: "description"
|
||||
}];
|
||||
|
||||
// store_id of the owning vault credential store.
|
||||
// It must be set.
|
||||
@@ -194,17 +231,26 @@ message CredentialLibrary {
|
||||
// vault_path is the path in Vault to request credentials from.
|
||||
// It must be set.
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
string vault_path = 8 [(custom_options.v1.mask_mapping) = {this:"VaultPath" that: "attributes.path"}];
|
||||
string vault_path = 8 [(custom_options.v1.mask_mapping) = {
|
||||
this: "VaultPath"
|
||||
that: "attributes.path"
|
||||
}];
|
||||
|
||||
// The HTTP method the library uses to communicate with Vault.
|
||||
// It must be set. Can only be GET or POST.
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
string http_method = 9 [(custom_options.v1.mask_mapping) = {this:"HttpMethod" that: "attributes.http_method"}];
|
||||
string http_method = 9 [(custom_options.v1.mask_mapping) = {
|
||||
this: "HttpMethod"
|
||||
that: "attributes.http_method"
|
||||
}];
|
||||
|
||||
// The body of the HTTP request the library sends to Vault.
|
||||
// Can only be set if http_method is POST.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
bytes http_request_body = 10 [(custom_options.v1.mask_mapping) = {this:"HttpRequestBody" that: "attributes.http_request_body"}];
|
||||
bytes http_request_body = 10 [(custom_options.v1.mask_mapping) = {
|
||||
this: "HttpRequestBody"
|
||||
that: "attributes.http_request_body"
|
||||
}];
|
||||
|
||||
// credential_type is optional. If set, it indicates the type of
|
||||
// credential the library returns.
|
||||
@@ -273,13 +319,13 @@ message Credential {
|
||||
string status = 12;
|
||||
}
|
||||
|
||||
message UserPasswordOverride {
|
||||
message UserPasswordOverride {
|
||||
// library_id of the owning vault credential library.
|
||||
// @inject_tag: `gorm:"primary_key"`
|
||||
string library_id = 1;
|
||||
|
||||
// username_attribute is the name of the attribute in the Data field of a
|
||||
// Vault api.Secret that maps to a username.
|
||||
// Vault api.Secret that maps to a username.
|
||||
// If set, it overrides any default attribute names the system uses to
|
||||
// find a username attribute.
|
||||
//
|
||||
@@ -289,7 +335,7 @@ message UserPasswordOverride {
|
||||
string username_attribute = 2;
|
||||
|
||||
// password_attribute is the name of the attribute in the Data field of a
|
||||
// Vault api.Secret that maps to a password.
|
||||
// Vault api.Secret that maps to a password.
|
||||
// If set, it overrides any default attribute names the system uses to
|
||||
// find a password attribute.
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user