@_mustachio/openauth 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/domain/scim/discovery.js +206 -0
- package/dist/esm/domain/scim/filter.js +177 -0
- package/dist/esm/domain/scim/handle.js +338 -0
- package/dist/esm/domain/scim/patch.js +568 -0
- package/dist/esm/domain/scim/resource.js +256 -0
- package/dist/esm/http/handlers/scim.js +59 -0
- package/dist/esm/http/middleware/tenant.js +25 -0
- package/dist/esm/http/router.js +3 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/methods/saml-sp/acs.js +44 -20
- package/dist/esm/methods/saml-sp/attributes.js +2 -0
- package/dist/esm/methods/saml-sp/authnrequest.js +2 -2
- package/dist/esm/methods/saml-sp/factory.js +12 -1
- package/dist/esm/methods/saml-sp/metadata.js +5 -3
- package/dist/esm/methods/saml-sp/saml-instance.js +13 -3
- package/dist/esm/methods/saml-sp/slo-initiate.js +2 -2
- package/dist/esm/methods/saml-sp/sls.js +2 -2
- package/dist/esm/ports/scim-directory.js +0 -0
- package/dist/esm/types/error.js +5 -0
- package/dist/esm/types/scim.js +0 -0
- package/dist/types/domain/scim/discovery.d.ts +11 -0
- package/dist/types/domain/scim/discovery.d.ts.map +1 -0
- package/dist/types/domain/scim/filter.d.ts +51 -0
- package/dist/types/domain/scim/filter.d.ts.map +1 -0
- package/dist/types/domain/scim/handle.d.ts +35 -0
- package/dist/types/domain/scim/handle.d.ts.map +1 -0
- package/dist/types/domain/scim/patch.d.ts +73 -0
- package/dist/types/domain/scim/patch.d.ts.map +1 -0
- package/dist/types/domain/scim/resource.d.ts +56 -0
- package/dist/types/domain/scim/resource.d.ts.map +1 -0
- package/dist/types/http/context.d.ts +3 -0
- package/dist/types/http/context.d.ts.map +1 -1
- package/dist/types/http/handlers/method-route.d.ts.map +1 -1
- package/dist/types/http/handlers/scim.d.ts +3 -0
- package/dist/types/http/handlers/scim.d.ts.map +1 -0
- package/dist/types/http/middleware/tenant.d.ts.map +1 -1
- package/dist/types/http/router.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/methods/saml-sp/acs.d.ts.map +1 -1
- package/dist/types/methods/saml-sp/attributes.d.ts +5 -0
- package/dist/types/methods/saml-sp/attributes.d.ts.map +1 -1
- package/dist/types/methods/saml-sp/authnrequest.d.ts.map +1 -1
- package/dist/types/methods/saml-sp/factory.d.ts +217 -1
- package/dist/types/methods/saml-sp/factory.d.ts.map +1 -1
- package/dist/types/methods/saml-sp/metadata.d.ts +8 -0
- package/dist/types/methods/saml-sp/metadata.d.ts.map +1 -1
- package/dist/types/methods/saml-sp/parse-idp-metadata.d.ts.map +1 -1
- package/dist/types/methods/saml-sp/saml-instance.d.ts +12 -0
- package/dist/types/methods/saml-sp/saml-instance.d.ts.map +1 -1
- package/dist/types/methods/saml-sp/slo-initiate.d.ts.map +1 -1
- package/dist/types/methods/saml-sp/sls.d.ts.map +1 -1
- package/dist/types/methods/saml-sp/types.d.ts +95 -0
- package/dist/types/methods/saml-sp/types.d.ts.map +1 -1
- package/dist/types/ports/scim-directory.d.ts +104 -0
- package/dist/types/ports/scim-directory.d.ts.map +1 -0
- package/dist/types/ports/session-store.d.ts.map +1 -1
- package/dist/types/types/error.d.ts +5 -0
- package/dist/types/types/error.d.ts.map +1 -1
- package/dist/types/types/idp.d.ts +12 -0
- package/dist/types/types/idp.d.ts.map +1 -1
- package/dist/types/types/scim.d.ts +269 -0
- package/dist/types/types/scim.d.ts.map +1 -0
- package/dist/types/types/tenant.d.ts +10 -0
- package/dist/types/types/tenant.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/domain/scim/discovery.ts +262 -0
- package/src/domain/scim/filter.ts +295 -0
- package/src/domain/scim/handle.ts +597 -0
- package/src/domain/scim/patch.ts +807 -0
- package/src/domain/scim/resource.ts +358 -0
- package/src/http/context.ts +3 -0
- package/src/http/handlers/authorize.ts +0 -1
- package/src/http/handlers/method-route.ts +1 -4
- package/src/http/handlers/scim.ts +107 -0
- package/src/http/middleware/tenant.ts +47 -1
- package/src/http/router.ts +9 -0
- package/src/index.ts +20 -0
- package/src/methods/saml-sp/acs.ts +99 -49
- package/src/methods/saml-sp/attributes.ts +12 -3
- package/src/methods/saml-sp/authnrequest.ts +3 -2
- package/src/methods/saml-sp/factory.ts +24 -3
- package/src/methods/saml-sp/metadata.ts +19 -8
- package/src/methods/saml-sp/parse-idp-metadata.ts +3 -9
- package/src/methods/saml-sp/saml-instance.ts +42 -5
- package/src/methods/saml-sp/slo-initiate.ts +6 -3
- package/src/methods/saml-sp/sls.ts +3 -2
- package/src/methods/saml-sp/types.ts +95 -0
- package/src/ports/CONSISTENCY.md +28 -25
- package/src/ports/scim-directory.ts +166 -0
- package/src/ports/session-store.ts +1 -5
- package/src/types/error.ts +11 -0
- package/src/types/idp.ts +12 -0
- package/src/types/scim.ts +280 -0
- package/src/types/tenant.ts +10 -0
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
import type { AuthMethodFactory } from "../../types/method";
|
|
16
16
|
import type { SamlSpConfig, SamlSpProperties, SamlSpState } from "./types";
|
|
17
|
-
declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
17
|
+
declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
18
18
|
idp: z.ZodObject<{
|
|
19
19
|
entityId: z.ZodString;
|
|
20
20
|
ssoUrl: z.ZodString;
|
|
@@ -277,6 +277,20 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
277
277
|
defaultScopes?: string[] | undefined;
|
|
278
278
|
}>>;
|
|
279
279
|
clockSkewSeconds: z.ZodOptional<z.ZodNumber>;
|
|
280
|
+
spEntityId: z.ZodOptional<z.ZodString>;
|
|
281
|
+
forceAuthn: z.ZodOptional<z.ZodBoolean>;
|
|
282
|
+
requestedAuthnContext: z.ZodOptional<z.ZodObject<{
|
|
283
|
+
classRefs: z.ZodArray<z.ZodString, "many">;
|
|
284
|
+
comparison: z.ZodOptional<z.ZodEnum<["exact", "minimum", "maximum", "better"]>>;
|
|
285
|
+
}, "strip", z.ZodTypeAny, {
|
|
286
|
+
classRefs: string[];
|
|
287
|
+
comparison?: "minimum" | "exact" | "maximum" | "better" | undefined;
|
|
288
|
+
}, {
|
|
289
|
+
classRefs: string[];
|
|
290
|
+
comparison?: "minimum" | "exact" | "maximum" | "better" | undefined;
|
|
291
|
+
}>>;
|
|
292
|
+
requireSignedAssertion: z.ZodOptional<z.ZodBoolean>;
|
|
293
|
+
requireSignedResponse: z.ZodOptional<z.ZodBoolean>;
|
|
280
294
|
}, "strip", z.ZodTypeAny, {
|
|
281
295
|
idp: {
|
|
282
296
|
entityId: string;
|
|
@@ -330,6 +344,8 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
330
344
|
source: "literal";
|
|
331
345
|
} | undefined;
|
|
332
346
|
};
|
|
347
|
+
forceAuthn?: boolean | undefined;
|
|
348
|
+
spEntityId?: string | undefined;
|
|
333
349
|
idpInitiated?: {
|
|
334
350
|
defaultClientId: string;
|
|
335
351
|
defaultRedirectUri: string;
|
|
@@ -346,6 +362,12 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
346
362
|
certPem: string;
|
|
347
363
|
} | undefined;
|
|
348
364
|
clockSkewSeconds?: number | undefined;
|
|
365
|
+
requestedAuthnContext?: {
|
|
366
|
+
classRefs: string[];
|
|
367
|
+
comparison?: "minimum" | "exact" | "maximum" | "better" | undefined;
|
|
368
|
+
} | undefined;
|
|
369
|
+
requireSignedAssertion?: boolean | undefined;
|
|
370
|
+
requireSignedResponse?: boolean | undefined;
|
|
349
371
|
}, {
|
|
350
372
|
idp: {
|
|
351
373
|
entityId: string;
|
|
@@ -399,6 +421,8 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
399
421
|
source: "literal";
|
|
400
422
|
} | undefined;
|
|
401
423
|
};
|
|
424
|
+
forceAuthn?: boolean | undefined;
|
|
425
|
+
spEntityId?: string | undefined;
|
|
402
426
|
idpInitiated?: {
|
|
403
427
|
defaultClientId: string;
|
|
404
428
|
defaultRedirectUri: string;
|
|
@@ -415,6 +439,12 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
415
439
|
certPem: string;
|
|
416
440
|
} | undefined;
|
|
417
441
|
clockSkewSeconds?: number | undefined;
|
|
442
|
+
requestedAuthnContext?: {
|
|
443
|
+
classRefs: string[];
|
|
444
|
+
comparison?: "minimum" | "exact" | "maximum" | "better" | undefined;
|
|
445
|
+
} | undefined;
|
|
446
|
+
requireSignedAssertion?: boolean | undefined;
|
|
447
|
+
requireSignedResponse?: boolean | undefined;
|
|
418
448
|
}>, {
|
|
419
449
|
idp: {
|
|
420
450
|
entityId: string;
|
|
@@ -468,6 +498,8 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
468
498
|
source: "literal";
|
|
469
499
|
} | undefined;
|
|
470
500
|
};
|
|
501
|
+
forceAuthn?: boolean | undefined;
|
|
502
|
+
spEntityId?: string | undefined;
|
|
471
503
|
idpInitiated?: {
|
|
472
504
|
defaultClientId: string;
|
|
473
505
|
defaultRedirectUri: string;
|
|
@@ -484,6 +516,12 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
484
516
|
certPem: string;
|
|
485
517
|
} | undefined;
|
|
486
518
|
clockSkewSeconds?: number | undefined;
|
|
519
|
+
requestedAuthnContext?: {
|
|
520
|
+
classRefs: string[];
|
|
521
|
+
comparison?: "minimum" | "exact" | "maximum" | "better" | undefined;
|
|
522
|
+
} | undefined;
|
|
523
|
+
requireSignedAssertion?: boolean | undefined;
|
|
524
|
+
requireSignedResponse?: boolean | undefined;
|
|
487
525
|
}, {
|
|
488
526
|
idp: {
|
|
489
527
|
entityId: string;
|
|
@@ -537,6 +575,8 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
537
575
|
source: "literal";
|
|
538
576
|
} | undefined;
|
|
539
577
|
};
|
|
578
|
+
forceAuthn?: boolean | undefined;
|
|
579
|
+
spEntityId?: string | undefined;
|
|
540
580
|
idpInitiated?: {
|
|
541
581
|
defaultClientId: string;
|
|
542
582
|
defaultRedirectUri: string;
|
|
@@ -553,6 +593,12 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
553
593
|
certPem: string;
|
|
554
594
|
} | undefined;
|
|
555
595
|
clockSkewSeconds?: number | undefined;
|
|
596
|
+
requestedAuthnContext?: {
|
|
597
|
+
classRefs: string[];
|
|
598
|
+
comparison?: "minimum" | "exact" | "maximum" | "better" | undefined;
|
|
599
|
+
} | undefined;
|
|
600
|
+
requireSignedAssertion?: boolean | undefined;
|
|
601
|
+
requireSignedResponse?: boolean | undefined;
|
|
556
602
|
}>, {
|
|
557
603
|
idp: {
|
|
558
604
|
entityId: string;
|
|
@@ -606,6 +652,8 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
606
652
|
source: "literal";
|
|
607
653
|
} | undefined;
|
|
608
654
|
};
|
|
655
|
+
forceAuthn?: boolean | undefined;
|
|
656
|
+
spEntityId?: string | undefined;
|
|
609
657
|
idpInitiated?: {
|
|
610
658
|
defaultClientId: string;
|
|
611
659
|
defaultRedirectUri: string;
|
|
@@ -622,6 +670,12 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
622
670
|
certPem: string;
|
|
623
671
|
} | undefined;
|
|
624
672
|
clockSkewSeconds?: number | undefined;
|
|
673
|
+
requestedAuthnContext?: {
|
|
674
|
+
classRefs: string[];
|
|
675
|
+
comparison?: "minimum" | "exact" | "maximum" | "better" | undefined;
|
|
676
|
+
} | undefined;
|
|
677
|
+
requireSignedAssertion?: boolean | undefined;
|
|
678
|
+
requireSignedResponse?: boolean | undefined;
|
|
625
679
|
}, {
|
|
626
680
|
idp: {
|
|
627
681
|
entityId: string;
|
|
@@ -675,6 +729,8 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
675
729
|
source: "literal";
|
|
676
730
|
} | undefined;
|
|
677
731
|
};
|
|
732
|
+
forceAuthn?: boolean | undefined;
|
|
733
|
+
spEntityId?: string | undefined;
|
|
678
734
|
idpInitiated?: {
|
|
679
735
|
defaultClientId: string;
|
|
680
736
|
defaultRedirectUri: string;
|
|
@@ -691,6 +747,166 @@ declare const samlSpConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
691
747
|
certPem: string;
|
|
692
748
|
} | undefined;
|
|
693
749
|
clockSkewSeconds?: number | undefined;
|
|
750
|
+
requestedAuthnContext?: {
|
|
751
|
+
classRefs: string[];
|
|
752
|
+
comparison?: "minimum" | "exact" | "maximum" | "better" | undefined;
|
|
753
|
+
} | undefined;
|
|
754
|
+
requireSignedAssertion?: boolean | undefined;
|
|
755
|
+
requireSignedResponse?: boolean | undefined;
|
|
756
|
+
}>, {
|
|
757
|
+
idp: {
|
|
758
|
+
entityId: string;
|
|
759
|
+
ssoUrl: string;
|
|
760
|
+
signingCerts: {
|
|
761
|
+
pem: string;
|
|
762
|
+
notBefore?: number | undefined;
|
|
763
|
+
notAfter?: number | undefined;
|
|
764
|
+
}[];
|
|
765
|
+
nameIdFormat?: "persistent" | "transient" | "emailAddress" | "unspecified" | undefined;
|
|
766
|
+
sloUrl?: string | undefined;
|
|
767
|
+
};
|
|
768
|
+
attributeMapping: {
|
|
769
|
+
subject?: {
|
|
770
|
+
source: "nameId";
|
|
771
|
+
} | {
|
|
772
|
+
name: string;
|
|
773
|
+
source: "attribute";
|
|
774
|
+
format?: string | undefined;
|
|
775
|
+
} | undefined;
|
|
776
|
+
custom?: Record<string, {
|
|
777
|
+
source: "nameId";
|
|
778
|
+
} | {
|
|
779
|
+
name: string;
|
|
780
|
+
source: "attribute";
|
|
781
|
+
format?: string | undefined;
|
|
782
|
+
}> | undefined;
|
|
783
|
+
name?: {
|
|
784
|
+
source: "nameId";
|
|
785
|
+
} | {
|
|
786
|
+
name: string;
|
|
787
|
+
source: "attribute";
|
|
788
|
+
format?: string | undefined;
|
|
789
|
+
} | undefined;
|
|
790
|
+
email?: {
|
|
791
|
+
source: "nameId";
|
|
792
|
+
} | {
|
|
793
|
+
name: string;
|
|
794
|
+
source: "attribute";
|
|
795
|
+
format?: string | undefined;
|
|
796
|
+
} | undefined;
|
|
797
|
+
groups?: {
|
|
798
|
+
source: "nameId";
|
|
799
|
+
} | {
|
|
800
|
+
name: string;
|
|
801
|
+
source: "attribute";
|
|
802
|
+
format?: string | undefined;
|
|
803
|
+
} | undefined;
|
|
804
|
+
emailVerified?: {
|
|
805
|
+
value: boolean;
|
|
806
|
+
source: "literal";
|
|
807
|
+
} | undefined;
|
|
808
|
+
};
|
|
809
|
+
forceAuthn?: boolean | undefined;
|
|
810
|
+
spEntityId?: string | undefined;
|
|
811
|
+
idpInitiated?: {
|
|
812
|
+
defaultClientId: string;
|
|
813
|
+
defaultRedirectUri: string;
|
|
814
|
+
defaultScopes?: string[] | undefined;
|
|
815
|
+
} | undefined;
|
|
816
|
+
signAuthnRequest?: boolean | undefined;
|
|
817
|
+
signingKey?: {
|
|
818
|
+
privateKeyPem: string;
|
|
819
|
+
certPem: string;
|
|
820
|
+
} | undefined;
|
|
821
|
+
allowEncryptedAssertions?: boolean | undefined;
|
|
822
|
+
decryptionKey?: {
|
|
823
|
+
privateKeyPem: string;
|
|
824
|
+
certPem: string;
|
|
825
|
+
} | undefined;
|
|
826
|
+
clockSkewSeconds?: number | undefined;
|
|
827
|
+
requestedAuthnContext?: {
|
|
828
|
+
classRefs: string[];
|
|
829
|
+
comparison?: "minimum" | "exact" | "maximum" | "better" | undefined;
|
|
830
|
+
} | undefined;
|
|
831
|
+
requireSignedAssertion?: boolean | undefined;
|
|
832
|
+
requireSignedResponse?: boolean | undefined;
|
|
833
|
+
}, {
|
|
834
|
+
idp: {
|
|
835
|
+
entityId: string;
|
|
836
|
+
ssoUrl: string;
|
|
837
|
+
signingCerts: {
|
|
838
|
+
pem: string;
|
|
839
|
+
notBefore?: number | undefined;
|
|
840
|
+
notAfter?: number | undefined;
|
|
841
|
+
}[];
|
|
842
|
+
nameIdFormat?: "persistent" | "transient" | "emailAddress" | "unspecified" | undefined;
|
|
843
|
+
sloUrl?: string | undefined;
|
|
844
|
+
};
|
|
845
|
+
attributeMapping: {
|
|
846
|
+
subject?: {
|
|
847
|
+
source: "nameId";
|
|
848
|
+
} | {
|
|
849
|
+
name: string;
|
|
850
|
+
source: "attribute";
|
|
851
|
+
format?: string | undefined;
|
|
852
|
+
} | undefined;
|
|
853
|
+
custom?: Record<string, {
|
|
854
|
+
source: "nameId";
|
|
855
|
+
} | {
|
|
856
|
+
name: string;
|
|
857
|
+
source: "attribute";
|
|
858
|
+
format?: string | undefined;
|
|
859
|
+
}> | undefined;
|
|
860
|
+
name?: {
|
|
861
|
+
source: "nameId";
|
|
862
|
+
} | {
|
|
863
|
+
name: string;
|
|
864
|
+
source: "attribute";
|
|
865
|
+
format?: string | undefined;
|
|
866
|
+
} | undefined;
|
|
867
|
+
email?: {
|
|
868
|
+
source: "nameId";
|
|
869
|
+
} | {
|
|
870
|
+
name: string;
|
|
871
|
+
source: "attribute";
|
|
872
|
+
format?: string | undefined;
|
|
873
|
+
} | undefined;
|
|
874
|
+
groups?: {
|
|
875
|
+
source: "nameId";
|
|
876
|
+
} | {
|
|
877
|
+
name: string;
|
|
878
|
+
source: "attribute";
|
|
879
|
+
format?: string | undefined;
|
|
880
|
+
} | undefined;
|
|
881
|
+
emailVerified?: {
|
|
882
|
+
value: boolean;
|
|
883
|
+
source: "literal";
|
|
884
|
+
} | undefined;
|
|
885
|
+
};
|
|
886
|
+
forceAuthn?: boolean | undefined;
|
|
887
|
+
spEntityId?: string | undefined;
|
|
888
|
+
idpInitiated?: {
|
|
889
|
+
defaultClientId: string;
|
|
890
|
+
defaultRedirectUri: string;
|
|
891
|
+
defaultScopes?: string[] | undefined;
|
|
892
|
+
} | undefined;
|
|
893
|
+
signAuthnRequest?: boolean | undefined;
|
|
894
|
+
signingKey?: {
|
|
895
|
+
privateKeyPem: string;
|
|
896
|
+
certPem: string;
|
|
897
|
+
} | undefined;
|
|
898
|
+
allowEncryptedAssertions?: boolean | undefined;
|
|
899
|
+
decryptionKey?: {
|
|
900
|
+
privateKeyPem: string;
|
|
901
|
+
certPem: string;
|
|
902
|
+
} | undefined;
|
|
903
|
+
clockSkewSeconds?: number | undefined;
|
|
904
|
+
requestedAuthnContext?: {
|
|
905
|
+
classRefs: string[];
|
|
906
|
+
comparison?: "minimum" | "exact" | "maximum" | "better" | undefined;
|
|
907
|
+
} | undefined;
|
|
908
|
+
requireSignedAssertion?: boolean | undefined;
|
|
909
|
+
requireSignedResponse?: boolean | undefined;
|
|
694
910
|
}>;
|
|
695
911
|
export type SamlSpFactoryConfig = z.infer<typeof samlSpConfigSchema>;
|
|
696
912
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAc,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAGvE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AA4C1E,QAAA,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/factory.ts"],"names":[],"mappings":"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDrB,CAAA;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAC3C,gBAAgB,EAChB,WAAW,EACX,YAAY,CAUb,CAAA"}
|
|
@@ -27,6 +27,14 @@ export type SpMetadataInput = {
|
|
|
27
27
|
* what-we-serve invariant as the signing cert.
|
|
28
28
|
*/
|
|
29
29
|
encryptionCertPem?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Whether we actually require a signed `<saml:Assertion>`
|
|
32
|
+
* (`config.requireSignedAssertion`, default `true`). Published as
|
|
33
|
+
* `WantAssertionsSigned` — same advertise-only-what-we-serve
|
|
34
|
+
* invariant as the certs: a connection relying on a signed
|
|
35
|
+
* `<Response>` instead must not claim otherwise in its metadata.
|
|
36
|
+
*/
|
|
37
|
+
wantAssertionsSigned?: boolean;
|
|
30
38
|
};
|
|
31
39
|
/**
|
|
32
40
|
* Pure SP metadata builder. Mirrors `parseSamlIdpMetadata`'s purity so
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/metadata.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/metadata.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGrE,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACZ,MAAM,SAAS,CAAA;AAqBhB,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,gBAAgB,CAAA;IAC/B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B,CAAA;AAUD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAkDjE;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,aAAa,CAAC,WAAW,CAAC,EAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,YAAY,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAkDtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-idp-metadata.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/parse-idp-metadata.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAMhD,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,SAAS,CAAA;AA8C9D,wBAAgB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"parse-idp-metadata.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/parse-idp-metadata.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAMhD,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,SAAS,CAAA;AA8C9D,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,CAyFvE"}
|
|
@@ -76,6 +76,18 @@ export type SamlBindingContext = {
|
|
|
76
76
|
* config doesn't churn.
|
|
77
77
|
*/
|
|
78
78
|
export declare function deriveSpEntityId(issuerUrl: string, tenantId: string, methodId: string): string;
|
|
79
|
+
/**
|
|
80
|
+
* The SP entityID this connection actually presents — the configured
|
|
81
|
+
* override if the operator set one (to adopt an entityID that already
|
|
82
|
+
* exists at the IdP), else the derived default.
|
|
83
|
+
*
|
|
84
|
+
* **Every** consumer must go through this one function: the
|
|
85
|
+
* `AuthnRequest` issuer, `AudienceRestriction` validation, SP metadata,
|
|
86
|
+
* and logout messages all have to agree, or the IdP rejects us. That
|
|
87
|
+
* shared-resolution property is what the metadata anti-drift test
|
|
88
|
+
* guards.
|
|
89
|
+
*/
|
|
90
|
+
export declare function resolveSpEntityId(config: SamlSpConfig, issuerUrl: string, tenantId: string, methodId: string): string;
|
|
79
91
|
export declare function buildSamlInstance(config: SamlSpConfig, binding: SamlBindingContext, nowMs: number): SamlInstance;
|
|
80
92
|
export {};
|
|
81
93
|
//# sourceMappingURL=saml-instance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saml-instance.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/saml-instance.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,QAAQ,MAAM,sBAAsB,CAAA;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAIvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE7D,QAAA,MAAQ,IAAI,sBAAmC,CAAA;AAC/C,KAAK,YAAY,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,CAAA;AAE7C,4CAA4C;AAC5C,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAK/D,CAAA;AAUD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAA;IAClB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;IACd,4DAA4D;IAC5D,OAAO,EAAE,aAAa,CAAA;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;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE;QACR,aAAa,EAAE,MAAM,CAAA;QACrB,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,MAAM,CAGR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,MAAM,CAER;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,kBAAkB,EAC3B,KAAK,EAAE,MAAM,GACZ,YAAY,CA8Ed"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slo-initiate.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/slo-initiate.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAOrE,OAAO,KAAK,EAEV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACZ,MAAM,SAAS,CAAA;AAEhB,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,aAAa,CAAC,WAAW,CAAC,EAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,YAAY,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"slo-initiate.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/slo-initiate.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAOrE,OAAO,KAAK,EAEV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACZ,MAAM,SAAS,CAAA;AAEhB,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,aAAa,CAAC,WAAW,CAAC,EAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,YAAY,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAmItD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sls.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/sls.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAmB1E,wBAAsB,UAAU,CAC9B,GAAG,EAAE,aAAa,CAAC,WAAW,CAAC,EAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,YAAY,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"sls.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/sls.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAmB1E,wBAAsB,UAAU,CAC9B,GAAG,EAAE,aAAa,CAAC,WAAW,CAAC,EAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,YAAY,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAuPtD"}
|
|
@@ -154,6 +154,80 @@ export type SamlSpConfig = {
|
|
|
154
154
|
idpInitiated?: SamlIdpInitiatedConfig;
|
|
155
155
|
/** Clock skew allowance for `NotBefore` / `NotOnOrAfter`. Seconds. */
|
|
156
156
|
clockSkewSeconds?: number;
|
|
157
|
+
/**
|
|
158
|
+
* Override the derived SP entityID.
|
|
159
|
+
*
|
|
160
|
+
* By default the entityID is derived as
|
|
161
|
+
* `<issuerUrl>/<tenantId>/<methodId>` (SAML-AD5) — stable, no config
|
|
162
|
+
* required, and guaranteed to match what SP metadata publishes. Set
|
|
163
|
+
* this **only** to adopt an entityID that already exists at the IdP,
|
|
164
|
+
* so an existing SAML app can be migrated without the customer
|
|
165
|
+
* editing their production SSO config.
|
|
166
|
+
*
|
|
167
|
+
* The override flows through every consumer at once — `AuthnRequest`
|
|
168
|
+
* issuer, `AudienceRestriction` validation, SP metadata, and logout
|
|
169
|
+
* messages — so the anti-drift invariant holds either way. Changing
|
|
170
|
+
* it on a live connection invalidates the IdP-side trust config;
|
|
171
|
+
* treat it as an IdP-coordination event.
|
|
172
|
+
*/
|
|
173
|
+
spEntityId?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Set `ForceAuthn="true"` on the outbound `AuthnRequest`, asking the
|
|
176
|
+
* IdP to re-authenticate the user even if it has a live session.
|
|
177
|
+
* Default `false`.
|
|
178
|
+
*
|
|
179
|
+
* Note that this is a *request*: SAML gives the IdP no obligation to
|
|
180
|
+
* honour it, and there is no way to verify from the Response that it
|
|
181
|
+
* did. Do not treat a successful assertion as proof of fresh
|
|
182
|
+
* authentication.
|
|
183
|
+
*/
|
|
184
|
+
forceAuthn?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Request specific authentication context classes (e.g. MFA) from
|
|
187
|
+
* the IdP via `<RequestedAuthnContext>`.
|
|
188
|
+
*
|
|
189
|
+
* **Omitted ⇒ no `RequestedAuthnContext` element is sent at all**,
|
|
190
|
+
* which lets the IdP apply its own sign-on policy. That is the right
|
|
191
|
+
* default for nearly every deployment: a `RequestedAuthnContext` the
|
|
192
|
+
* IdP cannot satisfy exactly is answered with `NoAuthnContext`
|
|
193
|
+
* instead of a login, and an MFA policy at the IdP is a common way
|
|
194
|
+
* to *not* satisfy `PasswordProtectedTransport` under
|
|
195
|
+
* `Comparison="exact"`.
|
|
196
|
+
*
|
|
197
|
+
* Set it only when the IdP has told you which class refs it honours.
|
|
198
|
+
* `comparison` maps to the `Comparison` attribute and defaults to
|
|
199
|
+
* `"exact"`; `"minimum"` is usually the safer choice when requesting
|
|
200
|
+
* MFA.
|
|
201
|
+
*
|
|
202
|
+
* Requesting a context does **not** verify one was used — read
|
|
203
|
+
* `SamlSpProperties.authnContextClassRef` for what the IdP actually
|
|
204
|
+
* asserted.
|
|
205
|
+
*/
|
|
206
|
+
requestedAuthnContext?: {
|
|
207
|
+
/** Full URNs, e.g. `urn:oasis:names:tc:SAML:2.0:ac:classes:MultiFactorAuthn`. */
|
|
208
|
+
classRefs: ReadonlyArray<string>;
|
|
209
|
+
comparison?: "exact" | "minimum" | "maximum" | "better";
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Require the `<saml:Assertion>` itself to carry a valid XML-DSig.
|
|
213
|
+
* **Defaults to `true` and should stay that way** — the identity,
|
|
214
|
+
* conditions, and audience all live inside the assertion, so signing
|
|
215
|
+
* it is what actually binds them.
|
|
216
|
+
*
|
|
217
|
+
* Set `false` only for an IdP that signs the outer `<Response>` and
|
|
218
|
+
* nothing else, and only together with `requireSignedResponse: true`.
|
|
219
|
+
* The schema refuses to let both be off.
|
|
220
|
+
*/
|
|
221
|
+
requireSignedAssertion?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Require the outer `<samlp:Response>` to carry a valid XML-DSig.
|
|
224
|
+
* Default `false` — requiring it is stricter than the Okta / Entra
|
|
225
|
+
* default and would reject the majority of real IdPs. Enable it for
|
|
226
|
+
* an IdP that signs the Response, either as defence in depth
|
|
227
|
+
* alongside a signed assertion or (with
|
|
228
|
+
* `requireSignedAssertion: false`) as the only signature on offer.
|
|
229
|
+
*/
|
|
230
|
+
requireSignedResponse?: boolean;
|
|
157
231
|
};
|
|
158
232
|
/**
|
|
159
233
|
* Method-private state stashed in `FlowRecord.methodState` for the
|
|
@@ -197,6 +271,27 @@ export type SamlSpProperties = {
|
|
|
197
271
|
sessionIndex?: string;
|
|
198
272
|
/** Unix ms — the assertion's `AuthnInstant`. */
|
|
199
273
|
authnInstant: number;
|
|
274
|
+
/**
|
|
275
|
+
* Unix ms — the `AuthnStatement/@SessionNotOnOrAfter` the IdP
|
|
276
|
+
* asserted, when it supplied one. This is the IdP's own view of when
|
|
277
|
+
* its session for this user expires.
|
|
278
|
+
*
|
|
279
|
+
* The library does **not** act on it: token and session lifetimes are
|
|
280
|
+
* host policy, and this library owns no session. Hosts that want
|
|
281
|
+
* "when their IdP session ends, ours ends" should clamp their own
|
|
282
|
+
* session/token TTL to this value in the `success` callback.
|
|
283
|
+
*/
|
|
284
|
+
sessionNotOnOrAfter?: number;
|
|
285
|
+
/**
|
|
286
|
+
* The `AuthnContext/AuthnContextClassRef` the IdP actually asserted —
|
|
287
|
+
* i.e. how it says it authenticated the user. Absent when the
|
|
288
|
+
* assertion carries none.
|
|
289
|
+
*
|
|
290
|
+
* This is the value to check for step-up decisions ("was this really
|
|
291
|
+
* MFA?"). `SamlSpConfig.requestedAuthnContext` only *asks*; this is
|
|
292
|
+
* the answer, and the two can differ.
|
|
293
|
+
*/
|
|
294
|
+
authnContextClassRef?: string;
|
|
200
295
|
raw: {
|
|
201
296
|
responseXml: string;
|
|
202
297
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/methods/saml-sp/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GACxB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M,CAAA;IACpB;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;;;;;;OAQG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,GAAG,EAAE;QACH,WAAW,EAAE,MAAM,CAAA;KACpB,CAAA;CACF,CAAA"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ScimDirectory` — the host's user directory, as SCIM needs to see it.
|
|
3
|
+
*
|
|
4
|
+
* This is the boundary from `SCIM-AD2`: the library owns the SCIM
|
|
5
|
+
* protocol (routing, bearer auth, schema validation, PATCH
|
|
6
|
+
* normalization, error envelope, pagination, discovery docs) and the
|
|
7
|
+
* host owns every byte of persistence. The library stores no user data.
|
|
8
|
+
*
|
|
9
|
+
* That split is not a compromise — it is the same protocol-over-
|
|
10
|
+
* host-owned-state shape as `ConfigStore`, `MethodStore` and the
|
|
11
|
+
* `success` callback. The host's Users table is the host's.
|
|
12
|
+
*
|
|
13
|
+
* **Consistency:** read-your-writes is required. A SCIM client
|
|
14
|
+
* (notably Okta) will `GET /Users?filter=userName eq "…"` immediately
|
|
15
|
+
* after a `POST /Users` to confirm the create; an eventually-consistent
|
|
16
|
+
* read there produces duplicate users. See `ports/CONSISTENCY.md`.
|
|
17
|
+
*
|
|
18
|
+
* **Errors.** SCIM clients retry `5xx` and give up on `4xx`, so which
|
|
19
|
+
* error you return decides whether a failure is surfaced to an admin or
|
|
20
|
+
* retried forever:
|
|
21
|
+
*
|
|
22
|
+
* - `authError.conflict(...)` → `409 uniqueness`. A collision only you
|
|
23
|
+
* can detect, because only you store the rows.
|
|
24
|
+
* - `authError.invalidRequest(...)` → `400 invalidValue`. A
|
|
25
|
+
* **permanent** rejection — you understood the request and will
|
|
26
|
+
* never accept it. Use it when `addMembers` names a user you do not
|
|
27
|
+
* have (an IdP's group push can reference a member its user push
|
|
28
|
+
* filtered out, or one deleted between operations), or when the data
|
|
29
|
+
* violates a constraint you cannot satisfy.
|
|
30
|
+
* - anything else → `500`, which the client retries. Correct for a
|
|
31
|
+
* transient fault, and far better than reporting a success you did
|
|
32
|
+
* not perform — but returning it for a permanent problem means the
|
|
33
|
+
* IdP retries the same doomed request indefinitely.
|
|
34
|
+
*
|
|
35
|
+
* Your message is passed through on both `4xx` paths; it is what an IdP
|
|
36
|
+
* admin reads in the provisioning log, so make it specific.
|
|
37
|
+
*/
|
|
38
|
+
import type { Result } from "../types/result";
|
|
39
|
+
import type { ScimGroupPatch, ScimGroupQuery, ScimGroupRecord, ScimGroupWrite, ScimPage, ScimUserPatch, ScimUserQuery, ScimUserRecord, ScimUserWrite } from "../types/scim";
|
|
40
|
+
import type { TenantId } from "../types/tenant";
|
|
41
|
+
export type ScimDirectory = {
|
|
42
|
+
/** `null` (not an error) when no user has that id in this tenant. */
|
|
43
|
+
getUser(tenantId: TenantId, id: string): Promise<Result<ScimUserRecord | null>>;
|
|
44
|
+
/**
|
|
45
|
+
* Query users. `query.startIndex` is 1-based and `query.count` is
|
|
46
|
+
* already clamped; `query.totalResults` in the response must be the
|
|
47
|
+
* full match count, not the page length.
|
|
48
|
+
*/
|
|
49
|
+
findUsers(tenantId: TenantId, query: ScimUserQuery): Promise<Result<ScimPage<ScimUserRecord>>>;
|
|
50
|
+
/**
|
|
51
|
+
* Create a user. Return `conflict` if `userName` (or another
|
|
52
|
+
* uniqueness constraint of yours) is already taken — the library
|
|
53
|
+
* cannot check that for you.
|
|
54
|
+
*/
|
|
55
|
+
createUser(tenantId: TenantId, user: ScimUserWrite): Promise<Result<ScimUserRecord>>;
|
|
56
|
+
/**
|
|
57
|
+
* Full replace (`PUT`). Attributes absent from `user` are cleared, per
|
|
58
|
+
* RFC 7644 §3.5.1 — this is a replace, not a merge. Use `patchUser`
|
|
59
|
+
* for partial updates.
|
|
60
|
+
*/
|
|
61
|
+
replaceUser(tenantId: TenantId, id: string, user: ScimUserWrite): Promise<Result<ScimUserRecord>>;
|
|
62
|
+
/**
|
|
63
|
+
* Apply a normalized delta. Present key ⇒ set; absent ⇒ leave alone;
|
|
64
|
+
* `null` ⇒ clear. The library has already resolved SCIM path
|
|
65
|
+
* expressions, so no parsing is needed here.
|
|
66
|
+
*
|
|
67
|
+
* `{ active: false }` is the ordinary deprovisioning signal and is
|
|
68
|
+
* usually the single most important operation to implement correctly.
|
|
69
|
+
*/
|
|
70
|
+
patchUser(tenantId: TenantId, id: string, patch: ScimUserPatch): Promise<Result<ScimUserRecord>>;
|
|
71
|
+
/**
|
|
72
|
+
* Hard delete (`DELETE`). Distinct from deactivation on purpose
|
|
73
|
+
* (`SCIM-AD8`): the library will not quietly turn a destructive
|
|
74
|
+
* request into a soft one. Hosts that do not want cascading deletes
|
|
75
|
+
* should implement this as a tombstone and say so in their runbook —
|
|
76
|
+
* but that decision is theirs to make explicitly, not the library's to
|
|
77
|
+
* make silently.
|
|
78
|
+
*/
|
|
79
|
+
deleteUser(tenantId: TenantId, id: string): Promise<Result<void>>;
|
|
80
|
+
getGroup?(tenantId: TenantId, id: string): Promise<Result<ScimGroupRecord | null>>;
|
|
81
|
+
/**
|
|
82
|
+
* `query.excludeMembers` is set when the client asked for
|
|
83
|
+
* `excludedAttributes=members`. Honour it by not loading membership —
|
|
84
|
+
* Okta sets it while enumerating groups, and ignoring it turns a cheap
|
|
85
|
+
* listing into a fan-out read per group.
|
|
86
|
+
*/
|
|
87
|
+
findGroups?(tenantId: TenantId, query: ScimGroupQuery): Promise<Result<ScimPage<ScimGroupRecord>>>;
|
|
88
|
+
createGroup?(tenantId: TenantId, group: ScimGroupWrite): Promise<Result<ScimGroupRecord>>;
|
|
89
|
+
/** Full replace, including membership. */
|
|
90
|
+
replaceGroup?(tenantId: TenantId, id: string, group: ScimGroupWrite): Promise<Result<ScimGroupRecord>>;
|
|
91
|
+
/**
|
|
92
|
+
* Apply a normalized group delta.
|
|
93
|
+
*
|
|
94
|
+
* Exactly one membership shape arrives at a time: `members` (replace
|
|
95
|
+
* everything) or `addMembers` / `removeMembers` (incremental). The
|
|
96
|
+
* incremental form exists so a 20,000-member group does not have to be
|
|
97
|
+
* read and rewritten to add one person — see `SCIM-AD9`. Adding an
|
|
98
|
+
* existing member or removing an absent one must succeed quietly;
|
|
99
|
+
* IdPs retry and expect idempotence.
|
|
100
|
+
*/
|
|
101
|
+
patchGroup?(tenantId: TenantId, id: string, patch: ScimGroupPatch): Promise<Result<ScimGroupRecord>>;
|
|
102
|
+
deleteGroup?(tenantId: TenantId, id: string): Promise<Result<void>>;
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=scim-directory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scim-directory.d.ts","sourceRoot":"","sources":["../../../src/ports/scim-directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,QAAQ,EACR,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACd,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE/C,MAAM,MAAM,aAAa,GAAG;IAC1B,qEAAqE;IACrE,OAAO,CACL,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAAA;IAEzC;;;;OAIG;IACH,SAAS,CACP,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAA;IAE5C;;;;OAIG;IACH,UAAU,CACR,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC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AAS,EAAE,MAAM,CAAA;IACjB,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC,CAAA"}
|
|
@@ -64,6 +64,10 @@ export type AuthError = {
|
|
|
64
64
|
code: "internal_error";
|
|
65
65
|
description: string;
|
|
66
66
|
cause?: unknown;
|
|
67
|
+
} | {
|
|
68
|
+
code: "conflict";
|
|
69
|
+
description: string;
|
|
70
|
+
attribute?: string;
|
|
67
71
|
} | {
|
|
68
72
|
code: "invalid_dpop_proof";
|
|
69
73
|
description: string;
|
|
@@ -93,6 +97,7 @@ export declare const authError: {
|
|
|
93
97
|
methodKind?: string;
|
|
94
98
|
}) => AuthError;
|
|
95
99
|
invalidTarget: (description: string) => AuthError;
|
|
100
|
+
conflict: (description: string, attribute?: string) => AuthError;
|
|
96
101
|
internalError: (description: string, cause?: unknown) => AuthError;
|
|
97
102
|
invalidDpopProof: (description: string, replaySignal?: {
|
|
98
103
|
jti: string;
|