Convert SDK to the new options API (#238)
This commit is contained in:
1 parent
b5acf6afdf
commit
908a299ea3
162 files changed
+6440
-5891
No files matched your search
@@ -0,0 +1,56 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.api.resources.authmethods.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api/resources/authmethods;authmethods";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
import "controller/api/resources/scopes/v1/scope.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
|
||||
// Account contains all fields related to an auth Account resource
|
||||
message Account {
|
||||
// The ID of the Account
|
||||
// Output only.
|
||||
string id = 1;
|
||||
|
||||
// Scope information for this resource
|
||||
// Output only.
|
||||
resources.scopes.v1.ScopeInfo scope = 2;
|
||||
|
||||
// The auth method this account is created for.
|
||||
// Output only.
|
||||
string auth_method_id = 3 [json_name="auth_method_id"];
|
||||
|
||||
// Optional name for identification purposes
|
||||
google.protobuf.StringValue name = 4 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
|
||||
|
||||
// Optional user-set descripton for identification purposes
|
||||
google.protobuf.StringValue description = 5 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
|
||||
|
||||
// The time this resource was created
|
||||
// Output only.
|
||||
google.protobuf.Timestamp created_time = 6 [json_name="created_time"];
|
||||
|
||||
// The time this resource was last updated.
|
||||
// Output only.
|
||||
google.protobuf.Timestamp updated_time = 7 [json_name="updated_time"];
|
||||
|
||||
// Whether the resource is disabled
|
||||
google.protobuf.BoolValue disabled = 8 [(custom_options.v1.generate_sdk_option) = true];
|
||||
|
||||
// The type of this account. Possible values are: "password", "oidc".
|
||||
string type = 9;
|
||||
|
||||
// The attributes that are applicable for the specific Account type.
|
||||
google.protobuf.Struct attributes = 10 [(custom_options.v1.generate_sdk_option) = true];
|
||||
}
|
||||
|
||||
message PasswordAccountAttributes {
|
||||
// The username of this account. This is unique per auth method.
|
||||
string username = 1 [(custom_options.v1.generate_sdk_option) = true];
|
||||
// The password for this account.
|
||||
google.protobuf.StringValue password = 2 [(custom_options.v1.generate_sdk_option) = true];
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.api.resources.authmethods.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api/resources/authmethods;authmethods";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
import "controller/api/resources/scopes/v1/scope.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
|
||||
// AuthMethod contains all fields related to a AuthMethod resource
|
||||
message AuthMethod {
|
||||
// The ID of the AuthMethod
|
||||
// Output only.
|
||||
string id = 1;
|
||||
|
||||
// Scope information for this resource
|
||||
// Output only.
|
||||
resources.scopes.v1.ScopeInfo scope = 2;
|
||||
|
||||
// Optional name for identification purposes
|
||||
google.protobuf.StringValue name = 3 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
|
||||
|
||||
// Optional user-set descripton for identification purposes
|
||||
google.protobuf.StringValue description = 4 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
|
||||
|
||||
// The time this resource was created
|
||||
// Output only.
|
||||
google.protobuf.Timestamp created_time = 5 [json_name="created_time"];
|
||||
|
||||
// The time this resource was last updated.
|
||||
// Output only.
|
||||
google.protobuf.Timestamp updated_time = 6 [json_name="updated_time"];
|
||||
|
||||
// The auth method type. This can be "password" or "oidc".
|
||||
string type = 7 [(custom_options.v1.generate_sdk_option) = true];
|
||||
|
||||
// The attributes that are applied for the specific Auth Method type.
|
||||
google.protobuf.Struct attributes = 8 [(custom_options.v1.generate_sdk_option) = true];
|
||||
}
|
||||
|
||||
message PasswordAuthMethodAttributes {
|
||||
// The minimum length allowed for user names for accounts in this auth method.
|
||||
uint32 min_user_name_length = 1 [(custom_options.v1.generate_sdk_option) = true];
|
||||
|
||||
// The minimum length allowed for passwords for accounts in this auth method.
|
||||
uint32 min_password_length = 2 [(custom_options.v1.generate_sdk_option) = true];
|
||||
}
|
||||
Reference in new issue
Block a user