Documentation ¶
Index ¶
- Variables
- func GetDefaultPath(name string) string
- func HttpDelete(httpClient *http.Client, fullURL string, headers map[string]string) (string, error)
- func HttpGetter(httpClient *http.Client, fullURL string, headers map[string]string) (string, error)
- func HttpPost(httpClient *http.Client, fullURL string, headers map[string]string, ...) (string, error)
- func JSONDecoder(origin string) *json.Decoder
- func SaveInFile(policy interface{}, pathStr string) error
- func SetARMOAPIConnector(armoAPI *ArmoAPI)
- type ArmoAPI
- func (armoAPI *ArmoAPI) Delete(fullURL string, headers map[string]string) (string, error)
- func (armoAPI *ArmoAPI) DeleteException(exceptionName string) error
- func (armoAPI *ArmoAPI) Get(fullURL string, headers map[string]string) (string, error)
- func (armoAPI *ArmoAPI) GetAPIURL() string
- func (armoAPI *ArmoAPI) GetAccountConfig(clusterName string) (*armotypes.CustomerConfig, error)
- func (armoAPI *ArmoAPI) GetAccountID() string
- func (armoAPI *ArmoAPI) GetClientID() string
- func (armoAPI *ArmoAPI) GetControl(policyName string) (*reporthandling.Control, error)
- func (armoAPI *ArmoAPI) GetControlsInputs(clusterName string) (map[string][]string, error)
- func (armoAPI *ArmoAPI) GetExceptions(clusterName string) ([]armotypes.PostureExceptionPolicy, error)
- func (armoAPI *ArmoAPI) GetFramework(name string) (*reporthandling.Framework, error)
- func (armoAPI *ArmoAPI) GetFrameworks() ([]reporthandling.Framework, error)
- func (armoAPI *ArmoAPI) GetFrontendURL() string
- func (armoAPI *ArmoAPI) GetReportReceiverURL() string
- func (armoAPI *ArmoAPI) GetSecretKey() string
- func (armoAPI *ArmoAPI) GetTenant() (*TenantResponse, error)
- func (armoAPI *ArmoAPI) IsLoggedIn() bool
- func (armoAPI *ArmoAPI) ListControls(l ListType) ([]string, error)
- func (armoAPI *ArmoAPI) ListCustomFrameworks() ([]string, error)
- func (armoAPI *ArmoAPI) ListFrameworks() ([]string, error)
- func (armoAPI *ArmoAPI) Login() error
- func (armoAPI *ArmoAPI) Post(fullURL string, headers map[string]string, body []byte) (string, error)
- func (armoAPI *ArmoAPI) PostExceptions(exceptions []armotypes.PostureExceptionPolicy) error
- func (armoAPI *ArmoAPI) SetAccountID(accountID string)
- func (armoAPI *ArmoAPI) SetClientID(clientID string)
- func (armoAPI *ArmoAPI) SetSecretKey(secretKey string)
- type ArmoSelectCustomer
- type DownloadReleasedPolicy
- func (drp *DownloadReleasedPolicy) GetControl(policyName string) (*reporthandling.Control, error)
- func (drp *DownloadReleasedPolicy) GetControlsInputs(clusterName string) (map[string][]string, error)
- func (drp *DownloadReleasedPolicy) GetFramework(name string) (*reporthandling.Framework, error)
- func (drp *DownloadReleasedPolicy) GetFrameworks() ([]reporthandling.Framework, error)
- func (drp *DownloadReleasedPolicy) ListControls(listType ListType) ([]string, error)
- func (drp *DownloadReleasedPolicy) ListFrameworks() ([]string, error)
- func (drp *DownloadReleasedPolicy) SetRegoObjects() error
- type FeLoginData
- type FeLoginResponse
- type IBackend
- type IControlsInputsGetter
- type IExceptionsGetter
- type IPolicyGetter
- type ListType
- type LoadPolicy
- func (lp *LoadPolicy) GetControl(controlName string) (*reporthandling.Control, error)
- func (lp *LoadPolicy) GetControlsInputs(clusterName string) (map[string][]string, error)
- func (lp *LoadPolicy) GetExceptions(clusterName string) ([]armotypes.PostureExceptionPolicy, error)
- func (lp *LoadPolicy) GetFramework(frameworkName string) (*reporthandling.Framework, error)
- func (lp *LoadPolicy) GetFrameworks() ([]reporthandling.Framework, error)
- func (lp *LoadPolicy) ListControls(listType ListType) ([]string, error)
- func (lp *LoadPolicy) ListFrameworks() ([]string, error)
- type TenantResponse
Constants ¶
This section is empty.
Variables ¶
var DefaultLocalStore = getCacheDir()
======================================================================================================================= ============================================== LoadPolicy ============================================================= =======================================================================================================================
var NativeFrameworks = []string{"nsa", "mitre", "armobest", "devopsbest"}
Functions ¶
func GetDefaultPath ¶
func HttpDelete ¶
func HttpGetter ¶
func JSONDecoder ¶
JSONDecoder returns JSON decoder for given string
func SaveInFile ¶
func SetARMOAPIConnector ¶
func SetARMOAPIConnector(armoAPI *ArmoAPI)
Types ¶
type ArmoAPI ¶
type ArmoAPI struct {
// contains filtered or unexported fields
}
Armo API for downloading policies
func GetArmoAPIConnector ¶
func GetArmoAPIConnector() *ArmoAPI
func NewARMOAPICustomized ¶
func NewARMOAPIDev ¶
func NewARMOAPIDev() *ArmoAPI
func NewARMOAPIProd ¶
func NewARMOAPIProd() *ArmoAPI
func NewARMOAPIStaging ¶
func NewARMOAPIStaging() *ArmoAPI
func (*ArmoAPI) DeleteException ¶
func (*ArmoAPI) GetAccountConfig ¶
func (armoAPI *ArmoAPI) GetAccountConfig(clusterName string) (*armotypes.CustomerConfig, error)
ControlsInputs // map[<control name>][<input arguments>]
func (*ArmoAPI) GetAccountID ¶
func (*ArmoAPI) GetClientID ¶
func (*ArmoAPI) GetControl ¶
func (armoAPI *ArmoAPI) GetControl(policyName string) (*reporthandling.Control, error)
func (*ArmoAPI) GetControlsInputs ¶
ControlsInputs // map[<control name>][<input arguments>]
func (*ArmoAPI) GetExceptions ¶
func (armoAPI *ArmoAPI) GetExceptions(clusterName string) ([]armotypes.PostureExceptionPolicy, error)
func (*ArmoAPI) GetFramework ¶
func (armoAPI *ArmoAPI) GetFramework(name string) (*reporthandling.Framework, error)
func (*ArmoAPI) GetFrameworks ¶
func (armoAPI *ArmoAPI) GetFrameworks() ([]reporthandling.Framework, error)
func (*ArmoAPI) GetFrontendURL ¶
func (*ArmoAPI) GetReportReceiverURL ¶
func (*ArmoAPI) GetSecretKey ¶
func (*ArmoAPI) GetTenant ¶
func (armoAPI *ArmoAPI) GetTenant() (*TenantResponse, error)
func (*ArmoAPI) IsLoggedIn ¶
func (*ArmoAPI) ListCustomFrameworks ¶
func (*ArmoAPI) ListFrameworks ¶
func (*ArmoAPI) PostExceptions ¶
func (armoAPI *ArmoAPI) PostExceptions(exceptions []armotypes.PostureExceptionPolicy) error
func (*ArmoAPI) SetAccountID ¶
func (*ArmoAPI) SetClientID ¶
func (*ArmoAPI) SetSecretKey ¶
type ArmoSelectCustomer ¶
type ArmoSelectCustomer struct {
SelectedCustomerGuid string `json:"selectedCustomer"`
}
type DownloadReleasedPolicy ¶
type DownloadReleasedPolicy struct {
// contains filtered or unexported fields
}
Use gitregostore to get policies from github release
func NewDownloadReleasedPolicy ¶
func NewDownloadReleasedPolicy() *DownloadReleasedPolicy
func (*DownloadReleasedPolicy) GetControl ¶
func (drp *DownloadReleasedPolicy) GetControl(policyName string) (*reporthandling.Control, error)
func (*DownloadReleasedPolicy) GetControlsInputs ¶
func (drp *DownloadReleasedPolicy) GetControlsInputs(clusterName string) (map[string][]string, error)
func (*DownloadReleasedPolicy) GetFramework ¶
func (drp *DownloadReleasedPolicy) GetFramework(name string) (*reporthandling.Framework, error)
func (*DownloadReleasedPolicy) GetFrameworks ¶
func (drp *DownloadReleasedPolicy) GetFrameworks() ([]reporthandling.Framework, error)
func (*DownloadReleasedPolicy) ListControls ¶
func (drp *DownloadReleasedPolicy) ListControls(listType ListType) ([]string, error)
func (*DownloadReleasedPolicy) ListFrameworks ¶
func (drp *DownloadReleasedPolicy) ListFrameworks() ([]string, error)
func (*DownloadReleasedPolicy) SetRegoObjects ¶
func (drp *DownloadReleasedPolicy) SetRegoObjects() error
type FeLoginData ¶
type FeLoginResponse ¶
type IControlsInputsGetter ¶
type IExceptionsGetter ¶
type IExceptionsGetter interface {
GetExceptions(clusterName string) ([]armotypes.PostureExceptionPolicy, error)
}
type IPolicyGetter ¶
type ListType ¶
type ListType string
supported listing
const ListID ListType = "id"
const ListName ListType = "name"
type LoadPolicy ¶
type LoadPolicy struct {
// contains filtered or unexported fields
}
Load policies from a local repository
func NewLoadPolicy ¶
func NewLoadPolicy(filePaths []string) *LoadPolicy
func (*LoadPolicy) GetControl ¶
func (lp *LoadPolicy) GetControl(controlName string) (*reporthandling.Control, error)
Return control from file
func (*LoadPolicy) GetControlsInputs ¶
func (lp *LoadPolicy) GetControlsInputs(clusterName string) (map[string][]string, error)
func (*LoadPolicy) GetExceptions ¶
func (lp *LoadPolicy) GetExceptions(clusterName string) ([]armotypes.PostureExceptionPolicy, error)
func (*LoadPolicy) GetFramework ¶
func (lp *LoadPolicy) GetFramework(frameworkName string) (*reporthandling.Framework, error)
func (*LoadPolicy) GetFrameworks ¶
func (lp *LoadPolicy) GetFrameworks() ([]reporthandling.Framework, error)
func (*LoadPolicy) ListControls ¶
func (lp *LoadPolicy) ListControls(listType ListType) ([]string, error)
func (*LoadPolicy) ListFrameworks ¶
func (lp *LoadPolicy) ListFrameworks() ([]string, error)