forked from canada-ca/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.faker.graphql
More file actions
1735 lines (1609 loc) · 54.2 KB
/
Copy pathschema.faker.graphql
File metadata and controls
1735 lines (1609 loc) · 54.2 KB
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
# Exposes a URL that specifies the behaviour of this scalar.
directive @specifiedBy(
# The URL that specifies the behaviour of this scalar.
url: String!
) on SCALAR
# A field whose value is an upper case letter or an under score that has a length between 1 and 50.
scalar Acronym
input AuthenticateInput {
# Security code found in text msg, or email inbox.
authenticationCode: Int!
# The JWT that is retrieved from the sign in mutation.
authenticateToken: String!
clientMutationId: String
}
type AuthenticatePayload {
# The authenticated users information, and JWT.
authResult: AuthResult
clientMutationId: String
}
# An object used to return information when users sign up or authenticate.
type AuthResult {
# JWT used for accessing controlled content.
authToken: String
# User that has just been created or signed in.
user: PersonalUser
}
# This object contains the list of different categories for pre-computed
# summary data with the computed total for how many domains in total are
# being compared.
type CategorizedSummary {
# List of SummaryCategory objects with data for different computed categories.
categories: [SummaryCategory] @listLength(min: 2, max: 2)
# Total domains that were check under this summary.
total: Int @fake(
type: number
options: { minNumber: 0, maxNumber: 20, precisionNumber: 1 }
)
}
# This object displays the percentages of the category totals.
type CategoryPercentages {
# Percentage of messages that are failing all checks.
failPercentage: Float @examples(values: [25.64, 57.89, 54.38, 93.48])
# Percentage of messages that are passing all checks.
fullPassPercentage: Float @examples(values: [25.64, 57.89, 54.38, 93.48])
# Percentage of messages that are passing only dkim.
passDkimOnlyPercentage: Float @examples(values: [25.64, 57.89, 54.38, 93.48])
# Percentage of messages that are passing only spf.
passSpfOnlyPercentage: Float @examples(values: [25.64, 57.89, 54.38, 93.48])
# The total amount of messages sent by this domain.
totalMessages: Int @examples(values: [86954, 57896, 54386, 93456, 23452])
}
# This object displays the total amount of messages that fit into each category.
type CategoryTotals {
# Amount of messages that are passing SPF, but failing DKIM.
passSpfOnly: Int @examples(values: [8694, 5896, 5436, 9345, 2345])
# Amount of messages that are passing DKIM, but failing SPF.
passDkimOnly: Int @examples(values: [8694, 5896, 5436, 9345, 2345])
# Amount of messages that are passing SPF and DKIM.
fullPass: Int @examples(values: [8694, 5896, 5436, 9345, 2345])
# Amount of messages that fail both SPF and DKIM.
fail: Int @examples(values: [8694, 5896, 5436, 9345, 2345])
}
input CreateDomainInput {
# The global id of the organization you wish to assign this domain to.
orgId: ID!
# Url that you would like to be added to the database.
domain: DomainScalar!
# DKIM selector strings corresponding to this domain.
selectors: [Selector]
clientMutationId: String
}
type CreateDomainPayload {
# The newly created domain.
domain: Domain
clientMutationId: String
}
input CreateOrganizationInput {
# The English acronym of the organization.
acronymEN: Acronym!
# The French acronym of the organization.
acronymFR: Acronym!
# The English name of the organization.
nameEN: String!
# The French name of the organization.
nameFR: String!
# The English translation of the zone the organization belongs to.
zoneEN: String!
# The English translation of the zone the organization belongs to.
zoneFR: String!
# The English translation of the sector the organization belongs to.
sectorEN: String!
# The French translation of the sector the organization belongs to.
sectorFR: String!
# The English translation of the country the organization resides in.
countryEN: String!
# The French translation of the country the organization resides in.
countryFR: String!
# The English translation of the province the organization resides in.
provinceEN: String!
# The French translation of the province the organization resides in.
provinceFR: String!
# The English translation of the city the organization resides in.
cityEN: String!
# The French translation of the city the organization resides in.
cityFR: String!
clientMutationId: String
}
type CreateOrganizationPayload {
# The newly created organization.
organization: Organization
clientMutationId: String
}
# A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the
# `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO
# 8601 standard for representation of dates and times using the Gregorian calendar.
scalar DateTime
# Object that contains the various senders and details for each category.
type DetailTables {
# List of senders that are failing DKIM checks.
dkimFailure(
after: String
first: Int
before: String
last: Int
): DkimFailureTableConnection
# List of senders that are failing DMARC checks.
dmarcFailure(
after: String
first: Int
before: String
last: Int
): DmarcFailureTableConnection
# List of senders that are passing all checks.
fullPass(
after: String
first: Int
before: String
last: Int
): FullPassTableConnection
# List of senders that are failing SPF checks.
spfFailure(
after: String
first: Int
before: String
last: Int
): SpfFailureTableConnection
}
# DomainKeys Identified Mail (DKIM) permits a person, role, or
# organization that owns the signing domain to claim some
# responsibility for a message by associating the domain with the
# message. This can be an author's organization, an operational relay,
# or one of their agents.
type DKIM implements Node {
# The ID of an object
id: ID!
# The domain the scan was ran on.
domain: Domain
# The time when the scan was initiated.
timestamp: String @fake(type: pastDate)
# Individual scans results for each dkim selector.
results(
after: String
first: Int
before: String
last: Int
): DKIMResultConnection
}
# A connection to a list of items.
type DKIMConnection {
# Information to aid in pagination.
pageInfo: PageInfo!
# A list of edges.
edges: [DKIMEdge] @listLength(min: 0, max: 5)
# The total amount of dkim scans related to a given domain.
totalCount: Int
@fake(
type: number
options: { minNumber: 0, maxNumber: 20, precisionNumber: 1 }
)
}
# An edge in a connection.
type DKIMEdge {
# The item at the end of the edge
node: DKIM
# A cursor for use in pagination
cursor: String!
}
# This table contains the data fields for senders who are in the DKIM fail category.
type DkimFailureTable {
# The ID of the object.
id: ID
# Is DKIM aligned.
dkimAligned: Boolean @examples(values: [true, false])
# Domains used for DKIM validation
dkimDomains: String @examples(values: ["test.dkim.gc.ca", "test.dkim.canada.ca"])
# The results of DKIM verification of the message. Can be pass, fail, neutral, temp-error, or perm-error.
dkimResults: String @examples(values: ["", "fail", "permerror"])
# Pointer to a DKIM public key record in DNS.
dkimSelectors: String @examples(values: ["selector1", "selector2", "selector3"])
# Host from reverse DNS of source IP address.
dnsHost: String @examples(values: ["test.dns.gc.ca", "test.dns.canada.ca"])
# Domain from SMTP banner message.
envelopeFrom: String @examples(values: ["test.envelope.gc.ca", "test.envelope.canada.ca"])
# Guidance for any issues that were found from the report.
guidance: String @examples(values: ["agg-dkim-failed", "agg-dkim-strict", "agg-dkim-unsigned"])
# The address/domain used in the "From" field.
headerFrom: String @examples(values: ["test.header.gc.ca", "test.header.canada.ca"])
# IP address of sending server.
sourceIpAddress: String @examples(values: ["123.456.78.91", "987.654.32.19"])
# Total messages from this sender.
totalMessages: Int @examples(values: [1247, 5687])
}
# A connection to a list of items.
type DkimFailureTableConnection {
# Information to aid in pagination.
pageInfo: PageInfo!
# A list of edges.
edges: [DkimFailureTableEdge] @listLength(min: 0, max: 5)
}
# An edge in a connection.
type DkimFailureTableEdge {
# The item at the end of the edge
node: DkimFailureTable
# A cursor for use in pagination
cursor: String!
}
# Individual scans results for the given dkim selector.
type DKIMResult implements Node {
# The ID of an object
id: ID!
# The dkim scan information that this result belongs to.
dkim: DKIM
# The selector the scan was ran on.
selector: String @examples(values: ["selector1", "selector2", "selector3"])
# DKIM record retrieved during the scan of the domain.
record: String @examples(
values: [
"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3rvAQg9bl72tae1RFu4zdx1ZE4E8VUbQfxDcm;"
]
)
# Size of the Public Key in bits
keyLength: String @examples(values: ["sub1024", "1024", "2048", "2048plus"])
# Raw scan result.
rawJson: JSON
# Key tags found during scan.
guidanceTags(
after: String
first: Int
before: String
last: Int
): GuidanceTagConnection
}
# A connection to a list of items.
type DKIMResultConnection {
# Information to aid in pagination.
pageInfo: PageInfo!
# A list of edges.
edges: [DKIMResultEdge] @listLength(min: 0, max: 5)
# The total amount of dkim results related to a given domain.
totalCount: Int
@fake(
type: number
options: { minNumber: 0, maxNumber: 20, precisionNumber: 1 }
)
}
# An edge in a connection.
type DKIMResultEdge {
# The item at the end of the edge
node: DKIMResult
# A cursor for use in pagination
cursor: String!
}
# Domain-based Message Authentication, Reporting, and Conformance
# (DMARC) is a scalable mechanism by which a mail-originating
# organization can express domain-level policies and preferences for
# message validation, disposition, and reporting, that a mail-receiving
# organization can use to improve mail handling.
type DMARC implements Node {
# The ID of an object
id: ID!
# The domain the scan was ran on.
domain: Domain
# The time when the scan was initiated.
timestamp: String @fake(type: pastDate)
# DMARC phase found during scan.
dmarcPhase: Int @examples(values: [1, 2, 3, 4])
# DMARC record retrieved during scan.
record: String @examples(
values: [
"v=DMARC1; p=none; pct=100; rua=mailto:dmarc@cyber.gc.ca; ruf=mailto:dmarc@cyber.gc.ca; fo=1"
"v=DMARC1; p=none; sp=none; rua=mailto:dmarc@cyber.gc.ca"
]
)
# The requested policy you wish mailbox providers to apply
# when your email fails DMARC authentication and alignment checks.
pPolicy: String @examples(values: ["none", "missing", "quarantine", "reject"])
# This tag is used to indicate a requested policy for all
# subdomains where mail is failing the DMARC authentication and alignment checks.
spPolicy: String @examples(values: ["none", "missing", "quarantine", "reject"])
# The percentage of messages to which the DMARC policy is to be applied.
pct: Int @examples(values: [0, 20, 60, 70, 90, 100])
# Raw scan result.
rawJson: JSON
# Key tags found during DMARC Scan.
guidanceTags(
after: String
first: Int
before: String
last: Int
): GuidanceTagConnection
}
# A connection to a list of items.
type DMARCConnection {
# Information to aid in pagination.
pageInfo: PageInfo!
# A list of edges.
edges: [DMARCEdge] @listLength(min: 0, max: 5)
# The total amount of dmarc scans related to a given domain.
totalCount: Int @fake(
type: number
options: { minNumber: 0, maxNumber: 20, precisionNumber: 1 }
)
}
# An edge in a connection.
type DMARCEdge {
# The item at the end of the edge
node: DMARC
# A cursor for use in pagination
cursor: String!
}
# This table contains the data fields for senders who are in the DMARC failure category.
type DmarcFailureTable {
# The ID of the object
id: ID
# Domains used for DKIM validation
dkimDomains: String @examples(values: ["test.dkim.gc.ca", "test.dkim.canada.ca"])
# Pointer to a DKIM public key record in DNS.
dkimSelectors: String @examples(values: ["selector1", "selector2", "selector3"])
# The DMARC enforcement action that the receiver took, either none, quarantine, or reject.
disposition: String @examples(values: ["none", "quarantine", "reject"])
# Host from reverse DNS of source IP address.
dnsHost: String @examples(values: ["test.dns.gc.ca", "test.dns.canada.ca"])
# Domain from SMTP banner message.
envelopeFrom: String @examples(values: ["test.envelope.gc.ca", "test.envelope.canada.ca"])
# The address/domain used in the "From" field.
headerFrom: String @examples(values: ["test.header.gc.ca", "test.header.canada.ca"])
# IP address of sending server.
sourceIpAddress: String @examples(values: ["123.456.78.91", "987.654.32.19"])
# Domains used for SPF validation.
spfDomains: String @examples(values: ["test.spf.gc.ca", "test.spf.canada.ca"])
# Total messages from this sender.
totalMessages: Int @examples(values: [1247, 5687])
}
# A connection to a list of items.
type DmarcFailureTableConnection {
# Information to aid in pagination.
pageInfo: PageInfo!
# A list of edges.
edges: [DmarcFailureTableEdge] @listLength(min: 0, max: 5)
}
# An edge in a connection.
type DmarcFailureTableEdge {
# The item at the end of the edge
node: DmarcFailureTable
# A cursor for use in pagination
cursor: String!
}
# Domain object containing information for a given domain.
type Domain implements Node {
# The ID of an object
id: ID!
# Domain that scans will be ran on.
domain: DomainScalar @examples(
values: [
"javascript:alert('XSS')"
"javascript:eval('aler'+(!![]+[])[+[]])('xss')"
"rcmp-grc.gc.ca"
"tbs-sct.gc.ca"
"canada.ca"
"cra-arc.gc.ca"
"pm.gc.ca"
"cse-cst.gc.ca"
"forces.gc.ca"
"jAva	script:alert('XSS')"
"cra.arc.gc.ca"
"cra-arc.gc.ca"
"cse-cst.gc.ca"
"cyber.gc.ca"
"dfait-maeci.gc.ca"
"dfo-mpo.gc.ca"
"ec.gc.ca"
"forces.gc.ca"
"gccollab.ca"
"gccollaboration.ca"
"goc-gdc.ca"
"hc-sc.gc.ca"
]
)
# The last time that a scan was ran on this domain.
lastRan: String @fake(type: recentDate)
# Domain Keys Identified Mail (DKIM) selector strings associated with domain.
selectors: [Selector] @listLength(min: 0, max: 2)
# The domains scan status, based on the latest scan data.
status: DomainStatus
# The organization that this domain belongs to.
organizations(
after: String
first: Int
before: String
last: Int
): OrganizationConnection
# DKIM, DMARC, and SPF scan results.
email: EmailScan
# HTTPS, and SSL scan results.
web: WebScan
# Summarized DMARC aggregate reports.
dmarcSummaryByPeriod(
# The month in which the returned data is relevant to.
month: PeriodEnums!
# The year in which the returned data is relevant to.
year: Year!
): Period
# Yearly summarized DMARC aggregate reports.
yearlyDmarcSummaries: [Period] @listLength(min: 13, max: 13)
}
# A connection to a list of items.
type DomainConnection {
# Information to aid in pagination.
pageInfo: PageInfo!
# A list of edges.
edges: [DomainEdge] @listLength(min: 0, max: 5)
# The total amount of domains the user has access to.
totalCount: Int
@fake(
type: number
options: { minNumber: 0, maxNumber: 20, precisionNumber: 1 }
)
}
# An edge in a connection.
type DomainEdge {
# The item at the end of the edge
node: Domain
# A cursor for use in pagination
cursor: String!
}
# String that conforms to a domain structure.
scalar DomainScalar
# This object contains how the domain is doing on the various scans we preform, based on the latest scan data.
type DomainStatus {
# DKIM Status
dkim: StatusEnum
# DMARC Status
dmarc: StatusEnum
# HTTPS Status
https: StatusEnum
# SPF Status
spf: StatusEnum
# SSL Status
ssl: StatusEnum
}
# A field whose value conforms to the standard internet email address format as
# specified in RFC822: https://www.w3.org/Protocols/rfc822/.
scalar EmailAddress
# Results of DKIM, DMARC, and SPF scans on the given domain.
type EmailScan {
# The domain the scan was ran on.
domain: Domain
# DomainKeys Identified Mail (DKIM) Signatures scan results.
dkim(
# Start date for date filter.
starDate: DateTime
# End date for date filter.
endDate: DateTime
after: String
first: Int
before: String
last: Int
): DKIMConnection
# Domain-based Message Authentication, Reporting, and Conformance (DMARC) scan results.
dmarc(
# Start date for date filter.
starDate: DateTime
# End date for date filter.
endDate: DateTime
after: String
first: Int
before: String
last: Int
): DMARCConnection
# Sender Policy Framework (SPF) scan results.
spf(
# Start date for date filter.
starDate: DateTime
# End date for date filter.
endDate: DateTime
after: String
first: Int
before: String
last: Int
): SPFConnection
}
# This table contains the data fields for senders who are in the Full Pass category.
type FullPassTable {
# The ID of the object
id: ID
# Domains used for DKIM validation
dkimDomains: String @examples(values: ["test.dkim.gc.ca", "test.dkim.canada.ca"])
# Pointer to a DKIM public key record in DNS.
dkimSelectors: String @examples(values: ["selector1", "selector2", "selector3"])
# Host from reverse DNS of source IP address.
dnsHost: String @examples(values: ["test.dns.gc.ca", "test.dns.canada.ca"])
# Domain from SMTP banner message.
envelopeFrom: String @examples(values: ["test.envelope.gc.ca", "test.envelope.canada.ca"])
# The address/domain used in the "From" field.
headerFrom: String @examples(values: ["test.header.gc.ca", "test.header.canada.ca"])
# IP address of sending server.
sourceIpAddress: String @examples(values: ["123.456.78.91", "987.654.32.19"])
# Domains used for SPF validation.
spfDomains: String @examples(values: ["test.spf.gc.ca", "test.spf.canada.ca"])
# Total messages from this sender.
totalMessages: Int @examples(values: [1247, 5687])
}
# A connection to a list of items.
type FullPassTableConnection {
# Information to aid in pagination.
pageInfo: PageInfo!
# A list of edges.
edges: [FullPassTableEdge] @listLength(min: 0, max: 5)
}
# An edge in a connection.
type FullPassTableEdge {
# The item at the end of the edge
node: FullPassTable
# A cursor for use in pagination
cursor: String!
}
# Details for a given guidance tag based on https://github.com/canada-ca/tracker/wiki/Guidance-Tags
type GuidanceTag implements Node {
# The ID of an object
id: ID!
# The guidance tag ID.
tagId: String @listLength(min: 0, max: 4)
@examples(
values: [
"dkim1"
"dkim2"
"dkim3"
"dkim4"
]
)
# The guidance tag name.
tagName: String @examples(
values: [
"DKIM-GC",
"DKIM-missing",
"DKIM-missing-mx-O365",
"DKIM-missing-O365-misconfigured"
]
)
# Guidance for changes to record, or to maintain current stance.
guidance: String @examples(
values: [
"Government of Canada domains subject to TBS guidelines",
"Follow implementation guide",
"DKIM record missing but MX uses O365. Follow cloud-specific guidance",
"DKIM CNAMEs do not exist, but MX points to *.onmicrosoft.com and SPF record includes O365.",
]
)
# Links to implementation guidance for a given tag.
refLinks: [RefLinks] @listLength(min: 0, max: 4)
# Links to technical information for a given tag.
refLinksTech: [RefLinks] @listLength(min: 0, max: 4)
}
# A connection to a list of items.
type GuidanceTagConnection {
# Information to aid in pagination.
pageInfo: PageInfo!
# A list of edges.
edges: [GuidanceTagEdge] @listLength(min: 0, max: 5)
# The total amount of guidance tags for a given scan type.
totalCount: Int
@fake(
type: number
options: { minNumber: 0, maxNumber: 20, precisionNumber: 1 }
)
}
# An edge in a connection.
type GuidanceTagEdge {
# The item at the end of the edge
node: GuidanceTag
# A cursor for use in pagination
cursor: String!
}
# Hyper Text Transfer Protocol Secure scan results.
type HTTPS implements Node {
# The ID of an object
id: ID!
# The domain the scan was ran on.
domain: Domain
# The time the scan was initiated.
timestamp: String @fake(type: pastDate)
# State of the HTTPS implementation on the server and any issues therein.
implementation: String @examples(values: ["Valid HTTPS", "Downgrades HTTPS", "Bad Chain", "Bad Hostname"])
# Degree to which HTTPS is enforced on the server based on behaviour.
enforced: String @examples(values: ["Strict", "Moderate", "Weak", "Not Enforced"])
# Presence and completeness of HSTS implementation.
hsts: String @examples(values: ["HSTS Fully Implemented", "HSTS Max Age Too Short", "No HSTS"])
# Denotes how long the domain should only be accessed using HTTPS
hstsAge: String @examples(values: ["31622400", "21672901"])
# Denotes whether the domain has been submitted and included within HSTS preload list.
preloaded: String @examples(values: ["HSTS Preloaded", "HSTS Preload Ready", "HSTS Not Preloaded"])
# Raw scan result.
rawJson: JSON
# Key tags found during scan.
guidanceTags(
after: String
first: Int
before: String
last: Int
): GuidanceTagConnection
}
# A connection to a list of items.
type HTTPSConnection {
# Information to aid in pagination.
pageInfo: PageInfo!
# A list of edges.
edges: [HTTPSEdge] @listLength(min: 0, max: 5)
# The total amount of https scans for a given domain.
totalCount: Int
@fake(
type: number
options: { minNumber: 0, maxNumber: 20, precisionNumber: 1 }
)
}
# An edge in a connection.
type HTTPSEdge {
# The item at the end of the edge
node: HTTPS
# A cursor for use in pagination
cursor: String!
}
input InviteUserToOrgInput {
# Users email that you would like to invite to your org.
userName: EmailAddress!
# The role which you would like this user to have.
requestedRole: RoleEnums!
# The organization you wish to invite the user to.
orgId: ID!
# The language in which the email will be sent in.
preferredLang: LanguageEnums!
clientMutationId: String
}
type InviteUserToOrgPayload {
# Informs the user if the invite or invite email was successfully sent.
status: String
clientMutationId: String
}
# The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
scalar JSON
# An enum used to define user's language.
enum LanguageEnums {
# Used for defining if English is the preferred language.
ENGLISH
# Used for defining if French is the preferred language.
FRENCH
}
type Mutation {
# Mutation used to create a new domain for an organization.
createDomain(input: CreateDomainInput!): CreateDomainPayload
# This mutation allows the removal of unused domains.
removeDomain(input: RemoveDomainInput!): RemoveDomainPayload
# Mutation allows the modification of domains if domain is updated through out its life-cycle
updateDomain(input: UpdateDomainInput!): UpdateDomainPayload
# This mutation allows the creation of an organization inside the database.
createOrganization(input: CreateOrganizationInput!): CreateOrganizationPayload
# This mutation allows the removal of unused organizations.
removeOrganization(input: RemoveOrganizationInput!): RemoveOrganizationPayload
# Mutation allows the modification of organizations if any changes to the organization may occur.
updateOrganization(input: UpdateOrganizationInput!): UpdateOrganizationPayload
# Mutation allows the verification of an organization.
verifyOrganization(input: VerifyOrganizationInput!): VerifyOrganizationPayload
# This mutation is used to run a manual scan on a requested domain.
requestScan(input: RequestScanInput!): RequestScanPayload
# This mutation allows users to give their credentials and retrieve a token that gives them access to restricted content.
authenticate(input: AuthenticateInput!): AuthenticatePayload
# This mutation allows the user to take the token they received in their email to reset their password.
resetPassword(input: ResetPasswordInput!): ResetPasswordPayload
# This mutation is used for re-sending a verification email if it failed during user creation.
sendEmailVerification(
input: SendEmailVerificationInput!
): SendEmailVerificationPayload
# This mutation allows a user to provide their username and request that a
# password reset email be sent to their account with a reset token in a url.
sendPasswordResetLink(
input: SendPasswordResetLinkInput!
): SendPasswordResetLinkPayload
# This mutation is used for sending a text message with a random six digit code used to verify the user.
sendPhoneCode(input: sendPhoneCodeInput!): sendPhoneCodePayload
# This mutation allows users to give their credentials and be taken to the authentication page to verify their account
signIn(input: SignInInput!): SignInPayload
# This mutation allows for new users to sign up for our sites services.
signUp(input: SignUpInput!): SignUpPayload
# This mutation allows the user to update their account password.
updateUserPassword(input: UpdateUserPasswordInput!): UpdateUserPasswordPayload
# This mutation allows the user to update their user profile to change various details of their current profile.
updateUserProfile(input: UpdateUserProfileInput!): UpdateUserProfilePayload
# This mutation allows the user to verify their account through a token sent in an email.
verifyAccount(input: VerifyAccountInput!): VerifyAccountPayload
# This mutation allows the user to two factor authenticate.
verifyPhoneNumber(input: verifyPhoneNumberInput!): verifyPhoneNumberPayload
# This mutation allows admins and higher to invite users to any of their
# organizations, if the invited user does not have an account, they will be
# able to sign-up and be assigned to that organization in one mutation.
inviteUserToOrg(input: InviteUserToOrgInput!): InviteUserToOrgPayload
removeUserFromOrg(input: RemoveUserFromOrgInput!): RemoveUserFromOrgPayload
# This mutation allows super admins, and admins of the given organization to
# update the permission level of a given user that already belongs to the
# given organization.
updateUserRole(input: UpdateUserRoleInput!): UpdateUserRolePayload
}
# An object with an ID
interface Node {
# The id of the object.
id: ID!
}
# Organization object containing information for a given Organization.
type Organization implements Node {
# The ID of an object
id: ID!
# The organizations acronym.
acronym: Acronym @examples(values: ["TBS", "CSE", "DND"])
# The full name of the organization.
name: String @fake(type: companyName)
# Slugified name of the organization.
slug: Slug @examples(
values: [
"treasury-board-secretariat"
"environment-canada"
"health-canada"
"canada-revenue-agency"
"fisheries-and-oceans-canada"
]
)
# The zone which the organization belongs to.
zone: String @examples(values: ["Federal", "Provincial"])
# The sector which the organization belongs to.
sector: String @examples(values: ["government", "energy", "research"])
# The country in which the organization resides.
country: String @examples(values: ["Canada"])
# The province in which the organization resides.
province: String @examples(values: ["Ontario", "Nova Scotia", "Quebec"])
# The city in which the organization resides.
city: String @examples(values: ["Ottawa", "Halifax", "Montreal"])
# Wether the organization is a verified organization.
verified: Boolean @examples(values: [true, false])
# Summaries based on scan types that are preformed on the given organizations domains.
summaries: OrganizationSummary
# The number of domains associated with this organization.
domainCount: Int @fake(
type: number
options: { minNumber: 0, maxNumber: 20, precisionNumber: 1 }
)
# The domains which are associated with this organization.
domains(
# Limit domains to those that belong to an organization that has ownership.
ownership: Boolean
after: String
first: Int
before: String
last: Int
): DomainConnection
# Organization affiliations to various users.
affiliations(
after: String
first: Int
before: String
last: Int
): UserAffiliationsConnection
}
# A connection to a list of items.
type OrganizationConnection {
# Information to aid in pagination.
pageInfo: PageInfo!
# A list of edges.
edges: [OrganizationEdge] @listLength(min: 1, max: 13)
# The total amount of organizations the user has access to.
totalCount: Int
@fake(
type: number
options: { minNumber: 0, maxNumber: 20, precisionNumber: 1 }
)
}
# An edge in a connection.
type OrganizationEdge {
# The item at the end of the edge
node: Organization
# A cursor for use in pagination
cursor: String!
}
# Summaries based on domains that the organization has claimed.
type OrganizationSummary {
# Summary based on mail scan results for a given organization.
mail: CategorizedSummary
# Summary based on web scan results for a given organization.
web: CategorizedSummary
}
# Information about pagination in a connection.
type PageInfo {
# When paginating forwards, are there more items?
hasNextPage: Boolean! @examples(values: [true, false])
# When paginating backwards, are there more items?
hasPreviousPage: Boolean! @examples(values: [true, false])
# When paginating backwards, the cursor to continue.
startCursor: String
# When paginating forwards, the cursor to continue.
endCursor: String
}
# Object that contains information for each data collection period.
type Period {
# The domain that the data in this period belongs to.
domain: DomainScalar
# Start date of data collection.
month: PeriodEnums
# End date of data collection.
year: Year
# Category percentages based on the category totals.
categoryPercentages: CategoryPercentages
# Category totals for quick viewing.
categoryTotals: CategoryTotals
# Various senders for each category.
detailTables: DetailTables
}
# An enum used to select information from the dmarc-report-api.
enum PeriodEnums {
# The month of January.
JANUARY
# The month of February.
FEBRUARY
# The month of March.
MARCH
# The month of April.
APRIL
# The month of May.
MAY
# The month of June.
JUNE
# The month of July.
JULY
# The month of August.
AUGUST
# The month of September.
SEPTEMBER
# The month of October.
OCTOBER
# The month of November.
NOVEMBER
# The month of December.
DECEMBER
# The last 30 days.
LAST30DAYS
}
# This object is used for showing personal user details,
# and is used for only showing the details of the querying user.
type PersonalUser implements Node {
# The ID of an object
id: ID!
# Users email address.
userName: EmailAddress @fake(type: email)
# Name displayed to other users.
displayName: String @fake(type: firstName)
# The phone number the user has setup with tfa.
phoneNumber: PhoneNumber @fake(type: phoneNumber)
# Users preferred language.
preferredLang: LanguageEnums @examples(values: ["ENGLISH", "FRENCH"])
# Has the user completed phone validation.
phoneValidated: Boolean @examples(values: [false, true])
# Has the user email verified their account.
emailValidated: Boolean @examples(values: [false, true])
# The method in which TFA codes are sent.
tfaSendMethod: TFASendMethodEnum @examples(values: ["PHONE", "EMAIL"])
# Users affiliations to various organizations.
affiliations(
after: String
first: Int
before: String
last: Int
): UserAffiliationsConnection
}
# A field whose value conforms to the standard E.164 format as specified in:
# https://en.wikipedia.org/wiki/E.164. Basically this is +17895551234.
scalar PhoneNumber
type Query {
# Fetches an object given its ID
node(
# The ID of an object
id: ID!
): Node
# Fetches objects given their IDs
nodes(
# The IDs of objects
ids: [ID!]!
): [Node]!
# Retrieve a specific domain by providing a domain.
findDomainByDomain(
# The domain you wish to retrieve information for.
domain: DomainScalar!
): Domain
# Select domains a user has access to.
findMyDomains(
# Limit domains to those that belong to an organization that has ownership.
ownership: Boolean
after: String
first: Int
before: String
last: Int
): DomainConnection
# Select organizations a user has access to.
findMyOrganizations(
after: String
first: Int
before: String
last: Int
): OrganizationConnection
# Select all information on a selected organization that a user has access to.
findOrganizationBySlug(
# The slugified organization name you want to retrieve data for.
orgSlug: Slug!
): Organization
# Email summary computed values, used to build summary cards.
mailSummary: CategorizedSummary
# Web summary computed values, used to build summary cards.
webSummary: CategorizedSummary
# Query used to check if the user has an admin role.
isUserAdmin: Boolean
# Query a specific user by user name.
findUserByUsername(
# Email address of user you wish to gather data for.
userName: EmailAddress!
): SharedUser
# Query the currently logged in user.
findMe: PersonalUser