diff --git a/userspace/falco/output.proto b/userspace/falco/output.proto deleted file mode 100644 index 51881bf6..00000000 --- a/userspace/falco/output.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/timestamp.proto"; -import "schema.proto"; - -package falco.output; - -option go_package = "github.com/falcosecurity/client-go/pkg/api/output"; - -// This service defines the RPC calls -// to perform an output `request` which will lead to obtain a stream of output `response`s. -service service { - rpc sub(stream request) returns (stream response); - - rpc get(request) returns (stream response); -} - -// The `request` message is the logical representation of the request model. -// It is the input of the `subscribe` service. -// It is used to configure the kind of subscription to the gRPC streaming server. -// -// By default the request asks to the server to only receive the accumulated events. -// In case you want to wait indefinitely for new events to come set the keepalive option to true. -message request { - // repeated string tags = 1; // TODO(leodido, fntlnz): not handled yet but keeping for reference. -} - -// The `response` message is the logical representation of the output model. -// It contains all the elements that Falco emits in an output along with the -// definitions for priorities and source. -message response { - google.protobuf.Timestamp time = 1; - falco.schema.priority priority = 2; - falco.schema.source source = 3; - string rule = 4; - string output = 5; - map output_fields = 6; - string hostname = 7; - // repeated string tags = 8; // TODO(leodido,fntlnz): tags not supported yet, keeping for reference -} diff --git a/userspace/falco/outputs.proto b/userspace/falco/outputs.proto new file mode 100644 index 00000000..43d16ef2 --- /dev/null +++ b/userspace/falco/outputs.proto @@ -0,0 +1,55 @@ +/* +Copyright (C) 2020 The Falco Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +syntax = "proto3"; + +import "google/protobuf/timestamp.proto"; +import "schema.proto"; + +package falco.outputs; + +option go_package = "github.com/falcosecurity/client-go/pkg/api/outputs"; + +// This service defines the RPC methods +// to `request` a stream of output `response`s. +service service { + // Subscribe to a stream of Falco outputs by sending a stream of requests. + rpc sub(stream request) returns (stream response); + // Get all the Falco outputs present in the system up to this call. + rpc get(request) returns (stream response); +} + +// The `request` message is the logical representation of the request model. +// It is the input of the `output.service` service. +message request { + // TODO(leodido,fntlnz): tags not supported yet, keeping it for reference. + // repeated string tags = 1; +} + +// The `response` message is the representation of the output model. +// It contains all the elements that Falco emits in an output along with the +// definitions for priorities and source. +message response { + google.protobuf.Timestamp time = 1; + falco.schema.priority priority = 2; + falco.schema.source source = 3; + string rule = 4; + string output = 5; + map output_fields = 6; + string hostname = 7; + // TODO(leodido,fntlnz): tags not supported yet, keeping it for reference. + // repeated string tags = 8; +} \ No newline at end of file diff --git a/userspace/falco/schema.proto b/userspace/falco/schema.proto index bcd90f51..b57ebff8 100644 --- a/userspace/falco/schema.proto +++ b/userspace/falco/schema.proto @@ -1,3 +1,19 @@ +/* +Copyright (C) 2020 The Falco Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + syntax = "proto3"; package falco.schema; diff --git a/userspace/falco/version.proto b/userspace/falco/version.proto index 3f0d99ec..97896543 100644 --- a/userspace/falco/version.proto +++ b/userspace/falco/version.proto @@ -1,3 +1,19 @@ +/* +Copyright (C) 2020 The Falco Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + syntax = "proto3"; package falco.version;