Documentation ¶
Index ¶
- Variables
- func NewRouter() *mux.Router
- type ADConfig
- type BulkUpdateFile
- type BulkUpdateJob
- type BurndownPackage
- type BurndownStats
- type Exception
- type ExceptionType
- type GeneralResp
- type Histories
- type Job
- type JobConfig
- type JobConfigRequest
- type JobHistory
- type Log
- type LogType
- type OrgConfigWrapper
- type Organization
- type Permission
- type PieChartContents
- type PublicPermission
- type ScanSummary
- type Source
- type SourceConfig
- type Src
- type TagMap
- type User
- type Vulnerability
- type VulnerabilityMatch
Constants ¶
This section is empty.
Variables ¶
var ( // EncryptionKey is used to encrypt/decrypt fields to/from the database EncryptionKey string // Ms is the database connection Ms domain.DatabaseConnection // AppConfig holds relevant fields from the app config AppConfig listenerConfig // WorkingDir defines the path to the Aegis directory, this is used over os.WorkingDir() as it is inconsistent WorkingDir string // OrgADConfigs holds the AD configurations for each organization. The AD configuration from the root of an // organizational hierarchy is used for the leaf organizations. The key is the organization ID OrgADConfigs map[string]*OrgConfigWrapper )
var ( // SigningKey is generated by the listener main method. It is used in the JWT for hash verification SigningKey string )
Functions ¶
Types ¶
type ADConfig ¶
type ADConfig struct { Servers []string `json:"ad_servers"` ADLdapTLSPort int `json:"ad_ldap_tls_port"` ADBaseDN string `json:"ad_base_dn"` ADSkipTLSVerify bool `json:"ad_skip_verify"` ADMemberOfAttribute string `json:"ad_member_of_attribute"` ADSearchString string `json:"ad_search_string"` }
ADConfig holds the fields that are required to authenticate against AD as well as grab the groups that a user is a member of
type BulkUpdateFile ¶
BulkUpdateFile is a member of apiRequest and must be exported in order to be marshaled
type BulkUpdateJob ¶
type BulkUpdateJob struct { Filenames []string `json:"files"` ServiceURL string `json:"serviceURL"` }
BulkUpdateJob is a member of apiRequest and must be exported in order to be marshaled
type BurndownPackage ¶
type BurndownPackage struct { MediumStats *BurndownStats `json:"medium"` HighStats *BurndownStats `json:"high"` CritStats *BurndownStats `json:"crit"` }
BurndownPackage holds the information of the timelines in which tickets were closed in a particular project it populates the burndown pie char
type BurndownStats ¶
type BurndownStats struct { ZeroToThirty int `json:"zero_thirty"` ThirtyToSixty int `json:"thirty_sixty"` SixtyToNinety int `json:"sixty_ninety"` NinetyPlus int `json:"ninety_up"` Overdue int `json:"overdue"` Done bool `json:"done"` }
BurndownStats is a member of BurndownPackage and must be exported
type Exception ¶
type Exception struct { SourceID string `json:"source_id"` OrganizationID string `json:"org_id"` TypeID int `json:"type_id"` VulnerabilityID string `json:"vuln_id"` DeviceID string `json:"device_id"` DueDate string `json:"due_date,omitempty"` Approval string `json:"approval,omitempty"` Active bool `json:"active"` Port string `json:"port,omitempty"` DBCreatedDate string `json:"created_date,omitempty"` DBUpdatedDate string `json:"updated_date,omitempty"` CreatedBy string `json:"created_by,omitempty"` UpdatedBy string `json:"updated_by,omitempty"` Offset int `json:"offset,omitempty"` Limit int `json:"limit,omitempty"` SortedField string `json:"sorted_field,omitempty"` SortOrder string `json:"sort_order,omitempty"` }
Exception is the struct that maps to the exceptions in the database
type ExceptionType ¶
ExceptionType is the type of the exception in the database
type GeneralResp ¶
type GeneralResp struct { Response interface{} `json:"response,omitempty"` Message string `json:"message,omitempty"` Success bool `json:"success,omitempty"` // TODO return permissions by marshalling dal object Permissions *PublicPermission `json:"permissions,omitempty"` TotalRecords int `json:"totalrecords,omitempty"` }
GeneralResp acts as a container for the response to a user's API apiRequest
type Histories ¶
type Histories struct { Offset int `json:"offset,omitempty"` Limit int `json:"limit,omitempty"` JobID int `json:"job_id"` JobHistID int `json:"history_id"` ConfigID string `json:"config_id"` StatusID int `json:"status"` Payload string `json:"payload"` }
Histories is a member of apiRequest and must be exported in order to be marshaled
type JobConfig ¶
type JobConfig struct { JobID int `json:"job_id"` ConfigID string `json:"config_id"` PriorityOverride int `json:"priority_override"` DataInSourceConfigID string `json:"data_in_source_config_id"` DataOutSourceConfigID string `json:"data_out_source_config_id"` Continuous bool `json:"continuous"` WaitInSeconds int `json:"wait_in_seconds"` MaxInstances int `json:"max_instances"` AutoStart bool `json:"autostart"` Active bool `json:"active"` Payload string `json:"payload"` Code int `json:"code,omitempty"` Name string `json:"name,omitempty"` CreatedDate string `json:"created_date"` CreatedBy string `json:"created_by"` UpdatedDate string `json:"updated_date,omitempty"` UpdatedBy string `json:"updated_by,omitempty"` LastJobStart string `json:"last_job_start,omitempty"` JobName string `json:"job_name,omitempty"` SourceInName string `json:"srcin_name,omitempty"` }
JobConfig is a member of apiRequest and must be exported in order to be marshaled
type JobConfigRequest ¶
type JobConfigRequest struct { JobConfig Offset int `json:"offset,omitempty"` Limit int `json:"limit,omitempty"` SortedField string `json:"sorted_field,omitempty"` SortOrder string `json:"sort_order,omitempty"` }
JobConfigRequest is a member of apiRequest and must be exported in order to be marshaled
type JobHistory ¶
type JobHistory struct { JobHistID string `json:"history_id"` JobID int `json:"job_id"` ConfigID string `json:"config_id"` StatusID int `json:"status"` Payload string `json:"payload"` }
JobHistory is a member of apiRequest and must be exported in order to be marshaled
type Log ¶
type Log struct { ID int `json:"id"` TypeID int `json:"typeId"` Log string `json:"log"` Error string `json:"error"` JobHistoryID string `json:"jobHistoryId"` Date string `json:"date"` }
Log is a member of apiRequest and must be exported in order to be marshaled
type OrgConfigWrapper ¶
type OrgConfigWrapper struct { Org domain.Organization Con *ADConfig }
OrgConfigWrapper ties together an organization along with it's AD configuration
type Organization ¶
type Organization struct { ID string `json:"org_id,omitempty"` Code string `json:"code,omitempty"` Description string `json:"description,omitempty"` TimeZoneOffset float32 `json:"timezone_offset,omitempty"` }
Organization is a member of apiRequest and must be exported in order to be marshaled
type Permission ¶
Permission is a member of apiRequest and must be exported in order to be marshaled
type PieChartContents ¶
PieChartContents is a member of pieChartInfo and must be exported in order to be marshaled
type PublicPermission ¶
type PublicPermission struct { CanDeleteJob bool `json:"candeletejob,omitempty"` CanDeleteConfig bool `json:"candeleteconfig,omitempty"` CanUpdateSource bool `json:"canupdatesource,omitempty"` CanReadJobHistories bool `json:"canreadjobhistories,omitempty"` UserID int `json:"userid,omitempty"` CanCreateJob bool `json:"cancreatejob,omitempty"` CanCreateSource bool `json:"cancreatesource,omitempty"` CanDeleteOrg bool `json:"candeleteorg,omitempty"` CanCreateConfig bool `json:"cancreateconfig,omitempty"` CanUpdateConfig bool `json:"canupdateconfig,omitempty"` CanUpdateJob bool `json:"canupdatejob,omitempty"` CanDeleteSource bool `json:"candeletesource,omitempty"` CanCreateOrg bool `json:"cancreateorg,omitempty"` CanUpdateOrg bool `json:"canupdateorg ,omitempty"` }
PublicPermission is a member of GeneralResp and must be exported in order to be marshaled
type ScanSummary ¶
type ScanSummary struct { ScanID string `json:"scan_id"` Status string `json:"status"` Tickets string `json:"tickets"` Devices string `json:"devices"` StartTime string `json:"start"` Duration string `json:"duration"` GroupName string `json:"group_name"` GroupID int `json:"group_id"` Source string `json:"source"` }
ScanSummary is a member of apiRequest and must be exported in order to be marshaled
type Source ¶
type Source struct { ID string `json:"id,omitempty"` Source string `json:"source,omitempty"` Address string `json:"address,omitempty"` Port int `json:"port,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Payload string `json:"payload,omitempty"` // fields for Oauth (optional) PrivateKey string `json:"private_key,omitempty"` ConsumerKey string `json:"consumer_key,omitempty"` Token string `json:"token,omitempty"` }
Source is a member of apiRequest and must be exported in order to be marshaled
type SourceConfig ¶
type SourceConfig struct { Code string `json:"code,omitempty"` Name string `json:"name,omitempty"` }
SourceConfig maps to the source config db tables
type TagMap ¶
type TagMap struct { CloudSource string `json:"cloud_source"` CloudTag string `json:"cloud_tag"` TicketSource string `json:"ticket_source"` TicketTag string `json:"ticket_tag"` Option string `json:"option"` Overwrite bool `json:"overwrite,omitempty"` }
TagMap is a member of apiRequest and must be exported in order to be marshaled
type User ¶
type User struct { ID string `json:"id"` Username string `json:"username"` FirstName string `json:"firstname"` LastName string `json:"lastname"` Email string `json:"email"` IsDisabled bool `json:"isdisabled"` }
User is a member of apiRequest and must be exported in order to be marshaled
type Vulnerability ¶
type Vulnerability struct { SourceID string `json:"source_id"` Title string `json:"title"` CVSS float32 `json:"cvss"` }
Vulnerability is a member of apiRequest and must be exported in order to be marshaled
type VulnerabilityMatch ¶
type VulnerabilityMatch struct { NexposeTitle string `json:"nexpose_title"` NexposeID string `json:"nexpose_id"` QualysTitle string `json:"qualys_title"` QualysID string `json:"qualys_id"` MatchConfidence int `json:"match_confidence"` MatchReason string `json:"match_reason"` }
VulnerabilityMatch is a member of apiRequest and must be exported in order to be marshaled
Source Files ¶
- API.auth.go
- API.bulkupdate.go
- API.config.go
- API.exceptions.go
- API.history.go
- API.jira.go
- API.job.go
- API.log.go
- API.org.go
- API.permission.go
- API.scans.go
- API.source.go
- API.tags.go
- API.users.go
- API.vulnerability.go
- auth_helper.go
- backend_constants.go
- backend_helpers.go
- backend_interface.go
- connection.handler.go
- dtoConvertor.go
- errorMessages.go
- handle_panic.go
- handlers.go
- handlers.json.go
- helper_ordefault.go
- ldap.go
- routes.go