Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion admin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ var (
osqueryTablesVersion string
loggerFile string
staticFilesFolder string
staticOffline bool
staticOffline bool
carvedFilesFolder string
templatesFolder string
)
Expand Down
12 changes: 2 additions & 10 deletions cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,11 @@ func LoadConfiguration(file, key string) (JSONConfigurationRedis, error) {

// GetRedis to get redis client ready
func (rm *RedisManager) GetRedis() *redis.Client {
options := &redis.Options{
return redis.NewClient(&redis.Options{
Addr: PrepareAddr(*rm.Config),
Password: rm.Config.Password,
DB: rm.Config.DB,
}
if rm.Config.Password == "" {
options = &redis.Options{
Addr: PrepareAddr(*rm.Config),
DB: rm.Config.DB,
}
}
client := redis.NewClient(options)
return client
})
}

// Check to verify if connection is open and ready
Expand Down
6 changes: 3 additions & 3 deletions deploy/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ else
configuration_service "$SOURCE_PATH/deploy/config/$SERVICE_TEMPLATE" "$DEST_PATH/config/$TLS_CONF" "$_T_HOST|$_T_INT_PORT" "$TLS_COMPONENT" "127.0.0.1" "$_T_AUTH" "$_T_LOGGING" "sudo"

# Systemd configuration for TLS service
_systemd "osctrl" "osctrl" "osctrl-tls" "$SOURCE_PATH" "$DEST_PATH" "--redis --db"
_systemd "osctrl" "osctrl" "osctrl-tls" "$SOURCE_PATH" "$DEST_PATH" "--redis --db --config"
fi

if [[ "$PART" == "all" ]] || [[ "$PART" == "$ADMIN_COMPONENT" ]]; then
Expand All @@ -711,7 +711,7 @@ else
_static_files "$MODE" "$SOURCE_PATH" "$DEST_PATH" "admin/static" "static"

# Systemd configuration for Admin service
_systemd "osctrl" "osctrl" "osctrl-admin" "$SOURCE_PATH" "$DEST_PATH" "--redis --db --jwt"
_systemd "osctrl" "osctrl" "osctrl-admin" "$SOURCE_PATH" "$DEST_PATH" "--redis --db --jwt --config"
fi

if [[ "$PART" == "all" ]] || [[ "$PART" == "$API_COMPONENT" ]]; then
Expand All @@ -722,7 +722,7 @@ else
configuration_service "$SOURCE_PATH/deploy/config/$SERVICE_TEMPLATE" "$DEST_PATH/config/$API_CONF" "$_P_HOST|$_P_INT_PORT" "$API_COMPONENT" "127.0.0.1" "$_P_AUTH" "$_P_LOGGING" "sudo"

# Systemd configuration for API service
_systemd "osctrl" "osctrl" "osctrl-api" "$SOURCE_PATH" "$DEST_PATH" "--redis --db --jwt"
_systemd "osctrl" "osctrl" "osctrl-api" "$SOURCE_PATH" "$DEST_PATH" "--redis --db --jwt --config"
fi

# Some needed files
Expand Down
3 changes: 0 additions & 3 deletions logging/splunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ type SlunkConfiguration struct {
Token string `json:"token"`
Host string `json:"host"`
Index string `json:"index"`
Queries string `json:"queries"`
Status string `json:"status"`
Results string `json:"results"`
}

// LoggerSplunk will be used to log data using Splunk
Expand Down
8 changes: 7 additions & 1 deletion tls/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,15 @@ var validAuth = map[string]bool{
settings.AuthNone: true,
}
var validLogging = map[string]bool{
settings.LoggingNone: true,
settings.LoggingStdout: true,
settings.LoggingFile: true,
settings.LoggingDB: true,
settings.LoggingGraylog: true,
settings.LoggingSplunk: true,
settings.LoggingKafka: true,
settings.LoggingKinesis: true,
settings.LoggingS3: true,
}

// Function to load the configuration file and assign to variables
Expand Down Expand Up @@ -229,7 +235,7 @@ func init() {
},
&cli.StringFlag{
Name: "redis-pass",
Value: "redis",
Value: "",
Usage: "Password to be used for redis",
EnvVars: []string{"REDIS_PASS"},
Destination: &redisConfig.Password,
Expand Down