Documentation
¶
Overview ¶
Package dbconfig is a compliance submodule that is able to parse and export databases applications configurations.
Index ¶
- func GetProcResourceType(proc *process.Process) (types.ResourceType, bool)
- type DBConfig
- func LoadCassandraConfig(ctx context.Context, hostroot string, proc *process.Process) (*DBConfig, bool)
- func LoadConfiguration(ctx context.Context, rootPath string, proc *process.Process) (types.ResourceType, *DBConfig, bool)
- func LoadMongoDBConfig(ctx context.Context, hostroot string, proc *process.Process) (*DBConfig, bool)
- func LoadPostgreSQLConfig(ctx context.Context, hostroot string, proc *process.Process) (*DBConfig, bool)
- type DBResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetProcResourceType ¶
func GetProcResourceType(proc *process.Process) (types.ResourceType, bool)
GetProcResourceType returns the type of database resource associated with the given process.
Types ¶
type DBConfig ¶
type DBConfig struct {
ProcessName string `json:"process_name,omitempty"`
ProcessUser string `json:"process_user,omitempty"`
ProcessFlags map[string]string `json:"process_flags,omitempty"`
ConfigFilePath string `json:"config_file_path"`
ConfigFileUser string `json:"config_file_user"`
ConfigFileGroup string `json:"config_file_group"`
ConfigFileMode uint32 `json:"config_file_mode"`
ConfigData interface{} `json:"config_data"`
}
DBConfig represents a database application configuration metadata that we were able to scan.
func LoadCassandraConfig ¶
func LoadCassandraConfig(ctx context.Context, hostroot string, proc *process.Process) (*DBConfig, bool)
LoadCassandraConfig loads and extracts the Cassandra configuration data found on the system.
func LoadConfiguration ¶
func LoadConfiguration(ctx context.Context, rootPath string, proc *process.Process) (types.ResourceType, *DBConfig, bool)
LoadConfiguration loads and returns an optional DBResource associated with the given process PID.
type DBResource ¶
type DBResource struct {
Type types.ResourceType `json:"type"`
ContainerID string `json:"container_id,omitempty"`
Config DBConfig `json:"config"`
}
DBResource holds a database configuration data and the resource type associated with it.
func LoadDBResourceFromPID ¶
func LoadDBResourceFromPID(ctx context.Context, pid int32) (*DBResource, bool)
LoadDBResourceFromPID loads and returns an optional DBResource associated with the given process PID.