Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAAS-377 Disable checks by name #588

Merged
merged 12 commits into from
Oct 20, 2020
616 changes: 556 additions & 60 deletions api/managementpb/checks.pb.go

Large diffs are not rendered by default.

162 changes: 162 additions & 0 deletions api/managementpb/checks.pb.gw.go

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

39 changes: 39 additions & 0 deletions api/managementpb/checks.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,35 @@ message SecurityCheckResult {
map<string, string> labels = 4;
}

// SecurityCheckState contains check name and status.
message SecurityCheckState {
artemgavrilov marked this conversation as resolved.
Show resolved Hide resolved
string name = 1;
bool disabled = 2;
}

// SecurityCheckParams specifies check parameters.
message SecurityCheckParams {
artemgavrilov marked this conversation as resolved.
Show resolved Hide resolved
string name = 1;
bool enable = 2;
bool disable = 3;
}

message GetSecurityCheckResultsResponse {
repeated SecurityCheckResult results = 1;
}

message ListSecurityChecksRequest {}

message ListSecurityChecksResponse {
repeated SecurityCheckState checks_states = 1;
}

message UpdateSecurityChecksRequest {
artemgavrilov marked this conversation as resolved.
Show resolved Hide resolved
repeated SecurityCheckParams checks_params = 1;
}

message UpdateSecurityChecksResponse {}

// SecurityChecks service provides public Management API methods for Security Checks Service.
service SecurityChecks {
// GetSecurityCheckResults start Security Thread Tool checks.
Expand All @@ -53,4 +78,18 @@ service SecurityChecks {
body: "*"
};
}
// ListSecurityChecks returns list of available Security Checks and their status.
rpc ListSecurityChecks(ListSecurityChecksRequest) returns (ListSecurityChecksResponse) {
option (google.api.http) = {
post: "/v1/management/SecurityChecks/List"
body: "*"
};
}
// UpdateSecurityChecks enables/disables Security Checks by name.
rpc UpdateSecurityChecks(UpdateSecurityChecksRequest) returns (UpdateSecurityChecksResponse) {
option (google.api.http) = {
post: "/v1/management/SecurityChecks/Update"
body: "*"
};
}
}
32 changes: 32 additions & 0 deletions api/managementpb/checks.validator.pb.go

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

Loading