forked from esurdam/go-sophos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
http.go
1108 lines (933 loc) · 46.7 KB
/
http.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package objects
import (
"fmt"
"github.com/esurdam/go-sophos"
)
// Http is a generated struct representing the Sophos Http Endpoint
// GET /api/nodes/http
type Http struct {
AdSsoInterfaces []interface{} `json:"ad_sso_interfaces"`
AdssoRedirectUseHostname int64 `json:"adsso_redirect_use_hostname"`
AllowSsl3 int64 `json:"allow_ssl3"`
AllowTLS1_2 int64 `json:"allow_tls_1_2"`
AllowedPuas []interface{} `json:"allowed_puas"`
AllowedTargetServices []string `json:"allowed_target_services"`
AuaMaxconns int64 `json:"aua_maxconns"`
AuaTimeout int64 `json:"aua_timeout"`
AuthCacheSize int64 `json:"auth_cache_size"`
AuthCacheTTL int64 `json:"auth_cache_ttl"`
AuthRealm string `json:"auth_realm"`
AuthUsercacheTTL int64 `json:"auth_usercache_ttl"`
BlockUnscannable int64 `json:"block_unscannable"`
BypassStreaming int64 `json:"bypass_streaming"`
CaList []interface{} `json:"ca_list"`
CacheIgnoresCookies int64 `json:"cache_ignores_cookies"`
Cachessl int64 `json:"cachessl"`
Caching int64 `json:"caching"`
Certcache string `json:"certcache"`
Certstore string `json:"certstore"`
CffOverrideUsers []interface{} `json:"cff_override_users"`
ClientTimeout int64 `json:"client_timeout"`
ConfLockWorkaround int64 `json:"conf_lock_workaround"`
ConnectTimeout int64 `json:"connect_timeout"`
ConnectV6Timeout int64 `json:"connect_v6_timeout"`
Connlimit int64 `json:"connlimit"`
CtypeInspectBody int64 `json:"ctype_inspect_body"`
CtypeUnpackArchive int64 `json:"ctype_unpack_archive"`
Debug []interface{} `json:"debug"`
Defaultblockaction string `json:"defaultblockaction"`
Deferagents []string `json:"deferagents"`
Deferlength int64 `json:"deferlength"`
DisplayHTTPBlockpageExplicitMode int64 `json:"display_http_blockpage_explicit_mode"`
DisplayIntro int64 `json:"display_intro"`
DownloadManagerDefaultCharset string `json:"download_manager_default_charset"`
EdirDelayBasicAuth int64 `json:"edir_delay_basic_auth"`
EnableOutInterface int64 `json:"enable_out_interface"`
EppQuotaAction string `json:"epp_quota_action"`
Exceptions []string `json:"exceptions"`
ForcedCachingExtension []string `json:"forced_caching_extension"`
ForcedCachingNeverCachePrefix []string `json:"forced_caching_never_cache_prefix"`
ForcedCachingStatus int64 `json:"forced_caching_status"`
ForcedCachingTTL int64 `json:"forced_caching_ttl"`
ForcedCachingUserAgentPrefix []string `json:"forced_caching_user_agent_prefix"`
HTTPLoopbackDetect int64 `json:"http_loopback_detect"`
IeSslBlockpageWorkaround int64 `json:"ie_ssl_blockpage_workaround"`
LimitAdSsoInterfaces int64 `json:"limit_ad_sso_interfaces"`
LocalSiteList []interface{} `json:"local_site_list"`
MaxContentEncoding int64 `json:"max_content_encoding"`
MaxTempfileSize int64 `json:"max_tempfile_size"`
Maxthreads int64 `json:"maxthreads"`
MaxthreadsUnused int64 `json:"maxthreads_unused"`
Modulepath string `json:"modulepath"`
Modules []string `json:"modules"`
Noscancontent []string `json:"noscancontent"`
OpendirectoryKeytab string `json:"opendirectory_keytab"`
PacFile string `json:"pac_file"`
ParentProxyHost string `json:"parent_proxy_host"`
ParentProxyPort int64 `json:"parent_proxy_port"`
ParentProxyStatus int64 `json:"parent_proxy_status"`
PassthroughID string `json:"passthrough_id"`
PharmingProtection int64 `json:"pharming_protection"`
Port int64 `json:"port"`
PortalCert string `json:"portal_cert"`
PortalCertChain []interface{} `json:"portal_cert_chain"`
PortalDomain string `json:"portal_domain"`
PortalHosts []interface{} `json:"portal_hosts"`
PortalUseCert int64 `json:"portal_use_cert"`
ProceedCacheTimeout int64 `json:"proceed_cache_timeout"`
Profiles []string `json:"profiles"`
QuotaSliceTime int64 `json:"quota_slice_time"`
RemoveRequest []interface{} `json:"remove_request"`
RemoveResponse []string `json:"remove_response"`
ResponseTimeout int64 `json:"response_timeout"`
ScLocalDB string `json:"sc_local_db"`
ScanEppTraffic int64 `json:"scan_epp_traffic"`
Searchdomain string `json:"searchdomain"`
StrictHTTP int64 `json:"strict_http"`
TlsciphersClient string `json:"tlsciphers_client"`
TlsciphersServer string `json:"tlsciphers_server"`
TmpfsUsageMinMemsize int64 `json:"tmpfs_usage_min_memsize"`
TransparentAuthTimeout int64 `json:"transparent_auth_timeout"`
TransparentDstSkip []interface{} `json:"transparent_dst_skip"`
TransparentSkipAutoPf int64 `json:"transparent_skip_auto_pf"`
TransparentSrcSkip []interface{} `json:"transparent_src_skip"`
TunnelTimeout int64 `json:"tunnel_timeout"`
TunnelV6Timeout int64 `json:"tunnel_v6_timeout"`
Undefercontent []string `json:"undefercontent"`
Undeferextension []string `json:"undeferextension"`
URLFilteringRedirectURL string `json:"url_filtering_redirect_url"`
UseConnectionInsteadofProxyconnection int64 `json:"use_connection_insteadof_proxyconnection"`
UseDstaddrForGeopiplookup int64 `json:"use_dstaddr_for_geopiplookup"`
UseKrb5Adsso int64 `json:"use_krb5_adsso"`
UseSni int64 `json:"use_sni"`
UseSxlUrid int64 `json:"use_sxl_urid"`
}
var _ sophos.Endpoint = &Http{}
var defsHttp = map[string]sophos.RestObject{
"HttpCffAction": &HttpCffAction{},
"HttpCffProfile": &HttpCffProfile{},
"HttpDeviceAuth": &HttpDeviceAuth{},
"HttpDomainRegex": &HttpDomainRegex{},
"HttpException": &HttpException{},
"HttpGroup": &HttpGroup{},
"HttpLocalSite": &HttpLocalSite{},
"HttpLslTag": &HttpLslTag{},
"HttpPacFile": &HttpPacFile{},
"HttpParentProxy": &HttpParentProxy{},
"HttpProfile": &HttpProfile{},
"HttpSpCategory": &HttpSpCategory{},
"HttpSpSubcat": &HttpSpSubcat{},
}
// RestObjects implements the sophos.Node interface and returns a map of Http's Objects
func (Http) RestObjects() map[string]sophos.RestObject { return defsHttp }
// GetPath implements sophos.RestGetter
func (*Http) GetPath() string { return "/api/nodes/http" }
// RefRequired implements sophos.RestGetter
func (*Http) RefRequired() (string, bool) { return "", false }
var defHttp = &sophos.Definition{Description: "http", Name: "http", Link: "/api/definitions/http"}
// Definition returns the /api/definitions struct of Http
func (Http) Definition() sophos.Definition { return *defHttp }
// ApiRoutes returns all known Http Paths
func (Http) ApiRoutes() []string {
return []string{
"/api/objects/http/cff_action/",
"/api/objects/http/cff_action/{ref}",
"/api/objects/http/cff_action/{ref}/usedby",
"/api/objects/http/cff_profile/",
"/api/objects/http/cff_profile/{ref}",
"/api/objects/http/cff_profile/{ref}/usedby",
"/api/objects/http/device_auth/",
"/api/objects/http/device_auth/{ref}",
"/api/objects/http/device_auth/{ref}/usedby",
"/api/objects/http/domain_regex/",
"/api/objects/http/domain_regex/{ref}",
"/api/objects/http/domain_regex/{ref}/usedby",
"/api/objects/http/exception/",
"/api/objects/http/exception/{ref}",
"/api/objects/http/exception/{ref}/usedby",
"/api/objects/http/group/",
"/api/objects/http/group/{ref}",
"/api/objects/http/group/{ref}/usedby",
"/api/objects/http/local_site/",
"/api/objects/http/local_site/{ref}",
"/api/objects/http/local_site/{ref}/usedby",
"/api/objects/http/lsl_tag/",
"/api/objects/http/lsl_tag/{ref}",
"/api/objects/http/lsl_tag/{ref}/usedby",
"/api/objects/http/pac_file/",
"/api/objects/http/pac_file/{ref}",
"/api/objects/http/pac_file/{ref}/usedby",
"/api/objects/http/parent_proxy/",
"/api/objects/http/parent_proxy/{ref}",
"/api/objects/http/parent_proxy/{ref}/usedby",
"/api/objects/http/profile/",
"/api/objects/http/profile/{ref}",
"/api/objects/http/profile/{ref}/usedby",
"/api/objects/http/sp_category/",
"/api/objects/http/sp_category/{ref}",
"/api/objects/http/sp_category/{ref}/usedby",
"/api/objects/http/sp_subcat/",
"/api/objects/http/sp_subcat/{ref}",
"/api/objects/http/sp_subcat/{ref}/usedby",
}
}
// References returns the Http's references. These strings serve no purpose other than to demonstrate which
// Reference keys are used for this Endpoint
func (Http) References() []string {
return []string{
"REF_HttpCffAction",
"REF_HttpCffProfile",
"REF_HttpDeviceAuth",
"REF_HttpDomainRegex",
"REF_HttpException",
"REF_HttpGroup",
"REF_HttpLocalSite",
"REF_HttpLslTag",
"REF_HttpPacFile",
"REF_HttpParentProxy",
"REF_HttpProfile",
"REF_HttpSpCategory",
"REF_HttpSpSubcat",
}
}
// HttpCffActions is an Sophos Endpoint subType and implements sophos.RestObject
type HttpCffActions []HttpCffAction
// HttpCffAction is a generated Sophos object
type HttpCffAction struct {
Locked string `json:"_locked"`
Reference string `json:"_ref"`
ObjectType string `json:"_type"`
AllowTags []interface{} `json:"allow_tags"`
Av bool `json:"av"`
AvEngines string `json:"av_engines"`
BingSafesearch string `json:"bing_safesearch"`
BlockTags []interface{} `json:"block_tags"`
CheckMaxDownload bool `json:"check_max_download"`
Comment string `json:"comment"`
ContenttypeBlacklist []interface{} `json:"contenttype_blacklist"`
ContenttypeBlacklistWarn []interface{} `json:"contenttype_blacklist_warn"`
CreativeCommonsFilter bool `json:"creative_commons_filter"`
EmbeddedRemoval bool `json:"embedded_removal"`
Extensions []string `json:"extensions"`
ExtensionsWarn []interface{} `json:"extensions_warn"`
GoogleSafesearch string `json:"google_safesearch"`
Googleappdomains []interface{} `json:"googleappdomains"`
GoogleappdomainsEnabled bool `json:"googleappdomains_enabled"`
LogAccess bool `json:"log_access"`
LogBlocked bool `json:"log_blocked"`
MaxDownloadSize int64 `json:"max_download_size"`
MaxFilesize int64 `json:"max_filesize"`
Mode string `json:"mode"`
Name string `json:"name"`
ParentProxies []interface{} `json:"parent_proxies"`
Pua bool `json:"pua"`
QuotaTags []interface{} `json:"quota_tags"`
QuotaTime int64 `json:"quota_time"`
Sandbox bool `json:"sandbox"`
ScriptRemoval bool `json:"script_removal"`
SpCategories []interface{} `json:"sp_categories"`
SpCategoriesQuota []interface{} `json:"sp_categories_quota"`
SpCategoriesWarn []interface{} `json:"sp_categories_warn"`
SpMinreputation string `json:"sp_minreputation"`
Spyware bool `json:"spyware"`
UncategorizedWebsites string `json:"uncategorized_websites"`
URLBlacklist []interface{} `json:"url_blacklist"`
URLWhitelist []interface{} `json:"url_whitelist"`
WarnTags []interface{} `json:"warn_tags"`
YahooSafesearch string `json:"yahoo_safesearch"`
}
var _ sophos.RestGetter = &HttpCffAction{}
// GetPath implements sophos.RestObject and returns the HttpCffActions GET path
// Returns all available http/cff_action objects
func (*HttpCffActions) GetPath() string { return "/api/objects/http/cff_action/" }
// RefRequired implements sophos.RestObject
func (*HttpCffActions) RefRequired() (string, bool) { return "", false }
// GetPath implements sophos.RestObject and returns the HttpCffActions GET path
// Returns all available cff_action types
func (h *HttpCffAction) GetPath() string {
return fmt.Sprintf("/api/objects/http/cff_action/%s", h.Reference)
}
// RefRequired implements sophos.RestObject
func (h *HttpCffAction) RefRequired() (string, bool) { return h.Reference, true }
// DeletePath implements sophos.RestObject and returns the HttpCffAction DELETE path
// Creates or updates the complete object cff_action
func (*HttpCffAction) DeletePath(ref string) string {
return fmt.Sprintf("/api/objects/http/cff_action/%s", ref)
}
// PatchPath implements sophos.RestObject and returns the HttpCffAction PATCH path
// Changes to parts of the object cff_action types
func (*HttpCffAction) PatchPath(ref string) string {
return fmt.Sprintf("/api/objects/http/cff_action/%s", ref)
}
// PostPath implements sophos.RestObject and returns the HttpCffAction POST path
// Create a new http/cff_action object
func (*HttpCffAction) PostPath() string {
return "/api/objects/http/cff_action/"
}
// PutPath implements sophos.RestObject and returns the HttpCffAction PUT path
// Creates or updates the complete object cff_action
func (*HttpCffAction) PutPath(ref string) string {
return fmt.Sprintf("/api/objects/http/cff_action/%s", ref)
}
// UsedByPath implements sophos.RestObject
// Returns the objects and the nodes that use the object with the given ref
func (*HttpCffAction) UsedByPath(ref string) string {
return fmt.Sprintf("/api/objects/http/cff_action/%s/usedby", ref)
}
// GetType implements sophos.Object
func (h *HttpCffAction) GetType() string { return h.ObjectType }
// HttpCffProfiles is an Sophos Endpoint subType and implements sophos.RestObject
type HttpCffProfiles []HttpCffProfile
// HttpCffProfile is a generated Sophos object
type HttpCffProfile struct {
Locked string `json:"_locked"`
Reference string `json:"_ref"`
ObjectType string `json:"_type"`
Aaa []string `json:"aaa"`
Action string `json:"action"`
CffProfileName string `json:"cff_profile_name"`
Comment string `json:"comment"`
InProgress string `json:"in_progress"`
Name string `json:"name"`
SkipAuth bool `json:"skip_auth"`
TimeEvent string `json:"time_event"`
}
var _ sophos.RestGetter = &HttpCffProfile{}
// GetPath implements sophos.RestObject and returns the HttpCffProfiles GET path
// Returns all available http/cff_profile objects
func (*HttpCffProfiles) GetPath() string { return "/api/objects/http/cff_profile/" }
// RefRequired implements sophos.RestObject
func (*HttpCffProfiles) RefRequired() (string, bool) { return "", false }
// GetPath implements sophos.RestObject and returns the HttpCffProfiles GET path
// Returns all available cff_profile types
func (h *HttpCffProfile) GetPath() string {
return fmt.Sprintf("/api/objects/http/cff_profile/%s", h.Reference)
}
// RefRequired implements sophos.RestObject
func (h *HttpCffProfile) RefRequired() (string, bool) { return h.Reference, true }
// DeletePath implements sophos.RestObject and returns the HttpCffProfile DELETE path
// Creates or updates the complete object cff_profile
func (*HttpCffProfile) DeletePath(ref string) string {
return fmt.Sprintf("/api/objects/http/cff_profile/%s", ref)
}
// PatchPath implements sophos.RestObject and returns the HttpCffProfile PATCH path
// Changes to parts of the object cff_profile types
func (*HttpCffProfile) PatchPath(ref string) string {
return fmt.Sprintf("/api/objects/http/cff_profile/%s", ref)
}
// PostPath implements sophos.RestObject and returns the HttpCffProfile POST path
// Create a new http/cff_profile object
func (*HttpCffProfile) PostPath() string {
return "/api/objects/http/cff_profile/"
}
// PutPath implements sophos.RestObject and returns the HttpCffProfile PUT path
// Creates or updates the complete object cff_profile
func (*HttpCffProfile) PutPath(ref string) string {
return fmt.Sprintf("/api/objects/http/cff_profile/%s", ref)
}
// UsedByPath implements sophos.RestObject
// Returns the objects and the nodes that use the object with the given ref
func (*HttpCffProfile) UsedByPath(ref string) string {
return fmt.Sprintf("/api/objects/http/cff_profile/%s/usedby", ref)
}
// GetType implements sophos.Object
func (h *HttpCffProfile) GetType() string { return h.ObjectType }
// HttpDeviceAuths is an Sophos Endpoint subType and implements sophos.RestObject
type HttpDeviceAuths []HttpDeviceAuth
// HttpDeviceAuth represents a UTM device-specific authentication
type HttpDeviceAuth struct {
Locked string `json:"_locked"`
ObjectType string `json:"_type"`
Reference string `json:"_ref"`
// AuthMode can be one of: []string{"none", "aua", "edir_sso", "ntlm", "opendirectory_auth", "browser", "agent"}
AuthMode string `json:"auth_mode"`
Comment string `json:"comment"`
// DeviceType can be one of: []string{"Windows", "Mac OS X", "Linux", "iOS", "Android", "Kindle", "Blackberry"}
DeviceType string `json:"device_type"`
Name string `json:"name"`
}
var _ sophos.RestGetter = &HttpDeviceAuth{}
// GetPath implements sophos.RestObject and returns the HttpDeviceAuths GET path
// Returns all available http/device_auth objects
func (*HttpDeviceAuths) GetPath() string { return "/api/objects/http/device_auth/" }
// RefRequired implements sophos.RestObject
func (*HttpDeviceAuths) RefRequired() (string, bool) { return "", false }
// GetPath implements sophos.RestObject and returns the HttpDeviceAuths GET path
// Returns all available device_auth types
func (h *HttpDeviceAuth) GetPath() string {
return fmt.Sprintf("/api/objects/http/device_auth/%s", h.Reference)
}
// RefRequired implements sophos.RestObject
func (h *HttpDeviceAuth) RefRequired() (string, bool) { return h.Reference, true }
// DeletePath implements sophos.RestObject and returns the HttpDeviceAuth DELETE path
// Creates or updates the complete object device_auth
func (*HttpDeviceAuth) DeletePath(ref string) string {
return fmt.Sprintf("/api/objects/http/device_auth/%s", ref)
}
// PatchPath implements sophos.RestObject and returns the HttpDeviceAuth PATCH path
// Changes to parts of the object device_auth types
func (*HttpDeviceAuth) PatchPath(ref string) string {
return fmt.Sprintf("/api/objects/http/device_auth/%s", ref)
}
// PostPath implements sophos.RestObject and returns the HttpDeviceAuth POST path
// Create a new http/device_auth object
func (*HttpDeviceAuth) PostPath() string {
return "/api/objects/http/device_auth/"
}
// PutPath implements sophos.RestObject and returns the HttpDeviceAuth PUT path
// Creates or updates the complete object device_auth
func (*HttpDeviceAuth) PutPath(ref string) string {
return fmt.Sprintf("/api/objects/http/device_auth/%s", ref)
}
// UsedByPath implements sophos.RestObject
// Returns the objects and the nodes that use the object with the given ref
func (*HttpDeviceAuth) UsedByPath(ref string) string {
return fmt.Sprintf("/api/objects/http/device_auth/%s/usedby", ref)
}
// HttpDomainRegexs is an Sophos Endpoint subType and implements sophos.RestObject
type HttpDomainRegexs []HttpDomainRegex
// HttpDomainRegex represents a UTM whitelist/blacklist
type HttpDomainRegex struct {
Locked string `json:"_locked"`
ObjectType string `json:"_type"`
Reference string `json:"_ref"`
Comment string `json:"comment"`
Domain []interface{} `json:"domain"`
// IncludeSubdomains default value is false
IncludeSubdomains bool `json:"include_subdomains"`
// Mode can be one of: []string{"Domain", "Regex"}
Mode string `json:"mode"`
Name string `json:"name"`
Regexps []interface{} `json:"regexps"`
// RestrictRegex default value is false
RestrictRegex bool `json:"restrict_regex"`
}
var _ sophos.RestGetter = &HttpDomainRegex{}
// GetPath implements sophos.RestObject and returns the HttpDomainRegexs GET path
// Returns all available http/domain_regex objects
func (*HttpDomainRegexs) GetPath() string { return "/api/objects/http/domain_regex/" }
// RefRequired implements sophos.RestObject
func (*HttpDomainRegexs) RefRequired() (string, bool) { return "", false }
// GetPath implements sophos.RestObject and returns the HttpDomainRegexs GET path
// Returns all available domain_regex types
func (h *HttpDomainRegex) GetPath() string {
return fmt.Sprintf("/api/objects/http/domain_regex/%s", h.Reference)
}
// RefRequired implements sophos.RestObject
func (h *HttpDomainRegex) RefRequired() (string, bool) { return h.Reference, true }
// DeletePath implements sophos.RestObject and returns the HttpDomainRegex DELETE path
// Creates or updates the complete object domain_regex
func (*HttpDomainRegex) DeletePath(ref string) string {
return fmt.Sprintf("/api/objects/http/domain_regex/%s", ref)
}
// PatchPath implements sophos.RestObject and returns the HttpDomainRegex PATCH path
// Changes to parts of the object domain_regex types
func (*HttpDomainRegex) PatchPath(ref string) string {
return fmt.Sprintf("/api/objects/http/domain_regex/%s", ref)
}
// PostPath implements sophos.RestObject and returns the HttpDomainRegex POST path
// Create a new http/domain_regex object
func (*HttpDomainRegex) PostPath() string {
return "/api/objects/http/domain_regex/"
}
// PutPath implements sophos.RestObject and returns the HttpDomainRegex PUT path
// Creates or updates the complete object domain_regex
func (*HttpDomainRegex) PutPath(ref string) string {
return fmt.Sprintf("/api/objects/http/domain_regex/%s", ref)
}
// UsedByPath implements sophos.RestObject
// Returns the objects and the nodes that use the object with the given ref
func (*HttpDomainRegex) UsedByPath(ref string) string {
return fmt.Sprintf("/api/objects/http/domain_regex/%s/usedby", ref)
}
// HttpExceptions is an Sophos Endpoint subType and implements sophos.RestObject
type HttpExceptions []HttpException
// HttpException is a generated Sophos object
type HttpException struct {
Locked string `json:"_locked"`
Reference string `json:"_ref"`
ObjectType string `json:"_type"`
Aaa []interface{} `json:"aaa"`
Comment string `json:"comment"`
Domains []string `json:"domains"`
EndpointsGroups []interface{} `json:"endpoints_groups"`
Name string `json:"name"`
Networks []interface{} `json:"networks"`
Operator string `json:"operator"`
Skiplist []string `json:"skiplist"`
SpCategories []interface{} `json:"sp_categories"`
Status bool `json:"status"`
Tags []interface{} `json:"tags"`
UserAgents []interface{} `json:"user_agents"`
}
var _ sophos.RestGetter = &HttpException{}
// GetPath implements sophos.RestObject and returns the HttpExceptions GET path
// Returns all available http/exception objects
func (*HttpExceptions) GetPath() string { return "/api/objects/http/exception/" }
// RefRequired implements sophos.RestObject
func (*HttpExceptions) RefRequired() (string, bool) { return "", false }
// GetPath implements sophos.RestObject and returns the HttpExceptions GET path
// Returns all available exception types
func (h *HttpException) GetPath() string {
return fmt.Sprintf("/api/objects/http/exception/%s", h.Reference)
}
// RefRequired implements sophos.RestObject
func (h *HttpException) RefRequired() (string, bool) { return h.Reference, true }
// DeletePath implements sophos.RestObject and returns the HttpException DELETE path
// Creates or updates the complete object exception
func (*HttpException) DeletePath(ref string) string {
return fmt.Sprintf("/api/objects/http/exception/%s", ref)
}
// PatchPath implements sophos.RestObject and returns the HttpException PATCH path
// Changes to parts of the object exception types
func (*HttpException) PatchPath(ref string) string {
return fmt.Sprintf("/api/objects/http/exception/%s", ref)
}
// PostPath implements sophos.RestObject and returns the HttpException POST path
// Create a new http/exception object
func (*HttpException) PostPath() string {
return "/api/objects/http/exception/"
}
// PutPath implements sophos.RestObject and returns the HttpException PUT path
// Creates or updates the complete object exception
func (*HttpException) PutPath(ref string) string {
return fmt.Sprintf("/api/objects/http/exception/%s", ref)
}
// UsedByPath implements sophos.RestObject
// Returns the objects and the nodes that use the object with the given ref
func (*HttpException) UsedByPath(ref string) string {
return fmt.Sprintf("/api/objects/http/exception/%s/usedby", ref)
}
// GetType implements sophos.Object
func (h *HttpException) GetType() string { return h.ObjectType }
// HttpGroups is an Sophos Endpoint subType and implements sophos.RestObject
type HttpGroups []HttpGroup
// HttpGroup represents a UTM group
type HttpGroup struct {
Locked string `json:"_locked"`
ObjectType string `json:"_type"`
Reference string `json:"_ref"`
Comment string `json:"comment"`
Name string `json:"name"`
}
var _ sophos.RestGetter = &HttpGroup{}
// GetPath implements sophos.RestObject and returns the HttpGroups GET path
// Returns all available http/group objects
func (*HttpGroups) GetPath() string { return "/api/objects/http/group/" }
// RefRequired implements sophos.RestObject
func (*HttpGroups) RefRequired() (string, bool) { return "", false }
// GetPath implements sophos.RestObject and returns the HttpGroups GET path
// Returns all available group types
func (h *HttpGroup) GetPath() string { return fmt.Sprintf("/api/objects/http/group/%s", h.Reference) }
// RefRequired implements sophos.RestObject
func (h *HttpGroup) RefRequired() (string, bool) { return h.Reference, true }
// DeletePath implements sophos.RestObject and returns the HttpGroup DELETE path
// Creates or updates the complete object group
func (*HttpGroup) DeletePath(ref string) string {
return fmt.Sprintf("/api/objects/http/group/%s", ref)
}
// PatchPath implements sophos.RestObject and returns the HttpGroup PATCH path
// Changes to parts of the object group types
func (*HttpGroup) PatchPath(ref string) string {
return fmt.Sprintf("/api/objects/http/group/%s", ref)
}
// PostPath implements sophos.RestObject and returns the HttpGroup POST path
// Create a new http/group object
func (*HttpGroup) PostPath() string {
return "/api/objects/http/group/"
}
// PutPath implements sophos.RestObject and returns the HttpGroup PUT path
// Creates or updates the complete object group
func (*HttpGroup) PutPath(ref string) string {
return fmt.Sprintf("/api/objects/http/group/%s", ref)
}
// UsedByPath implements sophos.RestObject
// Returns the objects and the nodes that use the object with the given ref
func (*HttpGroup) UsedByPath(ref string) string {
return fmt.Sprintf("/api/objects/http/group/%s/usedby", ref)
}
// HttpLocalSites is an Sophos Endpoint subType and implements sophos.RestObject
type HttpLocalSites []HttpLocalSite
// HttpLocalSite represents a UTM local site list entry
type HttpLocalSite struct {
Locked string `json:"_locked"`
ObjectType string `json:"_type"`
Reference string `json:"_ref"`
Comment string `json:"comment"`
// IncludeSubdomains default value is false
IncludeSubdomains bool `json:"include_subdomains"`
Name string `json:"name"`
// Reputation can be one of: []string{"off", "malicious", "suspicious", "unverified", "neutral", "trusted"}
// Reputation default value is "off"
Reputation string `json:"reputation"`
Site string `json:"site"`
Tags []interface{} `json:"tags"`
// Category description: REF(http/sp_subcat)
// Category default value is ""
Category string `json:"category"`
}
var _ sophos.RestGetter = &HttpLocalSite{}
// GetPath implements sophos.RestObject and returns the HttpLocalSites GET path
// Returns all available http/local_site objects
func (*HttpLocalSites) GetPath() string { return "/api/objects/http/local_site/" }
// RefRequired implements sophos.RestObject
func (*HttpLocalSites) RefRequired() (string, bool) { return "", false }
// GetPath implements sophos.RestObject and returns the HttpLocalSites GET path
// Returns all available local_site types
func (h *HttpLocalSite) GetPath() string {
return fmt.Sprintf("/api/objects/http/local_site/%s", h.Reference)
}
// RefRequired implements sophos.RestObject
func (h *HttpLocalSite) RefRequired() (string, bool) { return h.Reference, true }
// DeletePath implements sophos.RestObject and returns the HttpLocalSite DELETE path
// Creates or updates the complete object local_site
func (*HttpLocalSite) DeletePath(ref string) string {
return fmt.Sprintf("/api/objects/http/local_site/%s", ref)
}
// PatchPath implements sophos.RestObject and returns the HttpLocalSite PATCH path
// Changes to parts of the object local_site types
func (*HttpLocalSite) PatchPath(ref string) string {
return fmt.Sprintf("/api/objects/http/local_site/%s", ref)
}
// PostPath implements sophos.RestObject and returns the HttpLocalSite POST path
// Create a new http/local_site object
func (*HttpLocalSite) PostPath() string {
return "/api/objects/http/local_site/"
}
// PutPath implements sophos.RestObject and returns the HttpLocalSite PUT path
// Creates or updates the complete object local_site
func (*HttpLocalSite) PutPath(ref string) string {
return fmt.Sprintf("/api/objects/http/local_site/%s", ref)
}
// UsedByPath implements sophos.RestObject
// Returns the objects and the nodes that use the object with the given ref
func (*HttpLocalSite) UsedByPath(ref string) string {
return fmt.Sprintf("/api/objects/http/local_site/%s/usedby", ref)
}
// HttpLslTags is an Sophos Endpoint subType and implements sophos.RestObject
type HttpLslTags []HttpLslTag
// HttpLslTag represents a UTM tags
type HttpLslTag struct {
Locked string `json:"_locked"`
ObjectType string `json:"_type"`
Reference string `json:"_ref"`
Comment string `json:"comment"`
Name string `json:"name"`
}
var _ sophos.RestGetter = &HttpLslTag{}
// GetPath implements sophos.RestObject and returns the HttpLslTags GET path
// Returns all available http/lsl_tag objects
func (*HttpLslTags) GetPath() string { return "/api/objects/http/lsl_tag/" }
// RefRequired implements sophos.RestObject
func (*HttpLslTags) RefRequired() (string, bool) { return "", false }
// GetPath implements sophos.RestObject and returns the HttpLslTags GET path
// Returns all available lsl_tag types
func (h *HttpLslTag) GetPath() string { return fmt.Sprintf("/api/objects/http/lsl_tag/%s", h.Reference) }
// RefRequired implements sophos.RestObject
func (h *HttpLslTag) RefRequired() (string, bool) { return h.Reference, true }
// DeletePath implements sophos.RestObject and returns the HttpLslTag DELETE path
// Creates or updates the complete object lsl_tag
func (*HttpLslTag) DeletePath(ref string) string {
return fmt.Sprintf("/api/objects/http/lsl_tag/%s", ref)
}
// PatchPath implements sophos.RestObject and returns the HttpLslTag PATCH path
// Changes to parts of the object lsl_tag types
func (*HttpLslTag) PatchPath(ref string) string {
return fmt.Sprintf("/api/objects/http/lsl_tag/%s", ref)
}
// PostPath implements sophos.RestObject and returns the HttpLslTag POST path
// Create a new http/lsl_tag object
func (*HttpLslTag) PostPath() string {
return "/api/objects/http/lsl_tag/"
}
// PutPath implements sophos.RestObject and returns the HttpLslTag PUT path
// Creates or updates the complete object lsl_tag
func (*HttpLslTag) PutPath(ref string) string {
return fmt.Sprintf("/api/objects/http/lsl_tag/%s", ref)
}
// UsedByPath implements sophos.RestObject
// Returns the objects and the nodes that use the object with the given ref
func (*HttpLslTag) UsedByPath(ref string) string {
return fmt.Sprintf("/api/objects/http/lsl_tag/%s/usedby", ref)
}
// HttpPacFiles is an Sophos Endpoint subType and implements sophos.RestObject
type HttpPacFiles []HttpPacFile
// HttpPacFile is a generated Sophos object
type HttpPacFile struct {
Locked string `json:"_locked"`
Reference string `json:"_ref"`
ObjectType string `json:"_type"`
Comment string `json:"comment"`
Content string `json:"content"`
Name string `json:"name"`
Status bool `json:"status"`
}
var _ sophos.RestGetter = &HttpPacFile{}
// GetPath implements sophos.RestObject and returns the HttpPacFiles GET path
// Returns all available http/pac_file objects
func (*HttpPacFiles) GetPath() string { return "/api/objects/http/pac_file/" }
// RefRequired implements sophos.RestObject
func (*HttpPacFiles) RefRequired() (string, bool) { return "", false }
// GetPath implements sophos.RestObject and returns the HttpPacFiles GET path
// Returns all available pac_file types
func (h *HttpPacFile) GetPath() string {
return fmt.Sprintf("/api/objects/http/pac_file/%s", h.Reference)
}
// RefRequired implements sophos.RestObject
func (h *HttpPacFile) RefRequired() (string, bool) { return h.Reference, true }
// DeletePath implements sophos.RestObject and returns the HttpPacFile DELETE path
// Creates or updates the complete object pac_file
func (*HttpPacFile) DeletePath(ref string) string {
return fmt.Sprintf("/api/objects/http/pac_file/%s", ref)
}
// PatchPath implements sophos.RestObject and returns the HttpPacFile PATCH path
// Changes to parts of the object pac_file types
func (*HttpPacFile) PatchPath(ref string) string {
return fmt.Sprintf("/api/objects/http/pac_file/%s", ref)
}
// PostPath implements sophos.RestObject and returns the HttpPacFile POST path
// Create a new http/pac_file object
func (*HttpPacFile) PostPath() string {
return "/api/objects/http/pac_file/"
}
// PutPath implements sophos.RestObject and returns the HttpPacFile PUT path
// Creates or updates the complete object pac_file
func (*HttpPacFile) PutPath(ref string) string {
return fmt.Sprintf("/api/objects/http/pac_file/%s", ref)
}
// UsedByPath implements sophos.RestObject
// Returns the objects and the nodes that use the object with the given ref
func (*HttpPacFile) UsedByPath(ref string) string {
return fmt.Sprintf("/api/objects/http/pac_file/%s/usedby", ref)
}
// GetType implements sophos.Object
func (h *HttpPacFile) GetType() string { return h.ObjectType }
// HttpParentProxys is an Sophos Endpoint subType and implements sophos.RestObject
type HttpParentProxys []HttpParentProxy
// HttpParentProxy represents a UTM parent web proxy
type HttpParentProxy struct {
Locked string `json:"_locked"`
ObjectType string `json:"_type"`
Reference string `json:"_ref"`
// Target description: REF(network/host), REF(network/dns_host), REF(network/availability_group)
Target string `json:"target"`
User string `json:"user"`
Comment string `json:"comment"`
Match []interface{} `json:"match"`
Name string `json:"name"`
Pass string `json:"pass"`
Port int `json:"port"`
}
var _ sophos.RestGetter = &HttpParentProxy{}
// GetPath implements sophos.RestObject and returns the HttpParentProxys GET path
// Returns all available http/parent_proxy objects
func (*HttpParentProxys) GetPath() string { return "/api/objects/http/parent_proxy/" }
// RefRequired implements sophos.RestObject
func (*HttpParentProxys) RefRequired() (string, bool) { return "", false }
// GetPath implements sophos.RestObject and returns the HttpParentProxys GET path
// Returns all available parent_proxy types
func (h *HttpParentProxy) GetPath() string {
return fmt.Sprintf("/api/objects/http/parent_proxy/%s", h.Reference)
}
// RefRequired implements sophos.RestObject
func (h *HttpParentProxy) RefRequired() (string, bool) { return h.Reference, true }
// DeletePath implements sophos.RestObject and returns the HttpParentProxy DELETE path
// Creates or updates the complete object parent_proxy
func (*HttpParentProxy) DeletePath(ref string) string {
return fmt.Sprintf("/api/objects/http/parent_proxy/%s", ref)
}
// PatchPath implements sophos.RestObject and returns the HttpParentProxy PATCH path
// Changes to parts of the object parent_proxy types
func (*HttpParentProxy) PatchPath(ref string) string {
return fmt.Sprintf("/api/objects/http/parent_proxy/%s", ref)
}
// PostPath implements sophos.RestObject and returns the HttpParentProxy POST path
// Create a new http/parent_proxy object
func (*HttpParentProxy) PostPath() string {
return "/api/objects/http/parent_proxy/"
}
// PutPath implements sophos.RestObject and returns the HttpParentProxy PUT path
// Creates or updates the complete object parent_proxy
func (*HttpParentProxy) PutPath(ref string) string {
return fmt.Sprintf("/api/objects/http/parent_proxy/%s", ref)
}
// UsedByPath implements sophos.RestObject
// Returns the objects and the nodes that use the object with the given ref
func (*HttpParentProxy) UsedByPath(ref string) string {
return fmt.Sprintf("/api/objects/http/parent_proxy/%s/usedby", ref)
}
// HttpProfiles is an Sophos Endpoint subType and implements sophos.RestObject
type HttpProfiles []HttpProfile
// HttpProfile is a generated Sophos object
type HttpProfile struct {
Locked string `json:"_locked"`
Reference string `json:"_ref"`
ObjectType string `json:"_type"`
Aua bool `json:"aua"`
BlockOnAuthFailed bool `json:"block_on_auth_failed"`
CffProfiles []string `json:"cff_profiles"`
Comment string `json:"comment"`
DefaultCffAction string `json:"default_cff_action"`
DeviceAuth []interface{} `json:"device_auth"`
EdirSso bool `json:"edir_sso"`
EnableDeviceAuth bool `json:"enable_device_auth"`
EndpointsGroups []interface{} `json:"endpoints_groups"`
FullTransparent bool `json:"full_transparent"`
InProgress bool `json:"in_progress"`
Name string `json:"name"`
Networks []interface{} `json:"networks"`
Ntlm bool `json:"ntlm"`
OpendirectoryAuth bool `json:"opendirectory_auth"`
OrderedCffProfiles []string `json:"ordered_cff_profiles"`
OutInterface string `json:"out_interface"`
ScanSslOpt string `json:"scan_ssl_opt"`
SelectiveScanCat []string `json:"selective_scan_cat"`
SelectiveScanTags []interface{} `json:"selective_scan_tags"`
Status bool `json:"status"`
Transparent bool `json:"transparent"`
TransparentAac bool `json:"transparent_aac"`
TransparentAuth bool `json:"transparent_auth"`
}
var _ sophos.RestGetter = &HttpProfile{}
// GetPath implements sophos.RestObject and returns the HttpProfiles GET path
// Returns all available http/profile objects
func (*HttpProfiles) GetPath() string { return "/api/objects/http/profile/" }
// RefRequired implements sophos.RestObject
func (*HttpProfiles) RefRequired() (string, bool) { return "", false }
// GetPath implements sophos.RestObject and returns the HttpProfiles GET path
// Returns all available profile types
func (h *HttpProfile) GetPath() string {
return fmt.Sprintf("/api/objects/http/profile/%s", h.Reference)
}
// RefRequired implements sophos.RestObject
func (h *HttpProfile) RefRequired() (string, bool) { return h.Reference, true }
// DeletePath implements sophos.RestObject and returns the HttpProfile DELETE path
// Creates or updates the complete object profile
func (*HttpProfile) DeletePath(ref string) string {
return fmt.Sprintf("/api/objects/http/profile/%s", ref)
}
// PatchPath implements sophos.RestObject and returns the HttpProfile PATCH path
// Changes to parts of the object profile types
func (*HttpProfile) PatchPath(ref string) string {
return fmt.Sprintf("/api/objects/http/profile/%s", ref)
}
// PostPath implements sophos.RestObject and returns the HttpProfile POST path
// Create a new http/profile object
func (*HttpProfile) PostPath() string {
return "/api/objects/http/profile/"
}
// PutPath implements sophos.RestObject and returns the HttpProfile PUT path
// Creates or updates the complete object profile
func (*HttpProfile) PutPath(ref string) string {
return fmt.Sprintf("/api/objects/http/profile/%s", ref)
}
// UsedByPath implements sophos.RestObject
// Returns the objects and the nodes that use the object with the given ref
func (*HttpProfile) UsedByPath(ref string) string {
return fmt.Sprintf("/api/objects/http/profile/%s/usedby", ref)
}
// GetType implements sophos.Object
func (h *HttpProfile) GetType() string { return h.ObjectType }
// HttpSpCategorys is an Sophos Endpoint subType and implements sophos.RestObject
type HttpSpCategorys []HttpSpCategory
// HttpSpCategory is a generated Sophos object
type HttpSpCategory struct {
Locked string `json:"_locked"`
Reference string `json:"_ref"`
ObjectType string `json:"_type"`
Comment string `json:"comment"`
ID string `json:"id"`
Name string `json:"name"`
Subcats []string `json:"subcats"`
}
var _ sophos.RestGetter = &HttpSpCategory{}
// GetPath implements sophos.RestObject and returns the HttpSpCategorys GET path
// Returns all available http/sp_category objects
func (*HttpSpCategorys) GetPath() string { return "/api/objects/http/sp_category/" }