-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
237df91
commit 09190b3
Showing
52 changed files
with
1,900 additions
and
5,613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,7 @@ go.work | |
.vscode | ||
|
||
*.DS_Store | ||
|
||
.config.yaml | ||
|
||
dist/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
version: v1 | ||
lint: | ||
use: | ||
- BASIC | ||
- FILE_LOWER_SNAKE_CASE | ||
except: | ||
- ENUM_NO_ALLOW_ALIAS | ||
- IMPORT_NO_PUBLIC | ||
- PACKAGE_DIRECTORY_MATCH | ||
- PACKAGE_SAME_DIRECTORY | ||
breaking: | ||
use: | ||
- WIRE_JSON | ||
- FILE | ||
lint: | ||
use: | ||
- DEFAULT | ||
ignore: | ||
- google/type/datetime.proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
syntax = "proto3"; | ||
|
||
package redcarbon.agents_public.v1; | ||
|
||
message AgentConfiguration { | ||
optional QRadarJobConfiguration qradar_job_configuration = 1; | ||
} | ||
|
||
message QRadarJobConfiguration { | ||
string host = 1; | ||
string token = 2; | ||
bool verify_ssl = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
syntax = "proto3"; | ||
|
||
package redcarbon.agents_public.v1; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
import "redcarbon/agents_public/v1/types.proto"; | ||
|
||
service AgentsPublicAPIsV1Srv { | ||
rpc HZ(HZRequest) returns (HZResponse) {} | ||
rpc IngestIncident(IngestIncidentRequest) returns (IngestIncidentResponse) {} | ||
rpc FetchAgentConfiguration(FetchAgentConfigurationRequest) returns (FetchAgentConfigurationResponse) {} | ||
} | ||
|
||
message HZRequest { | ||
string hostname = 1; | ||
string ip = 2; | ||
} | ||
|
||
message HZResponse { | ||
google.protobuf.Timestamp received_at = 1; | ||
} | ||
|
||
message IngestIncidentRequest { | ||
string title = 1; | ||
string description = 2; | ||
string raw_data = 3; | ||
uint32 severity = 4; | ||
string origin = 5; | ||
optional string original_id = 6; | ||
} | ||
|
||
message IngestIncidentResponse {} | ||
|
||
message FetchAgentConfigurationRequest {} | ||
|
||
message FetchAgentConfigurationResponse { | ||
AgentConfiguration configuration = 1; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
user_id=`id -u` | ||
|
||
# we want to snapshot the environment of the config user | ||
if [ $user_id -eq 0 -a -z "$AGENT_ALLOW_RUNASROOT" ]; then | ||
echo "Must not run with sudo" | ||
exit 1 | ||
fi | ||
|
||
# Change directory to the script root directory | ||
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within | ||
SOURCE="${BASH_SOURCE[0]}" | ||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
SOURCE="$(readlink "$SOURCE")" | ||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | ||
done | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
cd "$DIR" | ||
|
||
shopt -s nocasematch | ||
./bin/redcarbon configure "$@" |
Oops, something went wrong.