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:
Johan Brandhorst-Satzkorn authored and GitHub committed 2022-05-04 11:10:21 -04:00
1 parent 0fb9b35498
commit f69fbf2255
131 files changed
+2329 -1618

No files matched your search

@@ -2,10 +2,11 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the password package.
package controller.storage.auth.oidc.request.v1;
option go_package = "github.com/hashicorp/boundary/internal/auth/oidc/request;request";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/auth/oidc/request;request";
// State represents an oidc request state. State will be marshaled and then
// wrapped with an EncryptedState before that's marshaled and encrypted.
// State used in two legs of the oidc authentication flow.
@@ -2,10 +2,11 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the password package.
package controller.storage.auth.oidc.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/auth/oidc/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/auth/oidc/store;store";
// AuthMethod represents an OIDC auth method.
message AuthMethod {
@@ -22,11 +23,17 @@ message AuthMethod {
// name is optional. If set, it must be unique within scope_id.
// @inject_tag: `gorm:"default:null"`
string name = 40 [(custom_options.v1.mask_mapping) = { this: "Name" that: "name" }];
string name = 40 [(custom_options.v1.mask_mapping) = {
this: "Name"
that: "name"
}];
// description is optional.
// @inject_tag: `gorm:"default:null"`
string description = 50 [(custom_options.v1.mask_mapping) = { this: "Description" that: "description" }];
string description = 50 [(custom_options.v1.mask_mapping) = {
this: "Description"
that: "description"
}];
// The scope_id of the owning scope. Must be set.
// @inject_tag: `gorm:"not_null"`
@@ -54,11 +61,17 @@ message AuthMethod {
// issuer is the OIDC Discovery URL without any .well-known component
// @inject_tag: `gorm:"default:null"`
string issuer = 90 [(custom_options.v1.mask_mapping) = { this: "Issuer" that: "attributes.issuer" }];
string issuer = 90 [(custom_options.v1.mask_mapping) = {
this: "Issuer"
that: "attributes.issuer"
}];
// client_id is the OIDC client identifier
// @inject_tag: `gorm:"not_null"`
string client_id = 100 [(custom_options.v1.mask_mapping) = { this: "ClientId" that: "attributes.client_id" }];
string client_id = 100 [(custom_options.v1.mask_mapping) = {
this: "ClientId"
that: "attributes.client_id"
}];
// ct_client_secret is the encrypted OIDC client secret which is stored in the db.
// @inject_tag: `gorm:"column:client_secret;not_null" wrapping:"ct,client_secret"`
@@ -66,7 +79,10 @@ message AuthMethod {
// client_secret is the unencrypted OIDC client secret which is not stored in the database.
// @inject_tag: `gorm:"-" wrapping:"pt,client_secret"`
string client_secret = 120 [(custom_options.v1.mask_mapping) = { this: "ClientSecret" that: "attributes.client_secret" }];
string client_secret = 120 [(custom_options.v1.mask_mapping) = {
this: "ClientSecret"
that: "attributes.client_secret"
}];
// client_secret_hmac is a sha256-hmac of the unencrypted client_secret that
// is returned from the API for read. It is recalculated everytime the raw
@@ -85,44 +101,65 @@ message AuthMethod {
// should be re-authenticated immediately and would represent the zero value
// for max age based on the oidc spec.
// @inject_tag: `gorm:"default:null"`
int32 max_age = 150 [(custom_options.v1.mask_mapping) = { this: "MaxAge" that: "attributes.max_age" }];
int32 max_age = 150 [(custom_options.v1.mask_mapping) = {
this: "MaxAge"
that: "attributes.max_age"
}];
// api_url is the URLs prefix at which the boundary api is reachable. This value
// is used by the auth method in the different steps of the auth flow.
// @inject_tag: `gorm:"default:null"`
string api_url = 160 [(custom_options.v1.mask_mapping) = { this: "ApiUrl" that: "attributes.api_url_prefix" }];
string api_url = 160 [(custom_options.v1.mask_mapping) = {
this: "ApiUrl"
that: "attributes.api_url_prefix"
}];
// signing_algs are the signing algorithms allowed for an oidc auth method.
// These are Value Objects that will be stored as SigningAlg messages, and are
// operated on as a complete set.
// @inject_tag: `gorm:"-"`
repeated string signing_algs = 170 [(custom_options.v1.mask_mapping) = { this: "SigningAlgs" that: "attributes.signing_algorithms" }];
repeated string signing_algs = 170 [(custom_options.v1.mask_mapping) = {
this: "SigningAlgs"
that: "attributes.signing_algorithms"
}];
// aud_claims are the audience claims for a specific oidc auth method. These
// are Value Objects that will be stored as AudClaim messages, and are
// operatated on as a complete set.
// @inject_tag: `gorm:"-"`
repeated string aud_claims = 180 [(custom_options.v1.mask_mapping) = { this: "AudClaims" that: "attributes.allowed_audiences" }];
repeated string aud_claims = 180 [(custom_options.v1.mask_mapping) = {
this: "AudClaims"
that: "attributes.allowed_audiences"
}];
// certificates are optional PEM encoded x509 certificates that can be
// used as trust anchors when connecting to an OIDC provider. These are Value
// Objects that will be stored as Certificate messages, and are operatated on
// as a complete set.
// @inject_tag: `gorm:"-"`
repeated string certificates = 190 [(custom_options.v1.mask_mapping) = { this: "Certificates" that: "attributes.idp_ca_certs" }];
repeated string certificates = 190 [(custom_options.v1.mask_mapping) = {
this: "Certificates"
that: "attributes.idp_ca_certs"
}];
// claims_scopes are the optional claims scopes a specific oidc auth method.
// These are Value Objects that will be stored as ClaimsScope messages, and
// are operatated on as a complete set.
// @inject_tag: `gorm:"-"`
repeated string claims_scopes = 200 [(custom_options.v1.mask_mapping) = { this: "ClaimsScopes" that: "attributes.claims_scopes" }];
repeated string claims_scopes = 200 [(custom_options.v1.mask_mapping) = {
this: "ClaimsScopes"
that: "attributes.claims_scopes"
}];
// account_claim_maps are optional claim maps from custom claims to the
// standard claims of sub, name and email. These maps are represented as
// key=value where the key equals the from_claim and the value equals the
// to_claim. For example "oid=sub".
// @inject_tag: `gorm:"-"`
repeated string account_claim_maps = 210 [(custom_options.v1.mask_mapping) = { this: "AccountClaimMaps" that: "attributes.account_claim_maps" }];
repeated string account_claim_maps = 210 [(custom_options.v1.mask_mapping) = {
this: "AccountClaimMaps"
that: "attributes.account_claim_maps"
}];
}
// Account represents an OIDC account
@@ -142,11 +179,17 @@ message Account {
// name is optional. If set, it must be unique within scope_id.
// @inject_tag: `gorm:"default:null"`
string name = 40 [(custom_options.v1.mask_mapping) = { this: "Name" that: "name" }];
string name = 40 [(custom_options.v1.mask_mapping) = {
this: "Name"
that: "name"
}];
// description is optional.
// @inject_tag: `gorm:"default:null"`
string description = 50 [(custom_options.v1.mask_mapping) = { this: "Description" that: "description" }];
string description = 50 [(custom_options.v1.mask_mapping) = {
this: "Description"
that: "description"
}];
// @inject_tag: `gorm:"default:null"`
uint32 version = 60;
@@ -276,11 +319,17 @@ message ManagedGroup {
// name is optional. If set, it must be unique within auth_method_id.
// @inject_tag: `gorm:"default:null"`
string name = 40 [(custom_options.v1.mask_mapping) = { this: "Name" that: "name" }];
string name = 40 [(custom_options.v1.mask_mapping) = {
this: "Name"
that: "name"
}];
// description is optional.
// @inject_tag: `gorm:"default:null"`
string description = 50 [(custom_options.v1.mask_mapping) = { this: "Description" that: "description" }];
string description = 50 [(custom_options.v1.mask_mapping) = {
this: "Description"
that: "description"
}];
// @inject_tag: `gorm:"default:null"`
uint32 version = 60;
@@ -291,7 +340,10 @@ message ManagedGroup {
// filter is a go-bexpr filter
// @inject_tag: `gorm:"not_null"`
string filter = 80 [(custom_options.v1.mask_mapping) = { this: "Filter" that: "attributes.filter" }];
string filter = 80 [(custom_options.v1.mask_mapping) = {
this: "Filter"
that: "attributes.filter"
}];
}
// ManagedGroupMemberAccount contains a mapping between a managed group and a
@@ -2,10 +2,11 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the password package.
package controller.storage.auth.password.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/auth/password/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/auth/password/store;store";
// Argon2Configuration is a configuration for using the argon2id key
// derivation function. It is owned by an AuthMethod.
//
@@ -2,10 +2,11 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the password package.
package controller.storage.auth.password.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/auth/password/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/auth/password/store;store";
message AuthMethod {
// @inject_tag: `gorm:"primary_key"`
@@ -21,11 +22,17 @@ message AuthMethod {
// 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"
}];
// The scope_id of the owning scope. Must be set.
// @inject_tag: `gorm:"not_null"`
@@ -38,10 +45,16 @@ message AuthMethod {
string password_conf_id = 8;
// @inject_tag: `gorm:"default:null"`
uint32 min_login_name_length = 9 [(custom_options.v1.mask_mapping) = { this: "MinLoginNameLength" that: "attributes.min_login_name_length" }];
uint32 min_login_name_length = 9 [(custom_options.v1.mask_mapping) = {
this: "MinLoginNameLength"
that: "attributes.min_login_name_length"
}];
// @inject_tag: `gorm:"default:null"`
uint32 min_password_length = 10 [(custom_options.v1.mask_mapping) = { this: "MinPasswordLength" that: "attributes.min_password_length" }];
uint32 min_password_length = 10 [(custom_options.v1.mask_mapping) = {
this: "MinPasswordLength"
that: "attributes.min_password_length"
}];
// is_primary_auth_method is a read-only output field which indicates if the
// auth method is set as the scope's primary auth method.
@@ -63,11 +76,17 @@ message Account {
// 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"
}];
// @inject_tag: `gorm:"default:null"`
uint32 version = 6;
@@ -76,10 +95,13 @@ message Account {
string auth_method_id = 7;
// @inject_tag: `gorm:"not_null"`
string login_name = 8 [(custom_options.v1.mask_mapping) = { this: "LoginName" that: "attributes.login_name" }];
string login_name = 8 [(custom_options.v1.mask_mapping) = {
this: "LoginName"
that: "attributes.login_name"
}];
// the scope_id column is not included here as it is used only to ensure
// data integrity in the database between iam users and auth methods.
// the scope_id column is not included here as it is used only to ensure
// data integrity in the database between iam users and auth methods.
}
message Credential {
@@ -1,6 +1,7 @@
syntax = "proto3";
package controller.storage.auth.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/auth/store;store";
// Account is a "shared table" between the iam, authtoken, and auth
@@ -1,6 +1,7 @@
syntax = "proto3";
package controller.storage.auth.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/auth/store;store";
// TODO - fill out the comments for these protobufs... at this point, I'm just
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.authtoken.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/authtoken/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/authtoken/store;store";
message AuthToken {
// public_id is used to access the auth token via an API
// @inject_tag: gorm:"primary_key"
@@ -64,4 +65,4 @@ message AuthToken {
// database.
// @inject_tag: `gorm:"default:null"`
string status = 15;
}
}
@@ -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.
//
@@ -4,10 +4,11 @@ syntax = "proto3";
// are only used for unit tests and are not part of the rest of the boundary
// domain model
package controller.storage.db.db_test.v1;
option go_package = "github.com/hashicorp/boundary/internal/db/db_test;db_test";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/db/db_test;db_test";
// TestUser for gorm test user model
message StoreTestUser {
// @inject_tag: gorm:"primary_key"
@@ -141,4 +142,4 @@ message StoreTestScooterAccessory {
// @inject_tag: `gorm:"default:null"`
string review = 3;
}
}
@@ -3,10 +3,11 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the plugin host
// package.
package controller.storage.host.plugin.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/host/plugin/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/host/plugin/store;store";
message HostCatalog {
// public_id is a surrogate key suitable for use in a public API.
@@ -23,11 +24,17 @@ message HostCatalog {
// 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"
}];
// The scope_id of the owning scope and must be set.
// @inject_tag: `gorm:"not_null"`
@@ -76,11 +83,17 @@ message HostSet {
// name is optional. If set, it must be unique within
// catalog_id.
// @inject_tag: `gorm:"default:null"`
string name = 6 [(custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
string name = 6 [(custom_options.v1.mask_mapping) = {
this: "name"
that: "name"
}];
// description is optional.
// @inject_tag: `gorm:"default:null"`
string description = 7 [(custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
string description = 7 [(custom_options.v1.mask_mapping) = {
this: "description"
that: "description"
}];
// catalog_id is the public_id of the owning
// plugin_host_catalog and must be set.
@@ -97,11 +110,17 @@ message HostSet {
// preferred_endpoints stores string preference values
// @inject_tag: `gorm:"-"`
repeated string preferred_endpoints = 11 [(custom_options.v1.mask_mapping) = {this:"PreferredEndpoints" that: "preferred_endpoints"}];
repeated string preferred_endpoints = 11 [(custom_options.v1.mask_mapping) = {
this: "PreferredEndpoints"
that: "preferred_endpoints"
}];
// Sync interval is a value representing a duration in seconds
// @inject_tag: `gorm:"default:null"`
int32 sync_interval_seconds = 12 [(custom_options.v1.mask_mapping) = {this: "SyncIntervalSeconds" that: "sync_interval_seconds"}];
int32 sync_interval_seconds = 12 [(custom_options.v1.mask_mapping) = {
this: "SyncIntervalSeconds"
that: "sync_interval_seconds"
}];
}
message HostCatalogSecret {
@@ -3,10 +3,11 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the static host
// package.
package controller.storage.host.static.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/host/static/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/host/static/store;store";
message HostCatalog {
// public_is is a surrogate key suitable for use in a public API.
@@ -23,11 +24,17 @@ message HostCatalog {
// 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"
}];
// The scope_id of the owning scope and must be set.
// @inject_tag: `gorm:"not_null"`
@@ -54,11 +61,17 @@ message Host {
// name is optional. If set, it must be unique within
// catalog_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"
}];
// catalog_id is the public_id of the owning
// static_host_catalog and must be set.
@@ -68,7 +81,10 @@ message Host {
// address is the IP Address or DNS name of the host. It must be set and
// it must be unique within catalog_id.
// @inject_tag: `gorm:"default:null"`
string address = 7 [(custom_options.v1.mask_mapping) = {this:"address" that: "attributes.address"}];
string address = 7 [(custom_options.v1.mask_mapping) = {
this: "address"
that: "attributes.address"
}];
// version allows optimistic locking of the resource
// @inject_tag: `gorm:"default:null"`
@@ -91,11 +107,17 @@ message HostSet {
// name is optional. If set, it must be unique within
// catalog_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"
}];
// catalog_id is the public_id of the owning
// static_host_catalog and must be set.
@@ -122,6 +144,12 @@ message HostSetMember {
// here for the purpose of identifying the mask maps which are on the top level
// api set resource but aren't present in the static host set storage.
message UnimplementedSetFields {
repeated string preferred_endpoints = 11 [(custom_options.v1.mask_mapping) = {this:"PreferredEndpoints" that: "preferred_endpoints"}];
int32 sync_interval_seconds = 22 [(custom_options.v1.mask_mapping) = {this: "SyncIntervalSeconds" that: "sync_interval_seconds"}];
}
repeated string preferred_endpoints = 11 [(custom_options.v1.mask_mapping) = {
this: "PreferredEndpoints"
that: "preferred_endpoints"
}];
int32 sync_interval_seconds = 22 [(custom_options.v1.mask_mapping) = {
this: "SyncIntervalSeconds"
that: "sync_interval_seconds"
}];
}
@@ -2,6 +2,7 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the host package.
package controller.storage.host.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/host/store;store";
message Catalog {
@@ -62,4 +63,4 @@ message DnsName {
// @inject_tag: `gorm:"primary_key"`
string name = 2;
}
}
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.iam.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/iam/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/iam/store;store";
message Group {
// public_id is used to access the Group via an API
@@ -18,11 +19,17 @@ message Group {
// name is the optional friendly name used to
// access the Group via an API
// @inject_tag: `gorm:"default:null"`
string name = 30 [(custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
string name = 30 [(custom_options.v1.mask_mapping) = {
this: "name"
that: "name"
}];
// description of the group
// @inject_tag: `gorm:"default:null"`
string description = 40 [(custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
string description = 40 [(custom_options.v1.mask_mapping) = {
this: "description"
that: "description"
}];
// create_time from the RDBMS
// @inject_tag: `gorm:"default:current_timestamp"`
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.iam.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/iam/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/iam/store;store";
message GroupMemberUser {
// create_time from the RDBMS
// @inject_tag: `gorm:"default:current_timestamp"`
@@ -1,11 +1,11 @@
syntax = "proto3";
package controller.storage.iam.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/iam/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/iam/store;store";
message UserRole {
// create_time from the RDBMS
// @inject_tag: `gorm:"default:current_timestamp"`
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.iam.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/iam/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/iam/store;store";
message Role {
// public_id is used to access the Role via an API
@@ -18,11 +19,17 @@ message Role {
// name is the optional friendly name used to
// access the Role via an API
// @inject_tag: `gorm:"default:null"`
string name = 30 [(custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
string name = 30 [(custom_options.v1.mask_mapping) = {
this: "name"
that: "name"
}];
// description of the role
// @inject_tag: `gorm:"default:null"`
string description = 40 [(custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
string description = 40 [(custom_options.v1.mask_mapping) = {
this: "description"
that: "description"
}];
// create_time from the RDBMS
// @inject_tag: `gorm:"default:current_timestamp"`
@@ -40,5 +47,8 @@ message Role {
// grant_scope_id is used for delegating access; it defines a scope other than
// the role's scope that is used when compiling these grants into an ACL
// @inject_tag: `gorm:"default:null"`
string grant_scope_id = 80 [(custom_options.v1.mask_mapping) = {this:"GrantScopeId" that: "grant_scope_id"}];
string grant_scope_id = 80 [(custom_options.v1.mask_mapping) = {
this: "GrantScopeId"
that: "grant_scope_id"
}];
}
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.iam.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/iam/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/iam/store;store";
message RoleGrant {
// create_time from the RDBMS
// @inject_tag: `gorm:"default:current_timestamp"`
@@ -1,11 +1,12 @@
syntax = "proto3";
package controller.storage.iam.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/iam/store;store";
import "controller/custom_options/v1/options.proto";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/iam/store;store";
message Scope {
// public_id is the used to access the Scope via an API
// @inject_tag: gorm:"primary_key"
@@ -22,7 +23,10 @@ message Scope {
// name is the optional friendly name used to
// access the Scope via an API
// @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"
}];
// Type of scope
string type = 5;
@@ -33,7 +37,10 @@ message Scope {
// description of scope
// @inject_tag: `gorm:"default:null"`
string description = 7 [(custom_options.v1.mask_mapping) = { this: "description" that: "description" }];
string description = 7 [(custom_options.v1.mask_mapping) = {
this: "description"
that: "description"
}];
// version allows optimistic locking of the scope
// @inject_tag: `gorm:"default:null"`
@@ -44,5 +51,8 @@ message Scope {
// method will also be designated as the auth method which can autovivify
// users.
// @inject_tag: `gorm:"default:null"`
string primary_auth_method_id = 20 [(custom_options.v1.mask_mapping) = { this: "PrimaryAuthMethodId" that: "primary_auth_method_id" }];
string primary_auth_method_id = 20 [(custom_options.v1.mask_mapping) = {
this: "PrimaryAuthMethodId"
that: "primary_auth_method_id"
}];
}
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.iam.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/iam/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/iam/store;store";
message User {
// public_id is used to access the User via an API
@@ -18,11 +19,17 @@ message User {
// name is the optional friendly name used to
// access the User via an API
// @inject_tag: `gorm:"default:null"`
string name = 30 [(custom_options.v1.mask_mapping) = { this: "name" that: "name" }];
string name = 30 [(custom_options.v1.mask_mapping) = {
this: "name"
that: "name"
}];
// description of the user
// @inject_tag: `gorm:"default:null"`
string description = 40 [(custom_options.v1.mask_mapping) = { this: "description" that: "description" }];
string description = 40 [(custom_options.v1.mask_mapping) = {
this: "description"
that: "description"
}];
// create_time from the RDBMS
// @inject_tag: `gorm:"default:current_timestamp"`
@@ -55,4 +62,4 @@ message User {
// public_id from the scope's primary auth method
// @inject_tag: `gorm:"->"`
string primary_account_id = 120 [json_name = "primary_account_id"];
}
}
@@ -2,10 +2,11 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the job package.
package controller.storage.job.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/scheduler/job/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/scheduler/job/store;store";
message Job {
// plugin_id is the primary key of the plugin that registered and owns the job
// @inject_tag: `gorm:"primary_key"`
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.kms.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
message AuditKey {
// private_id is used to access the key via an API
// @inject_tag: gorm:"primary_key"
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.kms.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
message DatabaseKey {
// private_id is used to access the key via an API
// @inject_tag: gorm:"primary_key"
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.kms.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
message OidcKey {
// private_id is used to access the key via an API
// @inject_tag: gorm:"primary_key"
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.kms.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
message OplogKey {
// private_id is used to access the key via an API
// @inject_tag: gorm:"primary_key"
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.kms.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
message RootKey {
// private_id is used to access the root key via an API
// @inject_tag: gorm:"primary_key"
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.kms.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
message SessionKey {
// private_id is used to access the key via an API
// @inject_tag: gorm:"primary_key"
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.kms.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/kms/store;store";
message TokenKey {
// private_id is used to access the key via an API
// @inject_tag: gorm:"primary_key"
@@ -2,10 +2,11 @@ syntax = "proto3";
// define an oplog package within the boundary controller
package controller.storage.oplog.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/oplog/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/oplog/store;store";
// Entry provides a message for oplog entries that's compatible with gorm
message Entry {
// @inject_tag: gorm:"primary_key"
@@ -43,6 +44,7 @@ message Metadata {
timestamp.v1.Timestamp create_time = 2;
// @inject_tag: gorm:"not_nul
uint32 entry_id = 3;
// @inject_tag: gorm:"foreignkey:EntryId"
Entry entry = 4;
@@ -2,6 +2,7 @@ syntax = "proto3";
// define a test proto package
package controller.storage.oplog.test.v1;
option go_package = "github.com/hashicorp/boundary/internal/oplog/oplog_test;oplog_test";
// TestUser for gorm test user model
@@ -40,4 +41,4 @@ message TestNonReplayableUser {
string name = 4;
string phone_number = 5;
string email = 6;
}
}
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.oplog.v1;
import "google/protobuf/field_mask.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
package controller.storage.oplog.v1;
option go_package = "github.com/hashicorp/boundary/internal/oplog;oplog";
// OpType provides the type of database operation the Any message represents
@@ -82,7 +83,7 @@ message WithOnConflict {
// columns are the on conflict columns
Columns columns = 11;
};
}
// action defines the on conflict action
oneof action {
@@ -94,7 +95,7 @@ message WithOnConflict {
// column_values defines on conflict action with the columns to update
ColumnValues column_values = 52;
};
}
}
// Columns defines a set of column properties
@@ -113,7 +114,7 @@ message ColumnValue {
google.protobuf.Value raw = 2;
ExprValue expr_value = 3;
Column column = 4;
};
}
}
// ColumnValues defines a set of column value properies
@@ -137,4 +138,4 @@ message Column {
string name = 1;
// table name of the column
string table = 2;
}
}
@@ -2,10 +2,11 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the host package.
package controller.storage.plugin.host.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/plugin/host/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/plugin/host/store;store";
message Plugin {
// public_id is a surrogate key suitable for use in a public API.
@@ -22,11 +23,17 @@ message Plugin {
// 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 = 50 [(custom_options.v1.mask_mapping) = {this:"Description" that: "description"}];
string description = 50 [(custom_options.v1.mask_mapping) = {
this: "Description"
that: "description"
}];
// The scope_id of the owning scope and must be set.
// @inject_tag: `gorm:"not_null"`
@@ -34,4 +41,4 @@ message Plugin {
// @inject_tag: `gorm:"default:null"`
uint32 version = 70;
}
}
@@ -2,6 +2,7 @@ syntax = "proto3";
// Package store provides protobufs for storing types in the host package.
package controller.storage.plugin.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/plugin/store;store";
// This is a typeless plugin. In practice this should never be used directly.
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.target.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/target/store;store";
import "controller/storage/timestamp/v1/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/target/store;store";
// TargetView is a view that contains all the target subtypes
message TargetView {
// public_id is used to access the Target via an API
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.target.targettest.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/target/targettest/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/target/targettest/store;store";
message Target {
// public_id is used to access the targettest.Target via an API
@@ -18,8 +19,10 @@ message Target {
// name is the optional friendly name used to
// access the targettest.Target via an API
// @inject_tag: `gorm:"default:null"`
string name = 30
[(custom_options.v1.mask_mapping) = { this: "name" that: "name" }];
string name = 30 [(custom_options.v1.mask_mapping) = {
this: "name"
that: "name"
}];
// description of the targettest.Target
// @inject_tag: `gorm:"default:null"`
@@ -69,5 +72,3 @@ message Target {
that: "worker_filter"
}];
}
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.target.tcp.store.v1;
option go_package = "github.com/hashicorp/boundary/internal/target/tcp/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/target/tcp/store;store";
message Target {
// public_id is used to access the tcp.Target via an API
@@ -18,8 +19,10 @@ message Target {
// name is the optional friendly name used to
// access the tcp.Target via an API
// @inject_tag: `gorm:"default:null"`
string name = 30
[(custom_options.v1.mask_mapping) = { this: "name" that: "name" }];
string name = 30 [(custom_options.v1.mask_mapping) = {
this: "name"
that: "name"
}];
// description of the tcp.Target
// @inject_tag: `gorm:"default:null"`
@@ -69,4 +72,3 @@ message Target {
that: "worker_filter"
}];
}
@@ -1,10 +1,11 @@
syntax = "proto3";
package controller.storage.timestamp.v1;
option go_package = "github.com/hashicorp/boundary/internal/db/timestamp;timestamp";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/internal/db/timestamp;timestamp";
// Timestamp for storage messages. We've defined a new local type wrapper
// of google.protobuf.Timestamp so we can implement sql.Scanner and sql.Valuer
// interfaces. See: