-
Notifications
You must be signed in to change notification settings - Fork 124
/
errors.rb
824 lines (656 loc) · 27.3 KB
/
errors.rb
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
# frozen_string_literal: true
# This file maintains the collection of possible errors emitted by Conjur using
# the standard numbering scheme.
#
# For the next available code, use the command `rake error_code:next` in the
# repo root.
#
# See also ./logs.rb
module Errors
module Conjur
RequiredResourceMissing = ::Util::TrackableErrorClass.new(
msg: "Missing required resource: {0-resource-name}",
code: "CONJ00036E"
)
RequiredSecretMissing = ::Util::TrackableErrorClass.new(
msg: "Missing value for resource: {0-resource-name}",
code: "CONJ00037E"
)
InsufficientPasswordComplexity = ::Util::TrackableErrorClass.new(
msg: "The password you have chosen does not meet the complexity requirements. " \
"Choose a password that includes: 12-128 characters, 2 uppercase letters, " \
"2 lowercase letters, 1 digit and 1 special character",
code: "CONJ00046E"
)
InvalidTrustedProxies = ::Util::TrackableErrorClass.new(
msg: "Invalid IP address or CIDR address range in TRUSTED_PROXIES: {0-cidr}",
code: "CONJ00065E"
)
BadSecretEncoding = ::Util::TrackableErrorClass.new(
msg: "Issue encoding secret into JSON format, try including 'Accept-Encoding: base64' " \
"header in request.",
code: "CONJ00074E"
)
MissingSecretValue = ::Util::TrackableErrorClass.new(
msg: "Variable {0-variable-id} is empty or not found.",
code: "CONJ00076E"
)
KeyRotationNotApplicable = ::Util::TrackableErrorClass.new(
msg: "Resource '{0-role_to_rotate}' is not applicable for key rotation",
code: "CONJ00120E"
)
ApiKeyNotFound = ::Util::TrackableErrorClass.new(
msg: "Role '{0-role}' API key not found",
code: "CONJ00121E"
)
RequestedResourceNotFound = ::Util::TrackableErrorClass.new(
msg: "Resource '{0-resource}' requested by role '{1-role}' not found",
code: "CONJ00123E"
)
end
module Authorization
ResourceNotVisibleToRole = ::Util::TrackableErrorClass.new(
msg: "The requested resource '{0-resource}' is not visible to Role '{1-role}'",
code: "CONJ00125E"
)
AccessToResourceIsForbiddenForRole = ::Util::TrackableErrorClass.new(
msg: "Role '{0-role}' does not have permissions to access the requested resource '{1-resource}'",
code: "CONJ00122E"
)
InsufficientResourcePrivileges = ::Util::TrackableErrorClass.new(
msg: "Role '{0-role}' has insufficient privileges over the resource '{1-resource}'",
code: "CONJ00124E"
)
end
module Authentication
AuthenticatorNotSupported = ::Util::TrackableErrorClass.new(
msg: "Authenticator '{0-authenticator-name}' is not supported in Conjur",
code: "CONJ00001E"
)
InvalidCredentials = ::Util::TrackableErrorClass.new(
msg: "Invalid credentials",
code: "CONJ00002E"
)
InvalidOrigin = ::Util::TrackableErrorClass.new(
msg: "User is not authorized to login from the current origin",
code: "CONJ00003E"
)
StatusNotSupported = ::Util::TrackableErrorClass.new(
msg: "Status check not supported for authenticator '{0-authenticator-name}'",
code: "CONJ00056E"
)
AdminAuthenticationDenied = ::Util::TrackableErrorClass.new(
msg: "Admin user is not allowed to authenticate with {0-authenticate-name}",
code: "CONJ00017E"
)
RoleHasNoCredentials = ::Util::TrackableErrorClass.new(
msg: "Role '{0-role}' has no credentials",
code: "CONJ00120E"
)
RoleNotApplicableForKeyRotation = ::Util::TrackableErrorClass.new(
msg: "Role '{0-role}' is not applicable for key rotation",
code: "CONJ00126E"
)
module DataObjects
InvalidTokenTTL = ::Util::TrackableErrorClass.new(
msg: "Webservice '{0-webservice}' configured with invalid custom token TTL '{1-ttl}': must be a valid duration as described by ISO 8601",
code: "CONJ00134E"
)
end
module AuthenticatorClass
DoesntStartWithAuthn = ::Util::TrackableErrorClass.new(
msg: "'{0-authenticator-parent-name}' is not a valid authenticator "\
"parent module because it does not begin with 'Authn'",
code: "CONJ00038E"
)
NotNamedAuthenticator = ::Util::TrackableErrorClass.new(
msg: "'{0-authenticator-name}' is not a valid authenticator name. " \
"The actual class implementing the authenticator must be named 'Authenticator'",
code: "CONJ00039E"
)
MissingValidMethod = ::Util::TrackableErrorClass.new(
msg: "'{0-authenticator-name}' is not a valid authenticator because " \
"it does not have a `:valid?(input)` method.",
code: "CONJ00040E"
)
end
module Security
AuthenticatorNotWhitelisted = ::Util::TrackableErrorClass.new(
msg: "'{0-authenticator-name}' is not enabled",
code: "CONJ00004E"
)
WebserviceNotFound = ::Util::TrackableErrorClass.new(
msg: "Webservice '{0-webservice-name}' not found",
code: "CONJ00005E"
)
RoleNotAuthorizedOnResource = ::Util::TrackableErrorClass.new(
msg: "'{0-role-name}' does not have '{1-privilege}' privilege on {2-resource-name}",
code: "CONJ00006E"
)
RoleNotAuthorizedOnPolicyDescendants = ::Util::TrackableErrorClass.new(
msg: "'{0-role-name}' does not have '{1-privilege}' privilege on some children of {2-policy-name}",
code: "CONJ00136E"
)
RoleNotFound = ::Util::TrackableErrorClass.new(
msg: "'{0-role-name}' not found",
code: "CONJ00007E"
)
AccountNotDefined = ::Util::TrackableErrorClass.new(
msg: "Account '{0-account-name}' is not defined in Conjur",
code: "CONJ00008E"
)
end
module RequestBody
MissingRequestParam = ::Util::TrackableErrorClass.new(
msg: "Field '{0-field-name}' is missing or empty in request body",
code: "CONJ00009E"
)
end
module OAuth
ProviderDiscoveryTimeout = ::Util::TrackableErrorClass.new(
msg: "Failed to discover Identity Provider with timeout error (Provider URI: '{0}'). Reason: '{1}'",
code: "CONJ00010E"
)
ProviderDiscoveryFailed = ::Util::TrackableErrorClass.new(
msg: "Failed to discover Identity Provider (Provider URI: '{0}'). Reason: '{1}'",
code: "CONJ00011E"
)
FetchProviderKeysFailed = ::Util::TrackableErrorClass.new(
msg: "Failed to fetch keys from Identity Provider (Provider URI: '{0}'). Reason: '{1}'",
code: "CONJ00012E"
)
end
module Jwt
TokenExpired = ::Util::TrackableErrorClass.new(
msg: "Token expired",
code: "CONJ00016E"
)
TokenDecodeFailed = ::Util::TrackableErrorClass.new(
msg: "Failed to decode token (3rdPartyError ='{0}')",
code: "CONJ00035E"
)
TokenVerificationFailed = ::Util::TrackableErrorClass.new(
msg: "Failed to verify token (3rdPartyError ='{0}')",
code: "CONJ00015E"
)
TokenClaimNotFoundOrEmpty = ::Util::TrackableErrorClass.new(
msg: "Claim '{0-claim-name}' not found or empty in token",
code: "CONJ00051E"
)
RequestBodyMissingJWTToken = ::Util::TrackableErrorClass.new(
msg: "The request body does not contain JWT token",
code: "CONJ00077E"
)
end
module AuthnOidc
IdTokenClaimNotFoundOrEmpty = ::Util::TrackableErrorClass.new(
msg: "Claim '{0-claim-name}' not found or empty in ID token. " \
"This claim is defined in the {1-config-var} variable.",
code: "CONJ00013E"
)
ServiceIdMissing = ::Util::TrackableErrorClass.new(
msg: "Service id is required when authenticating with authn-oidc",
code: "CONJ00075E"
)
InvalidVariableValue = ::Util::TrackableErrorClass.new(
msg: "Parameter {0} with value {1} invalid",
code: "CONJ00129E"
)
InvalidProviderConfig = ::Util::TrackableErrorClass.new(
msg: "The OIDC provider variable values are misconfigured",
code: "CONJ00130E"
)
TokenVerificationFailed = ::Util::TrackableErrorClass.new(
msg: "JWT Token validation failed: '{0-error}'",
code: "CONJ00128E"
)
TokenRetrievalFailed = ::Util::TrackableErrorClass.new(
msg: "Access Token retrieval failure: '{0-error}'",
code: "CONJ00133E"
)
InvalidCertificate = ::Util::TrackableErrorClass.new(
msg: "Invalid certificate: {0-message}",
code: "CONJ00135E"
)
NonceVerificationFailed = ::Util::TrackableErrorClass.new(
msg: "Provided nonce does not match the returned nonce",
code: 'CONJ00153E'
)
end
module AuthnIam
InvalidAWSHeaders = ::Util::TrackableErrorClass.new(
msg: "Invalid or expired AWS headers: {0-message}",
code: "CONJ00018E"
)
VerificationError = ::Util::TrackableErrorClass.new(
msg: "Verification of IAM identity failed with exception: {0-exception}",
code: "CONJ00063E"
)
end
module AuthnK8s
CSRIsMissingSpiffeId = ::Util::TrackableErrorClass.new(
msg: 'CSR must contain SPIFFE ID SAN',
code: "CONJ00022E"
)
PodNotFound = ::Util::TrackableErrorClass.new(
msg: "No pod found for '{0-pod-name}' in namespace '{1}'",
code: "CONJ00024E"
)
K8sResourceNotFound = ::Util::TrackableErrorClass.new(
msg: "Kubernetes {0-resource-name} {1-object-name} not found in namespace {2}",
code: "CONJ00026E"
)
LabelSelectorMismatch = ::Util::TrackableErrorClass.new(
msg: "Kubernetes {0-resource-type} '{1-resource-id}' does not match label-selector: '{2-label-selector}'",
code: "CONJ00083E"
)
InvalidLabelSelector = ::Util::TrackableErrorClass.new(
msg: "Invalid label-selector '{0-label-selector}': must adhere to format '<key>=<value>,<key1>=<value2>,...', supports '=' and '=='",
code: "CONJ00094E"
)
ContainerNotFound = ::Util::TrackableErrorClass.new(
msg: "Container '{0}' was not found in the pod. Host id: {1}",
code: "CONJ00028E"
)
MissingClientCertificate = ::Util::TrackableErrorClass.new(
msg: "Client SSL certificate is missing from the header",
code: "CONJ00029E"
)
UntrustedClientCertificate = ::Util::TrackableErrorClass.new(
msg: "Client certificate cannot be verified by certification authority",
code: "CONJ00030E"
)
CommonNameDoesntMatchHost = ::Util::TrackableErrorClass.new(
msg: "Client certificate CN must match host name. Cert CN: {0}. " \
"Host name: {1}.",
code: "CONJ00031E"
)
ClientCertificateExpired = ::Util::TrackableErrorClass.new(
msg: "Client certificate expired",
code: "CONJ00032E"
)
ExecCommandTimedOut = ::Util::TrackableErrorClass.new(
msg: "Exec command timed out after {0} seconds in container '{1}' of pod '{2}'",
code: "CONJ00033E"
)
WebSocketHandshakeError = ::Util::TrackableErrorClass.new(
msg: "WebSocket handshake failed with error {0}",
code: "CONJ00071E"
)
ExecCommandError = ::Util::TrackableErrorClass.new(
msg: "Exec command failed in container '{0}' of pod '{1}' with error {2}",
code: "CONJ00072E"
)
UnexpectedChannel = ::Util::TrackableErrorClass.new(
msg: "Unexpected channel: {0}",
code: "CONJ00073E"
)
MissingServiceAccountDir = ::Util::TrackableErrorClass.new(
msg: "Kubernetes serviceaccount dir '{0}' does not exist",
code: "CONJ00034E"
)
UnknownK8sResourceType = ::Util::TrackableErrorClass.new(
msg: "Unknown Kubernetes resource type '{0}'",
code: "CONJ00041E"
)
InvalidApiUrl = ::Util::TrackableErrorClass.new(
msg: "Received invalid Kubernetes API url: '{0}'",
code: "CONJ00042E"
)
MissingCertificate = ::Util::TrackableErrorClass.new(
msg: "No Kubernetes API certificate available",
code: "CONJ00043E"
)
NamespaceMismatch = ::Util::TrackableErrorClass.new(
msg: "Namespace in SPIFFE ID '{0-spiffe-namespace}' must match namespace " \
"implied by resource restriction: '{1-resource-restrictions-namespace}'",
code: "CONJ00023E"
)
CSRMissingCNEntry = ::Util::TrackableErrorClass.new(
msg: "CSR [subject: '{0-subject}', spiffe_id: '{1-spiffe-id}'] must have a CN (common name) entry.",
code: "CONJ00058E"
)
CertMissingCNEntry = ::Util::TrackableErrorClass.new(
msg: "Cert [subject: '{0-subject}', san: '{1-san}'] must have a CN (common name) entry.",
code: "CONJ00059E"
)
PodNameMismatchError = ::Util::TrackableErrorClass.new(
msg: "Pod: {0-pod-name} does not match: {1-actual-resource-name}.",
code: "CONJ00060E"
)
PodRelationMismatchError = ::Util::TrackableErrorClass.new(
msg: "Pod: {0-pod-name}, {1-resource-type}: {2-expected-resource-name}, does not match: " \
"{3-actual-resource-name}.",
code: "CONJ00061E"
)
PodMissingRelationError = ::Util::TrackableErrorClass.new(
msg: "Pod: {0-pod-name} does not belong to a {1-resource-type}.",
code: "CONJ00062E"
)
InvalidHostId = ::Util::TrackableErrorClass.new(
msg: "Invalid Kubernetes host id: {0}. Must end with <namespace>/<resource_type>/<resource_id>",
code: "CONJ00048E"
)
NoMatchingClient = ::Util::TrackableErrorClass.new(
msg: "Unable to establish Kubernetes client to execute method: \#{0}",
code: "CONJ00132E"
)
InvalidServiceAccountToken = ::Util::TrackableErrorClass.new(
msg: "Invalid service account token: {0}",
code: "CONJ00153E"
)
InvalidApiCert = ::Util::TrackableErrorClass.new(
msg: "Invalid Kubernetes API CA certificate: {0}",
code: "CONJ00154E"
)
InvalidSigningCert = ::Util::TrackableErrorClass.new(
msg: "Invalid signing certificate: {0}",
code: "CONJ00155E"
)
InvalidSigningKey = ::Util::TrackableErrorClass.new(
msg: "Invalid signing key: {0}",
code: "CONJ00156E"
)
end
module AuthnAzure
XmsMiridParseError = ::Util::TrackableErrorClass.new(
msg: "Failed to parse xms_mirid {0}. Reason: {1}",
code: "CONJ00052E"
)
MissingRequiredFieldsInXmsMirid = ::Util::TrackableErrorClass.new(
msg: "Required fields {0} are missing in xms_mirid {1}",
code: "CONJ00053E"
)
InvalidProviderFieldsInXmsMirid = ::Util::TrackableErrorClass.new(
msg: "Provider fields are in invalid format in xms_mirid {1}. " \
"xms_mirid must contain the resource provider namespace, the " \
"resource type, and the resource name",
code: "CONJ00054E"
)
end
module AuthnGcp
InvalidAudience = ::Util::TrackableErrorClass.new(
msg: "'audience' token claim {0} is invalid. The format should be " \
"'conjur/<account-name>/<host-id>'",
code: "CONJ00067E"
)
JwtTokenClaimIsMissing = ::Util::TrackableErrorClass.new(
msg: "Claim '{0-attribute-name}' is missing from Google's JWT token. " \
"Verify that you configured the host with permitted restrictions. " \
"In case of Compute Engine token, verify that you requested the token using 'format=full'",
code: "CONJ00068E"
)
InvalidAccountInAudienceClaim = ::Util::TrackableErrorClass.new(
msg: "'audience' token claim '{0}' is invalid. " \
"The account in the audience '{1}' does not match the account in the URL request '{2}'",
code: "CONJ00070E"
)
end
module AuthnJwt
InvalidIssuerConfiguration = ::Util::TrackableErrorClass.new(
msg: "Issuer authenticator configuration is invalid. You should configured as authenticator variables: " \
"'{0-resource-name}' or one of the following: '{1-resource-name}','{2-resource-name}'",
code: "CONJ00078E"
)
FailedToParseHostnameFromUri = ::Util::TrackableErrorClass.new(
msg: "Failed to extract hostname from URI '{0}'",
code: "CONJ00079E"
)
InvalidUriFormat = ::Util::TrackableErrorClass.new(
msg: "Failed to parse URI '{0}'. Reason: '{1}'",
code: "CONJ00080E"
)
NoSuchFieldInToken = ::Util::TrackableErrorClass.new(
msg: "'{0}' field not found in the token",
code: "CONJ00081E"
)
NoUsernameInTheURL = ::Util::TrackableErrorClass.new(
msg: "No username in the URL",
code: "CONJ00082E"
)
JwtTokenClaimIsMissing = ::Util::TrackableErrorClass.new(
msg: "Claim '{0-attribute-name}' is missing from JWT token. " \
"Verify that you configured the host with permitted restrictions.",
code: "CONJ00084E"
)
MissingToken = ::Util::TrackableErrorClass.new(
msg: "Token is empty or not found.",
code: "CONJ00085E"
)
FetchJwksKeysFailed = ::Util::TrackableErrorClass.new(
msg: "Failed to fetch JWKS from '{0-uri}'. Reason: '{1}'",
code: "CONJ00087E"
)
FetchJwksUriKeysNotFound = ::Util::TrackableErrorClass.new(
msg: "JWKS not found in response: '{0-encoded-response}'",
code: "CONJ00088E"
)
UnsupportedClaim = ::Util::TrackableErrorClass.new(
msg: "Claim '{0-claim}' does not support fetching the application identity",
code: "CONJ00089E"
)
MissingClaimValue = ::Util::TrackableErrorClass.new(
msg: "Claim '{0-claim}' value is empty, or was not found in token.",
code: "CONJ00090E"
)
MissingMandatoryClaim = ::Util::TrackableErrorClass.new(
msg: "Failed to validate token: mandatory claim '{0-claim}' is missing.",
code: "CONJ00091E"
)
UnsupportedAuthenticator = ::Util::TrackableErrorClass.new(
msg: "Authenticator '{0-authenticator-name}' is unsupported.",
code: "CONJ00092E"
)
FailedToConvertResponseToJwks = ::Util::TrackableErrorClass.new(
msg: "Failed to convert HTTP response '{0-encoded-response}' to JWKS type. Reason: '{1}'",
code: "CONJ00093E"
)
MissingClaim = ::Util::TrackableErrorClass.new(
msg: "Claim is empty or not found.",
code: "CONJ00095E"
)
ServiceIdMissing = ::Util::TrackableErrorClass.new(
msg: "Service ID is required when authenticating with authn-jwt",
code: "CONJ00097E"
)
IdentityMisconfigured = ::Util::TrackableErrorClass.new(
msg: "JWT identity configuration is invalid",
code: "CONJ00098E"
)
MissingIdentity = ::Util::TrackableErrorClass.new(
msg: "JWT identity is empty or was not found.",
code: "CONJ00101E"
)
MissingIdentityPrefix = ::Util::TrackableErrorClass.new(
msg: "JWT identity prefix is empty or was not found.",
code: "CONJ00102E"
)
FailedToValidateClaimMissingClaimName = ::Util::TrackableErrorClass.new(
msg: "Failed to validate claim: claim name is empty or was not found.",
code: "CONJ00103E"
)
FailedToValidateClaimForbiddenClaimName = ::Util::TrackableErrorClass.new(
msg: "Failed to validate claim: claim name '{0-claim-name}' does not " \
"match regular expression: '{1-regex}'.",
code: "CONJ00104E"
)
FailedToValidateClaimClaimNameInDenyList = ::Util::TrackableErrorClass.new(
msg: "Failed to validate claim: claim name '{0-claim-name}' is in denylist '{1-deny-list}'",
code: "CONJ00105E"
)
FailedToParseEnforcedClaimsMissingInput = ::Util::TrackableErrorClass.new(
msg: "Failed to parse enforced claims: enforced claim value is empty or was not found.",
code: "CONJ00106E"
)
InvalidEnforcedClaimsFormat = ::Util::TrackableErrorClass.new(
msg: "List of enforced claims '{0-enforced-claims-value}' is in invalid format. " \
"Separate claim names with commas.",
code: "CONJ00107E"
)
InvalidEnforcedClaimsFormatContainsDuplication = ::Util::TrackableErrorClass.new(
msg: "List of enforced claims '{0-enforced-claims-value}' must not contain duplications.",
code: "CONJ00108E"
)
ClaimAliasesMissingInput = ::Util::TrackableErrorClass.new(
msg: "Failed to parse claim aliases: the claim aliases value is empty or was not found.",
code: "CONJ00109E"
)
ClaimAliasesBlankOrEmpty = ::Util::TrackableErrorClass.new(
msg: "Failed to parse claim aliases: one or more mapping statements are blank or empty " \
"'{0-claim-aliases-value}'.",
code: "CONJ00110E"
)
ClaimAliasInvalidFormat = ::Util::TrackableErrorClass.new(
msg: "Failed to parse claim aliases: the claim alias value '{0-claim-alias-value}' is in invalid format."\
"The correct format is: 'annotation_name:claim_name'",
code: "CONJ00111E"
)
ClaimAliasInvalidClaimFormat = ::Util::TrackableErrorClass.new(
msg: "Failed to parse claim aliases: one of the claims in the claim alias value '{0-claim-alias-value}' " \
"is in an invalid format : {1-claim-verification-error}.",
code: "CONJ00112E"
)
ClaimAliasDuplicationError = ::Util::TrackableErrorClass.new(
msg: "Failed to parse claim aliases: {0-purpose} value '{1-claim-value}' appears more than once",
code: "CONJ00113E"
)
ClaimAliasNameInvalidCharacter = ::Util::TrackableErrorClass.new(
msg: "Failed to parse claim aliases: the claim alias name '{0-claim-alias-name}' contains '/'.",
code: "CONJ00114E"
)
RoleWithRegisteredOrClaimAliasError = ::Util::TrackableErrorClass.new(
msg: "Role can't have registered or aliased claim. Error: '{0-error}'",
code: "CONJ00069E"
)
AudienceValueIsEmpty = ::Util::TrackableErrorClass.new(
msg: "Failed to fetch audience value: audience value is empty",
code: "CONJ00115E"
)
InvalidClaimPath = ::Util::TrackableErrorClass.new(
msg: "Failed to parse claim path: '{0-claim-path}'. The claim path is in an invalid format. " \
"The valid format should meet the following regex: '{1-claim-path-format}'",
code: "CONJ00116E"
)
InvalidTokenAppPropertyValue = ::Util::TrackableErrorClass.new(
msg: "Failed to parse 'token-app-property' value. Error: '{0-error}'",
code: "CONJ00117E"
)
TokenAppPropertyValueIsNotString = ::Util::TrackableErrorClass.new(
msg: "'{0-claim-path}' value in token has type '{1-type}'. An identity must be a String.",
code: "CONJ00118E"
)
InvalidRestrictionName = ::Util::TrackableErrorClass.new(
msg: "Restriction '{0-restriction-name}' is invalid and not representing claim path in the token",
code: "CONJ00119E"
)
InvalidPublicKeys = ::Util::TrackableErrorClass.new(
msg: "Failed to parse 'public-keys': {0-parse-error}",
code: "CONJ00120E"
)
InvalidSigningKeyType = ::Util::TrackableErrorClass.new(
msg: "Signing key type '{0-type}' is invalid",
code: "CONJ00121E"
)
InvalidSigningKeySettings = ::Util::TrackableErrorClass.new(
msg: "Invalid signing key settings: {0-validation-error}",
code: "CONJ00122E"
)
FailedToFetchJwksData = ::Util::TrackableErrorClass.new(
msg: "Failed to fetch JWKS data from '{0-jwks-uri}' with error: {1-error}",
code: "CONJ00123E"
)
end
module ResourceRestrictions
InvalidResourceRestrictions = ::Util::TrackableErrorClass.new(
msg: "Resource restriction '{0-resource-restriction-name}' does not match " \
"with the corresponding value in the request",
code: "CONJ00049E"
)
EmptyAnnotationGiven = ::Util::TrackableErrorClass.new(
msg: "Annotation, '{0-annotation-name}', is empty",
code: "CONJ00100E"
)
end
module Constraints
ConstraintNotSupported = ::Util::TrackableErrorClass.new(
msg: "Resource restrictions '{0}' are not supported. " \
"The supported resources are '{1}'",
code: "CONJ00050E"
)
IllegalConstraintCombinations = ::Util::TrackableErrorClass.new(
msg: "Resource restrictions include an illegal combination of resource " \
"constraints - '{0-constraints}'",
code: "CONJ00055E"
)
RoleMissingConstraints = ::Util::TrackableErrorClass.new(
msg: "Role does not have the required constraints: '{0-constraints}'",
code: "CONJ00057E"
)
RoleMissingRequiredConstraints = ::Util::TrackableErrorClass.new(
msg: "Role must have at least one of the following constraints: {0-constraints}",
code: "CONJ00069E"
)
NonPermittedRestrictionGiven = ::Util::TrackableErrorClass.new(
msg: "Role can't have one of these none permitted restrictions '{0-restrictions}'",
code: "CONJ00069E"
)
RoleMissingAnyRestrictions = ::Util::TrackableErrorClass.new(
msg: "Role must have at least one relevant annotation",
code: "CONJ00099E"
)
IllegalRequiredExclusiveCombination = ::Util::TrackableErrorClass.new(
msg: "Role must have exactly one of the following required constraints: " \
"{0-constraints}. Role configured with {1-provided}",
code: "CONJ00131E"
)
end
end
module Util
ConcurrencyLimitReachedBeforeCacheInitialization = ::Util::TrackableErrorClass.new(
msg: "Concurrency limited cache reached before cache initialized",
code: "CONJ00044E"
)
end
module Monitoring
InvalidOrMissingMetricType = ::Util::TrackableErrorClass.new(
msg: "Invalid or missing metric type: {0-metric-type}",
code: "CONJ00152E"
)
end
module Factories
FactoryNotFound = ::Util::TrackableErrorClass.new(
msg: "No Factory found for '{0-factory-name}'",
code: 'CONJ00157E'
)
FactoryGeneratedPolicyNotFound = ::Util::TrackableErrorClass.new(
msg: "No policy found for Factory generated resource: '{0-policy-identifier}'",
code: 'CONJ00158E'
)
MissingFactoryAnnotation = ::Util::TrackableErrorClass.new(
msg: "No factory annotation found for policy: '{0-policy-identifier}'",
code: 'CONJ00159E'
)
InvalidAction = ::Util::TrackableErrorClass.new(
msg: "Invalid action: '{0-action}', only {1-allowed} are allowed",
code: 'CONJ00160E'
)
NoVariablesFound = ::Util::TrackableErrorClass.new(
msg: "No variables found for Factory created resource: '{0-policy-path}'",
code: 'CONJ00161E'
)
end
module EffectivePolicy
NumberParamError = ::Util::TrackableErrorClass.new(
msg: "Param '{0-name}' is '{1-value}' but should be a number from {2-min} up to {3-max}",
code: 'CONJ00163E'
)
PolicySizeExceeded = ::Util::TrackableErrorClass.new(
msg: "Policy max allowed '{0-name}' = {1-max} exceeded. Value for policy is: {2-value}",
code: 'CONJ00164E'
)
PathParamError = ::Util::TrackableErrorClass.new(
msg: "Unsupported kind '{0-name}'. Only 'policy' is allowed.",
code: 'CONJ00165E'
)
end
end