Documentation
¶
Index ¶
- Constants
- type AuditConfiLogAnalytics
- type AuditConfig
- type AuditConfigResourceGraph
- type AzureAuditor
- func (auditor *AzureAuditor) GetConfig() AuditConfig
- func (auditor *AzureAuditor) GetReport() map[string]*AzureAuditorReport
- func (auditor *AzureAuditor) Init()
- func (auditor *AzureAuditor) MetricsLock() *sync.RWMutex
- func (auditor *AzureAuditor) Reload()
- func (auditor *AzureAuditor) ReportLock() *sync.RWMutex
- func (auditor *AzureAuditor) Run()
- func (auditor *AzureAuditor) SetConfigs(configPaths ...string)
- type AzureAuditorReport
- type AzureAuditorReportLine
- type AzureAuditorReportLineResource
- type AzureAuditorReportSummary
- type LogAnaltyicsQueryResult
Constants ¶
View Source
const ( ReportKeyvaultAccessPolicies = "KeyvaultAccessPolicy" ReportResourceProviders = "ResourceProvider" ReportResourceProviderFeatures = "ResourceProviderFeature" ReportResourceGroups = "ResourceGroup" ReportRoleAssignments = "RoleAssignment" ReportResourceGraph = "ResourceGraph:%v" ReportLogAnalytics = "LogAnalytics:%v" )
View Source
const (
OperationInsightsWorkspaceUrlSuffix = "/v1"
)
View Source
const (
ResourceGraphQueryOptionsTop = 1000
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditConfiLogAnalytics ¶
type AuditConfiLogAnalytics struct {
Enabled bool `json:"enabled"`
Queries map[string]*validator.AuditConfigValidation `json:"queries"`
}
func (*AuditConfiLogAnalytics) IsEnabled ¶
func (config *AuditConfiLogAnalytics) IsEnabled() bool
type AuditConfig ¶
type AuditConfig struct {
RoleAssignments *validator.AuditConfigValidation `json:"roleAssignments"`
ResourceGroups *validator.AuditConfigValidation `json:"resourceGroups"`
ResourceProviders *validator.AuditConfigValidation `json:"resourceProviders"`
ResourceProviderFeatures *validator.AuditConfigValidation `json:"resourceProviderFeatures"`
KeyvaultAccessPolicies *validator.AuditConfigValidation `json:"keyvaultAccessPolicies"`
ResourceGraph *AuditConfigResourceGraph `json:"resourceGraph"`
LogAnalytics *AuditConfiLogAnalytics `json:"logAnalytics"`
}
type AuditConfigResourceGraph ¶
type AuditConfigResourceGraph struct {
Enabled bool `json:"enabled"`
Queries map[string]*validator.AuditConfigValidation `json:"queries"`
}
func (*AuditConfigResourceGraph) IsEnabled ¶
func (config *AuditConfigResourceGraph) IsEnabled() bool
type AzureAuditor ¶
type AzureAuditor struct {
UserAgent string
Opts config.Opts
Logger *slogger.Logger
// contains filtered or unexported fields
}
func NewAzureAuditor ¶
func NewAzureAuditor() *AzureAuditor
func (*AzureAuditor) GetConfig ¶
func (auditor *AzureAuditor) GetConfig() AuditConfig
func (*AzureAuditor) GetReport ¶
func (auditor *AzureAuditor) GetReport() map[string]*AzureAuditorReport
func (*AzureAuditor) Init ¶
func (auditor *AzureAuditor) Init()
func (*AzureAuditor) MetricsLock ¶
func (auditor *AzureAuditor) MetricsLock() *sync.RWMutex
func (*AzureAuditor) Reload ¶
func (auditor *AzureAuditor) Reload()
func (*AzureAuditor) ReportLock ¶
func (auditor *AzureAuditor) ReportLock() *sync.RWMutex
func (*AzureAuditor) Run ¶
func (auditor *AzureAuditor) Run()
func (*AzureAuditor) SetConfigs ¶
func (auditor *AzureAuditor) SetConfigs(configPaths ...string)
type AzureAuditorReport ¶
type AzureAuditorReport struct {
Summary *AzureAuditorReportSummary
Lines []*AzureAuditorReportLine
UpdateTime *time.Time
// contains filtered or unexported fields
}
func NewAzureAuditorReport ¶
func NewAzureAuditorReport() *AzureAuditorReport
func (*AzureAuditorReport) Add ¶
func (report *AzureAuditorReport) Add(resource *validator.AzureObject, ruleID string, status types.RuleStatus)
func (*AzureAuditorReport) Clear ¶
func (report *AzureAuditorReport) Clear()
type AzureAuditorReportLine ¶
type AzureAuditorReportLine struct {
Resource AzureAuditorReportLineResource `json:"resource"`
RuleID string `json:"rule"`
GroupBy interface{} `json:"groupBy"`
Status string `json:"status"`
Count uint64 `json:"count"`
}
func (*AzureAuditorReportLine) Hash ¶
func (reportLine *AzureAuditorReportLine) Hash() [20]byte
func (*AzureAuditorReportLine) MarshalJSON ¶
func (reportLine *AzureAuditorReportLine) MarshalJSON() ([]byte, error)
type AzureAuditorReportLineResource ¶
type AzureAuditorReportLineResource map[string]interface{}
func (*AzureAuditorReportLineResource) MarshalJSON ¶
func (resource *AzureAuditorReportLineResource) MarshalJSON() ([]byte, error)
type LogAnaltyicsQueryResult ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.