Migrate credential-library nomenclature around targets to credential-source (#1413)
See the CHANGELOG entry for more information. Co-authored-by: Jim <jlambert@hashicorp.com> Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
This commit is contained in:
36 files changed
+3284
-673
No files matched your search
@@ -164,8 +164,9 @@ service TargetService {
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Adds existing Credential Libraries to a Target."
|
||||
summary: "Deprecated: use AddTargetCredentialSources instead."
|
||||
};
|
||||
option deprecated = true;
|
||||
}
|
||||
|
||||
// SetTargetCredentialLibraries sets the Target's Credential Libraries.
|
||||
@@ -182,8 +183,9 @@ service TargetService {
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Sets the Credential Libraries on the Target."
|
||||
summary: "Deprecated: use SetTargetCredentialSources instead."
|
||||
};
|
||||
option deprecated = true;
|
||||
}
|
||||
|
||||
// RemoveTargetCredentialLibraries removes the Credential Libraries from the
|
||||
@@ -199,10 +201,64 @@ service TargetService {
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Removes Credential Libraries from the Target."
|
||||
summary: "Deprecated: use RemoveTargetCredentialSources instead."
|
||||
};
|
||||
option deprecated = true;
|
||||
}
|
||||
|
||||
// AddTargetCredentialSources adds Credential Sources to this Target.
|
||||
// The provided request must include the Target ID to which the Credential
|
||||
// Sources will be added. All Credential Sources added to the provided
|
||||
// Target must be a child of a Store that is in the same scope as this
|
||||
// Target. If the scope or Target IDs are missing, malformed, or reference
|
||||
// non-existing resources, an error is returned. An error is returned if a
|
||||
// Credential Source is attempted to be added to a target that is already
|
||||
// present on the Target.
|
||||
rpc AddTargetCredentialSources(AddTargetCredentialSourcesRequest) returns (AddTargetCredentialSourcesResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/targets/{id}:add-credential-sources"
|
||||
body: "*"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Adds existing Credential Sources to a Target."
|
||||
};
|
||||
}
|
||||
|
||||
// SetTargetCredentialSources sets the Target's Credential Sources.
|
||||
// Any existing Credential Sources on the Target are deleted if they are
|
||||
// not included in this request. The provided request must include the scope,
|
||||
// and the Target ID on which the Credential Sources will be set. All
|
||||
// Credential Sources in the request must be a child of a Store that is
|
||||
// in the same scope as the provided Target. If any IDs are missing,
|
||||
// malformed, or references a non-existing resource, an error is returned.
|
||||
rpc SetTargetCredentialSources(SetTargetCredentialSourcesRequest) returns (SetTargetCredentialSourcesResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/targets/{id}:set-credential-sources"
|
||||
body: "*"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Sets the Credential Sources on the Target."
|
||||
};
|
||||
}
|
||||
|
||||
// RemoveTargetCredentialSources removes the Credential Sources from the
|
||||
// specified Target. The provided request must include the Target ID for the
|
||||
// Target from which the Credential Sources will be removed. If the ID is
|
||||
// missing, or malformed, an error is returned. An error is returned if a
|
||||
// Credential Source is attempted to be removed from the Target when the
|
||||
// Target does not have the Credential Source.
|
||||
rpc RemoveTargetCredentialSources(RemoveTargetCredentialSourcesRequest) returns (RemoveTargetCredentialSourcesResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/targets/{id}:remove-credential-sources"
|
||||
body: "*"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Removes Credential Sources from the Target."
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message GetTargetRequest {
|
||||
@@ -290,9 +346,6 @@ message AddTargetCredentialLibrariesRequest {
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2;
|
||||
repeated string application_credential_library_ids = 3 [json_name="application_credential_library_ids"];
|
||||
// TODO: Uncomment when we support more purposes beyond application
|
||||
// repeated string egress_credential_library_ids = 4 [json_name="egress_credential_library_ids"];
|
||||
// repeated string ingress_credential_library_ids = 5 [json_name="ingress_credential_library_ids"];
|
||||
}
|
||||
|
||||
message AddTargetCredentialLibrariesResponse {
|
||||
@@ -308,9 +361,6 @@ message SetTargetCredentialLibrariesRequest {
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2;
|
||||
repeated string application_credential_library_ids = 3 [json_name="application_credential_library_ids"];
|
||||
// TODO: Uncomment when we support more purposes beyond application
|
||||
// repeated string egress_credential_library_ids = 4 [json_name="egress_credential_library_ids"];
|
||||
// repeated string ingress_credential_library_ids = 5 [json_name="ingress_credential_library_ids"];
|
||||
}
|
||||
|
||||
message SetTargetCredentialLibrariesResponse {
|
||||
@@ -323,15 +373,51 @@ message RemoveTargetCredentialLibrariesRequest {
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2;
|
||||
repeated string application_credential_library_ids = 3 [json_name="application_credential_library_ids"];
|
||||
// TODO: Uncomment when we support more purposes beyond application
|
||||
// repeated string egress_credential_library_ids = 4 [json_name="egress_credential_library_ids"];
|
||||
// repeated string ingress_credential_library_ids = 5 [json_name="ingress_credential_library_ids"];
|
||||
}
|
||||
|
||||
message RemoveTargetCredentialLibrariesResponse {
|
||||
api.resources.targets.v1.Target item = 1;
|
||||
}
|
||||
|
||||
message AddTargetCredentialSourcesRequest {
|
||||
string id = 1;
|
||||
// Version is used to ensure this resource has not changed.
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2;
|
||||
repeated string application_credential_source_ids = 3 [json_name="application_credential_source_ids"];
|
||||
}
|
||||
|
||||
message AddTargetCredentialSourcesResponse {
|
||||
api.resources.targets.v1.Target item = 1;
|
||||
}
|
||||
|
||||
// Sets the values for application_credential_source_ids. If any
|
||||
// credential_source_id field that is not set in the request will result in
|
||||
// those fields being cleared.
|
||||
message SetTargetCredentialSourcesRequest {
|
||||
string id = 1;
|
||||
// Version is used to ensure this resource has not changed.
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2;
|
||||
repeated string application_credential_source_ids = 3 [json_name="application_credential_source_ids"];
|
||||
}
|
||||
|
||||
message SetTargetCredentialSourcesResponse {
|
||||
api.resources.targets.v1.Target item = 1;
|
||||
}
|
||||
|
||||
message RemoveTargetCredentialSourcesRequest {
|
||||
string id = 1;
|
||||
// Version is used to ensure this resource has not changed.
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2;
|
||||
repeated string application_credential_source_ids = 3 [json_name="application_credential_source_id"];
|
||||
}
|
||||
|
||||
message RemoveTargetCredentialSourcesResponse {
|
||||
api.resources.targets.v1.Target item = 1;
|
||||
}
|
||||
|
||||
message AuthorizeSessionRequest {
|
||||
// The ID of the target. Required unless some combination of scope_id/scope_name and name are set.
|
||||
string id = 1;
|
||||
@@ -351,4 +437,4 @@ message AuthorizeSessionRequest {
|
||||
|
||||
message AuthorizeSessionResponse {
|
||||
api.resources.targets.v1.SessionAuthorization item = 1;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user