Listen for events and forward to external security scanning services.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

structs.go 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package main
  2. type openStackEvent struct {
  3. EventType string `json:"event_type"`
  4. Timestamp string `json:"timestamp"`
  5. TenantID string `json:"_context_tenant_id"`
  6. TenantName string `json:"_context_tenant_name"`
  7. User string `json:"_context_user"`
  8. UserName string `json:"_context_user_name"`
  9. UserID string `json:"_context_user_id"`
  10. IsAdmin bool `json:"_context_is_admin"`
  11. PublisherID string `json:"publisher_id"`
  12. MessageID string `json:"message_id"`
  13. }
  14. type osSecurityGroupRule struct {
  15. RemoteGroupID interface{} `json:"remote_group_id"`
  16. Direction string `json:"direction"`
  17. Protocol interface{} `json:"protocol"`
  18. RemoteIPPrefix string `json:"remote_ip_prefix"`
  19. PortRangeMax interface{} `json:"port_range_max"`
  20. // Dscp interface{} `json:"dscp"`
  21. Rule string `json:"rule_direction"`
  22. SecurityGroupID string `json:"security_group_id"`
  23. TenantID string `json:"tenant_id"`
  24. PortRangeMin interface{} `json:"port_range_min"`
  25. Ethertype string `json:"ethertype"`
  26. ID string `json:"id"`
  27. }
  28. type osSecurityGroupRuleChange struct {
  29. Payload struct {
  30. AffectedIPAddr interface{} `json:"affected_ip_address"`
  31. ChangeType string `json:"change_type"`
  32. QualysScanID string `json:"qualys_scan_id"`
  33. QualysScanError string `json:"qualys_scan_error"`
  34. SecurityGroupRule osSecurityGroupRule `json:"security_group_rule"`
  35. SourceType string `json:"source_type"`
  36. SourceMessageBus string `json:"source_message_bus"`
  37. } `json:"payload"`
  38. }
  39. type osSecurityGroupRuleDelete struct {
  40. Payload struct {
  41. SecurityGroupRuleID string `json:"security_group_rule_id"`
  42. } `json:"payload"`
  43. }
  44. type osPortCreate struct {
  45. Payload struct {
  46. Port osPort `json:"port"`
  47. } `json:"payload"`
  48. }
  49. type osPort struct {
  50. Status string `json:"status"`
  51. BindingHostID string `json:"binding:host_id"`
  52. Name string `json:"name"`
  53. AllowedAddressPairs []interface{} `json:"allowed_address_pairs"`
  54. AdminStateUp bool `json:"admin_state_up"`
  55. NetworkID string `json:"network_id"`
  56. TenantID string `json:"tenant_id"`
  57. BindingVifDetails struct {
  58. PortFilter bool `json:"port_filter"`
  59. OvsHybridPlug bool `json:"ovs_hybrid_plug"`
  60. } `json:"binding:vif_details"`
  61. BindingVnicType string `json:"binding:vnic_type"`
  62. BindingVifType string `json:"binding:vif_type"`
  63. DeviceOwner string `json:"device_owner"`
  64. MacAddress string `json:"mac_address"`
  65. BindingProfile struct {
  66. } `json:"binding:profile"`
  67. FixedIps []struct {
  68. SubnetID string `json:"subnet_id"`
  69. IPAddress string `json:"ip_address"`
  70. } `json:"fixed_ips"`
  71. ID string `json:"id"`
  72. SecurityGroups []string `json:"security_groups"`
  73. DeviceID string `json:"device_id"`
  74. }