Skip to content

Commit

Permalink
API to validate the webui key (#6364)
Browse files Browse the repository at this point in the history
* added base changes for the API

Signed-off-by: Vinay Sharma <vsharma@chef.io>

* added API changes to validate the webui key

Signed-off-by: Vinay Sharma <vsharma@chef.io>

* added some minor changes for the fun comment

Signed-off-by: Vinay Sharma <vsharma@chef.io>

* added review comment changes

Signed-off-by: Vinay Sharma <vsharma@chef.io>

* added some minor changes for to handle the error

Signed-off-by: Vinay Sharma <vsharma@chef.io>

* added changes to validate webui key before creating a server

Signed-off-by: Vinay Sharma <vsharma@chef.io>

* added protobuff changes

Signed-off-by: Vinay Sharma <vsharma@chef.io>
  • Loading branch information
vinay033 committed Apr 6, 2022
1 parent fa16fa7 commit d48f395
Show file tree
Hide file tree
Showing 23 changed files with 2,270 additions and 1,441 deletions.
2,337 changes: 1,196 additions & 1,141 deletions api/external/infra_proxy/infra_proxy.pb.go

Large diffs are not rendered by default.

78 changes: 78 additions & 0 deletions api/external/infra_proxy/infra_proxy.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions api/external/infra_proxy/infra_proxy.pb.policy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions api/external/infra_proxy/infra_proxy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ service InfraProxy {
option (chef.automate.api.iam.policy).resource = "infra:infraServers";
option (chef.automate.api.iam.policy).action = "infra:infraServers:get";
};

rpc ValidateWebuiKey (infra_proxy.request.ValidateWebuiKey) returns (infra_proxy.response.ValidateWebuiKey) {
option (google.api.http).post = "/api/v0/infra/servers/validate";
option (google.api.http).body = "*";
option (chef.automate.api.iam.policy).resource = "infra:infraServers";
option (chef.automate.api.iam.policy).action = "infra:infraServers:get";
};

rpc GetServer (infra_proxy.request.GetServer) returns (infra_proxy.response.GetServer) {
option (google.api.http).get = "/api/v0/infra/servers/{id}";
option (chef.automate.api.iam.policy).resource = "infra:infraServers:{id}";
Expand Down
63 changes: 63 additions & 0 deletions api/external/infra_proxy/infra_proxy.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

110 changes: 97 additions & 13 deletions api/external/infra_proxy/request/servers.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions api/external/infra_proxy/request/servers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,12 @@ message GetServerStatus {
// Server FQDN
string fqdn = 1;
}

message ValidateWebuiKey {
// Chef Infra Server ID.
string id = 1;
// Chef Server FQDN
string fqdn = 2;
// Optional Chef Server Webui Key
string webui_key = 3;
}
Loading

0 comments on commit d48f395

Please sign in to comment.