Skip to content

Commit

Permalink
API to update the web ui key (#6433)
Browse files Browse the repository at this point in the history
* Update web ui key API added

Signed-off-by: sonali wale <swale@msystechnologies.com>

* Removed extra files

Signed-off-by: sonali wale <swale@msystechnologies.com>

* Read secret changes added

Signed-off-by: sonali wale <swale@msystechnologies.com>

* Conflicts resolved

Signed-off-by: sonali wale <swale@msystechnologies.com>

* Test cases added

Signed-off-by: sonali wale <swale@msystechnologies.com>

* Commented validate web ui key test cases

Signed-off-by: sonali wale <swale@msystechnologies.com>

* Changes added in mock file

Signed-off-by: sonali wale <swale@msystechnologies.com>

* uncomment validate web ui key test cases

Signed-off-by: sonali wale <swale@msystechnologies.com>
  • Loading branch information
sonali523 authored and vinay033 committed Apr 22, 2022
1 parent 9958b8d commit 090c0c4
Show file tree
Hide file tree
Showing 23 changed files with 4,723 additions and 1,812 deletions.
4 changes: 4 additions & 0 deletions .studio/common
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ function compile_client_mocks() {
pushd /src/api/external || return 1
mockgen_debug -source secrets/secrets.pb.go -destination secrets/secrets.pb.client_mock.go -package secrets -self_package github.com/chef/automate/api/external/secrets
popd || return 1

pushd /src/api/external || return 1
mockgen_debug -source infra_proxy/infra_proxy.pb.go -destination infra_proxy/infra_proxy.pb.client_mock.go -package infra_proxy -self_package github.com/chef/automate/api/external/infra_proxy
popd || return 1
)
}

Expand Down
2,195 changes: 2,195 additions & 0 deletions api/external/infra_proxy/infra_proxy.pb.client_mock.go

Large diffs are not rendered by default.

2,372 changes: 1,213 additions & 1,159 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.

15 changes: 15 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.

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

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

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
48 changes: 48 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.

88 changes: 81 additions & 7 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.

7 changes: 7 additions & 0 deletions api/external/infra_proxy/request/servers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,10 @@ message ValidateWebuiKey {
// Optional Chef Server Webui Key
string webui_key = 3;
}

message UpdateWebuiKey {
// Chef Infra Server ID.
string id = 1;
// Chef Server Webui Key
string webui_key = 2;
}
Loading

0 comments on commit 090c0c4

Please sign in to comment.