@coffre/client 0.10.2 → 0.12.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/dpop-C5Zyaixy.d.ts +183 -0
- package/dist/dpop.d.ts +2 -0
- package/dist/dpop.js +290 -0
- package/dist/{index-D86fJBDd.d.ts → index-DxSvWq3r.d.ts} +227 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -485
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +13 -0
- package/dist/src-CjUBSxZs.js +493 -0
- package/dist/workload-9LPBYMmN.d.ts +250 -0
- package/dist/workload-postgres.d.ts +54 -0
- package/dist/workload-postgres.js +210 -0
- package/dist/workload-rRw-uFfr.js +1018 -0
- package/dist/workload.d.ts +3 -0
- package/dist/workload.js +3 -0
- package/package.json +16 -1
- package/src/api.ts +179 -10
- package/src/dpop.ts +301 -0
- package/src/index.ts +5 -3
- package/src/routes.ts +10 -0
- package/src/workload-postgres.ts +254 -0
- package/src/workload-proofs.ts +365 -0
- package/src/workload.ts +711 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { r as CoffreError } from "./index-DxSvWq3r.js";
|
|
2
|
+
import { C as vercel, S as oidc, _ as fly, a as fromCoffre, b as keyAudience, c as workload, d as PlatformProof, f as Proof, g as enrollment, h as azure, i as WorkloadOptions, l as AwsCredentials, m as aws, n as UsedCredential, o as upgradeHeaders, p as ProofContext, r as Workload, s as upgradeRefused, t as NarrowOptions, u as KUBERNETES_TOKEN, v as gcp, x as kubernetes, y as github } from "./workload-9LPBYMmN.js";
|
|
3
|
+
export { type AwsCredentials, CoffreError, KUBERNETES_TOKEN, NarrowOptions, type PlatformProof, type Proof, type ProofContext, UsedCredential, Workload, WorkloadOptions, aws, azure, enrollment, fly, fromCoffre, gcp, github, keyAudience, kubernetes, oidc, upgradeHeaders, upgradeRefused, vercel, workload };
|
package/dist/workload.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { t as CoffreError } from "./src-CjUBSxZs.js";
|
|
2
|
+
import { a as KUBERNETES_TOKEN, c as enrollment, d as github, f as keyAudience, h as vercel, i as workload, l as fly, m as oidc, n as upgradeHeaders, o as aws, p as kubernetes, r as upgradeRefused, s as azure, t as fromCoffre, u as gcp } from "./workload-rRw-uFfr.js";
|
|
3
|
+
export { CoffreError, KUBERNETES_TOKEN, aws, azure, enrollment, fly, fromCoffre, gcp, github, keyAudience, kubernetes, oidc, upgradeHeaders, upgradeRefused, vercel, workload };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coffre/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "The coffre API as typed function calls.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,6 +32,21 @@
|
|
|
32
32
|
"types": "./dist/credential.d.ts",
|
|
33
33
|
"default": "./dist/credential.js"
|
|
34
34
|
},
|
|
35
|
+
"./dpop": {
|
|
36
|
+
"coffre:source": "./src/dpop.ts",
|
|
37
|
+
"types": "./dist/dpop.d.ts",
|
|
38
|
+
"default": "./dist/dpop.js"
|
|
39
|
+
},
|
|
40
|
+
"./workload": {
|
|
41
|
+
"coffre:source": "./src/workload.ts",
|
|
42
|
+
"types": "./dist/workload.d.ts",
|
|
43
|
+
"default": "./dist/workload.js"
|
|
44
|
+
},
|
|
45
|
+
"./workload/postgres": {
|
|
46
|
+
"coffre:source": "./src/workload-postgres.ts",
|
|
47
|
+
"types": "./dist/workload-postgres.d.ts",
|
|
48
|
+
"default": "./dist/workload-postgres.js"
|
|
49
|
+
},
|
|
35
50
|
"./package.json": "./package.json"
|
|
36
51
|
},
|
|
37
52
|
"devDependencies": {
|
package/src/api.ts
CHANGED
|
@@ -76,6 +76,7 @@ export type Api = {
|
|
|
76
76
|
accessible: boolean;
|
|
77
77
|
parent: string | null;
|
|
78
78
|
protected: boolean;
|
|
79
|
+
unprotectable: boolean;
|
|
79
80
|
personal: boolean;
|
|
80
81
|
details: null | {
|
|
81
82
|
archivedAt: string | null;
|
|
@@ -277,6 +278,8 @@ export type Api = {
|
|
|
277
278
|
fallback: boolean;
|
|
278
279
|
};
|
|
279
280
|
protected: boolean;
|
|
281
|
+
unprotectable: boolean;
|
|
282
|
+
loosenable: boolean;
|
|
280
283
|
rotateAfterDays: number | null;
|
|
281
284
|
};
|
|
282
285
|
};
|
|
@@ -437,6 +440,7 @@ export type Api = {
|
|
|
437
440
|
"POST /reveals": {
|
|
438
441
|
input: {
|
|
439
442
|
path: string;
|
|
443
|
+
keys?: string[];
|
|
440
444
|
};
|
|
441
445
|
output: {
|
|
442
446
|
operationId: string;
|
|
@@ -444,6 +448,7 @@ export type Api = {
|
|
|
444
448
|
[key: string]: string;
|
|
445
449
|
};
|
|
446
450
|
sensitive: string[];
|
|
451
|
+
useOnly: string[];
|
|
447
452
|
version: string | null;
|
|
448
453
|
};
|
|
449
454
|
};
|
|
@@ -562,6 +567,9 @@ export type Api = {
|
|
|
562
567
|
scope: null | {
|
|
563
568
|
[key: string]: string;
|
|
564
569
|
};
|
|
570
|
+
session?: {
|
|
571
|
+
bindingId: string | null;
|
|
572
|
+
};
|
|
565
573
|
}[];
|
|
566
574
|
references: {
|
|
567
575
|
id: string;
|
|
@@ -704,6 +712,9 @@ export type Api = {
|
|
|
704
712
|
scope: null | {
|
|
705
713
|
[key: string]: string;
|
|
706
714
|
};
|
|
715
|
+
session?: {
|
|
716
|
+
bindingId: string | null;
|
|
717
|
+
};
|
|
707
718
|
}[];
|
|
708
719
|
references: {
|
|
709
720
|
id: string;
|
|
@@ -739,6 +750,9 @@ export type Api = {
|
|
|
739
750
|
scope: null | {
|
|
740
751
|
[key: string]: string;
|
|
741
752
|
};
|
|
753
|
+
session?: {
|
|
754
|
+
bindingId: string | null;
|
|
755
|
+
};
|
|
742
756
|
}[];
|
|
743
757
|
};
|
|
744
758
|
};
|
|
@@ -752,16 +766,18 @@ export type Api = {
|
|
|
752
766
|
};
|
|
753
767
|
};
|
|
754
768
|
output: {
|
|
755
|
-
id: string;
|
|
756
|
-
token: string;
|
|
757
|
-
expiresAt: string;
|
|
758
769
|
scope: {
|
|
759
770
|
[key: string]: string;
|
|
760
771
|
};
|
|
772
|
+
withheld?: string[];
|
|
761
773
|
} | {
|
|
774
|
+
id: string;
|
|
775
|
+
token: string;
|
|
776
|
+
expiresAt: string;
|
|
762
777
|
scope: {
|
|
763
778
|
[key: string]: string;
|
|
764
779
|
};
|
|
780
|
+
withheld?: string[];
|
|
765
781
|
};
|
|
766
782
|
};
|
|
767
783
|
"DELETE /members/:member/tokens/:id": {
|
|
@@ -775,7 +791,7 @@ export type Api = {
|
|
|
775
791
|
output: {
|
|
776
792
|
bindings: {
|
|
777
793
|
id: string;
|
|
778
|
-
profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
|
|
794
|
+
profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
|
|
779
795
|
issuer: string;
|
|
780
796
|
jwksUri: string;
|
|
781
797
|
keys: null | {
|
|
@@ -789,6 +805,22 @@ export type Api = {
|
|
|
789
805
|
scope: null | {
|
|
790
806
|
[key: string]: string;
|
|
791
807
|
};
|
|
808
|
+
policy: null | {
|
|
809
|
+
sources?: string[];
|
|
810
|
+
audience?: string;
|
|
811
|
+
keyAudience?: true;
|
|
812
|
+
sessionHours?: number;
|
|
813
|
+
replicas?: number;
|
|
814
|
+
sessionDays?: number;
|
|
815
|
+
overlapMinutes?: number;
|
|
816
|
+
mintedBy?: string;
|
|
817
|
+
approve?: true;
|
|
818
|
+
onContention?: "alert";
|
|
819
|
+
unsignedUploads?: true;
|
|
820
|
+
reads?: {
|
|
821
|
+
[key: string]: "*" | string[];
|
|
822
|
+
};
|
|
823
|
+
};
|
|
792
824
|
label: string | null;
|
|
793
825
|
createdAt: string;
|
|
794
826
|
createdBy: string;
|
|
@@ -798,7 +830,7 @@ export type Api = {
|
|
|
798
830
|
};
|
|
799
831
|
"POST /members/:member/bindings": {
|
|
800
832
|
input: {
|
|
801
|
-
profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
|
|
833
|
+
profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
|
|
802
834
|
claims: {
|
|
803
835
|
[key: string]: string | string[];
|
|
804
836
|
};
|
|
@@ -813,9 +845,12 @@ export type Api = {
|
|
|
813
845
|
[key: string]: unknown;
|
|
814
846
|
}[];
|
|
815
847
|
};
|
|
848
|
+
policy?: {
|
|
849
|
+
[key: string]: unknown;
|
|
850
|
+
};
|
|
816
851
|
};
|
|
817
852
|
output: {
|
|
818
|
-
profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
|
|
853
|
+
profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
|
|
819
854
|
issuer: string;
|
|
820
855
|
jwksUri: string;
|
|
821
856
|
keys: null | {
|
|
@@ -829,6 +864,23 @@ export type Api = {
|
|
|
829
864
|
scope: {
|
|
830
865
|
[key: string]: string;
|
|
831
866
|
};
|
|
867
|
+
policy: null | {
|
|
868
|
+
sources?: string[];
|
|
869
|
+
audience?: string;
|
|
870
|
+
keyAudience?: true;
|
|
871
|
+
sessionHours?: number;
|
|
872
|
+
replicas?: number;
|
|
873
|
+
sessionDays?: number;
|
|
874
|
+
overlapMinutes?: number;
|
|
875
|
+
mintedBy?: string;
|
|
876
|
+
approve?: true;
|
|
877
|
+
onContention?: "alert";
|
|
878
|
+
unsignedUploads?: true;
|
|
879
|
+
reads?: {
|
|
880
|
+
[key: string]: "*" | string[];
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
withheld: string[];
|
|
832
884
|
replaces: {
|
|
833
885
|
id: string;
|
|
834
886
|
why: "asked" | "keys_moved";
|
|
@@ -836,7 +888,7 @@ export type Api = {
|
|
|
836
888
|
} | {
|
|
837
889
|
binding: {
|
|
838
890
|
id: string;
|
|
839
|
-
profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
|
|
891
|
+
profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
|
|
840
892
|
issuer: string;
|
|
841
893
|
jwksUri: string;
|
|
842
894
|
keys: null | {
|
|
@@ -850,6 +902,22 @@ export type Api = {
|
|
|
850
902
|
scope: null | {
|
|
851
903
|
[key: string]: string;
|
|
852
904
|
};
|
|
905
|
+
policy: null | {
|
|
906
|
+
sources?: string[];
|
|
907
|
+
audience?: string;
|
|
908
|
+
keyAudience?: true;
|
|
909
|
+
sessionHours?: number;
|
|
910
|
+
replicas?: number;
|
|
911
|
+
sessionDays?: number;
|
|
912
|
+
overlapMinutes?: number;
|
|
913
|
+
mintedBy?: string;
|
|
914
|
+
approve?: true;
|
|
915
|
+
onContention?: "alert";
|
|
916
|
+
unsignedUploads?: true;
|
|
917
|
+
reads?: {
|
|
918
|
+
[key: string]: "*" | string[];
|
|
919
|
+
};
|
|
920
|
+
};
|
|
853
921
|
label: string | null;
|
|
854
922
|
createdAt: string;
|
|
855
923
|
createdBy: string;
|
|
@@ -1337,10 +1405,11 @@ export type Api = {
|
|
|
1337
1405
|
thumbprint: string;
|
|
1338
1406
|
}[];
|
|
1339
1407
|
replaces: string[];
|
|
1408
|
+
withheld: string[];
|
|
1340
1409
|
} | {
|
|
1341
1410
|
bindings: {
|
|
1342
1411
|
id: string;
|
|
1343
|
-
profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
|
|
1412
|
+
profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
|
|
1344
1413
|
issuer: string;
|
|
1345
1414
|
jwksUri: string;
|
|
1346
1415
|
keys: null | {
|
|
@@ -1354,6 +1423,22 @@ export type Api = {
|
|
|
1354
1423
|
scope: null | {
|
|
1355
1424
|
[key: string]: string;
|
|
1356
1425
|
};
|
|
1426
|
+
policy: null | {
|
|
1427
|
+
sources?: string[];
|
|
1428
|
+
audience?: string;
|
|
1429
|
+
keyAudience?: true;
|
|
1430
|
+
sessionHours?: number;
|
|
1431
|
+
replicas?: number;
|
|
1432
|
+
sessionDays?: number;
|
|
1433
|
+
overlapMinutes?: number;
|
|
1434
|
+
mintedBy?: string;
|
|
1435
|
+
approve?: true;
|
|
1436
|
+
onContention?: "alert";
|
|
1437
|
+
unsignedUploads?: true;
|
|
1438
|
+
reads?: {
|
|
1439
|
+
[key: string]: "*" | string[];
|
|
1440
|
+
};
|
|
1441
|
+
};
|
|
1357
1442
|
label: string | null;
|
|
1358
1443
|
createdAt: string;
|
|
1359
1444
|
createdBy: string;
|
|
@@ -1388,6 +1473,7 @@ export type Api = {
|
|
|
1388
1473
|
scope: {
|
|
1389
1474
|
[key: string]: string;
|
|
1390
1475
|
};
|
|
1476
|
+
withheld?: string[];
|
|
1391
1477
|
};
|
|
1392
1478
|
};
|
|
1393
1479
|
"GET /roles": {
|
|
@@ -1586,6 +1672,47 @@ export type Api = {
|
|
|
1586
1672
|
};
|
|
1587
1673
|
};
|
|
1588
1674
|
};
|
|
1675
|
+
"GET /members/:member/bindings/:id/enrollments": {
|
|
1676
|
+
input: undefined;
|
|
1677
|
+
output: never;
|
|
1678
|
+
};
|
|
1679
|
+
"POST /members/:member/bindings/:id/enrollments": {
|
|
1680
|
+
input: {
|
|
1681
|
+
[key: string]: never;
|
|
1682
|
+
};
|
|
1683
|
+
output: never;
|
|
1684
|
+
};
|
|
1685
|
+
"POST /members/:member/bindings/:id/enrollments/:enrollment/promote": {
|
|
1686
|
+
input: {
|
|
1687
|
+
now?: boolean;
|
|
1688
|
+
};
|
|
1689
|
+
output: never;
|
|
1690
|
+
};
|
|
1691
|
+
"POST /members/:member/tokens/:id/approve": {
|
|
1692
|
+
input: undefined;
|
|
1693
|
+
output: never;
|
|
1694
|
+
};
|
|
1695
|
+
"GET /freezes": {
|
|
1696
|
+
input: undefined;
|
|
1697
|
+
output: never;
|
|
1698
|
+
};
|
|
1699
|
+
"POST /freezes": {
|
|
1700
|
+
input: {
|
|
1701
|
+
target: string;
|
|
1702
|
+
reason: string;
|
|
1703
|
+
};
|
|
1704
|
+
output: never;
|
|
1705
|
+
};
|
|
1706
|
+
"DELETE /freezes/:target": {
|
|
1707
|
+
input: undefined;
|
|
1708
|
+
output: never;
|
|
1709
|
+
};
|
|
1710
|
+
"DELETE /handles/:id": {
|
|
1711
|
+
input: undefined;
|
|
1712
|
+
output: {
|
|
1713
|
+
revoked: true;
|
|
1714
|
+
};
|
|
1715
|
+
};
|
|
1589
1716
|
};
|
|
1590
1717
|
|
|
1591
1718
|
export type AccessValue = string | null | {
|
|
@@ -1707,7 +1834,7 @@ export type AuthorizationView = {
|
|
|
1707
1834
|
};
|
|
1708
1835
|
|
|
1709
1836
|
export type BindingPlan = {
|
|
1710
|
-
profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
|
|
1837
|
+
profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
|
|
1711
1838
|
issuer: string;
|
|
1712
1839
|
jwksUri: string;
|
|
1713
1840
|
keys: null | {
|
|
@@ -1721,6 +1848,23 @@ export type BindingPlan = {
|
|
|
1721
1848
|
scope: {
|
|
1722
1849
|
[key: string]: string;
|
|
1723
1850
|
};
|
|
1851
|
+
policy: null | {
|
|
1852
|
+
sources?: string[];
|
|
1853
|
+
audience?: string;
|
|
1854
|
+
keyAudience?: true;
|
|
1855
|
+
sessionHours?: number;
|
|
1856
|
+
replicas?: number;
|
|
1857
|
+
sessionDays?: number;
|
|
1858
|
+
overlapMinutes?: number;
|
|
1859
|
+
mintedBy?: string;
|
|
1860
|
+
approve?: true;
|
|
1861
|
+
onContention?: "alert";
|
|
1862
|
+
unsignedUploads?: true;
|
|
1863
|
+
reads?: {
|
|
1864
|
+
[key: string]: "*" | string[];
|
|
1865
|
+
};
|
|
1866
|
+
};
|
|
1867
|
+
withheld: string[];
|
|
1724
1868
|
replaces: {
|
|
1725
1869
|
id: string;
|
|
1726
1870
|
why: "asked" | "keys_moved";
|
|
@@ -1729,7 +1873,7 @@ export type BindingPlan = {
|
|
|
1729
1873
|
|
|
1730
1874
|
export type BindingView = {
|
|
1731
1875
|
id: string;
|
|
1732
|
-
profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
|
|
1876
|
+
profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
|
|
1733
1877
|
issuer: string;
|
|
1734
1878
|
jwksUri: string;
|
|
1735
1879
|
keys: null | {
|
|
@@ -1743,6 +1887,22 @@ export type BindingView = {
|
|
|
1743
1887
|
scope: null | {
|
|
1744
1888
|
[key: string]: string;
|
|
1745
1889
|
};
|
|
1890
|
+
policy: null | {
|
|
1891
|
+
sources?: string[];
|
|
1892
|
+
audience?: string;
|
|
1893
|
+
keyAudience?: true;
|
|
1894
|
+
sessionHours?: number;
|
|
1895
|
+
replicas?: number;
|
|
1896
|
+
sessionDays?: number;
|
|
1897
|
+
overlapMinutes?: number;
|
|
1898
|
+
mintedBy?: string;
|
|
1899
|
+
approve?: true;
|
|
1900
|
+
onContention?: "alert";
|
|
1901
|
+
unsignedUploads?: true;
|
|
1902
|
+
reads?: {
|
|
1903
|
+
[key: string]: "*" | string[];
|
|
1904
|
+
};
|
|
1905
|
+
};
|
|
1746
1906
|
label: string | null;
|
|
1747
1907
|
createdAt: string;
|
|
1748
1908
|
createdBy: string;
|
|
@@ -1770,6 +1930,7 @@ export type KeysPlan = {
|
|
|
1770
1930
|
thumbprint: string;
|
|
1771
1931
|
}[];
|
|
1772
1932
|
replaces: string[];
|
|
1933
|
+
withheld: string[];
|
|
1773
1934
|
};
|
|
1774
1935
|
|
|
1775
1936
|
export type Deletion = {
|
|
@@ -2082,6 +2243,9 @@ export type OffboardingReport = {
|
|
|
2082
2243
|
scope: null | {
|
|
2083
2244
|
[key: string]: string;
|
|
2084
2245
|
};
|
|
2246
|
+
session?: {
|
|
2247
|
+
bindingId: string | null;
|
|
2248
|
+
};
|
|
2085
2249
|
}[];
|
|
2086
2250
|
references: {
|
|
2087
2251
|
id: string;
|
|
@@ -2137,6 +2301,7 @@ export type ProjectSummary = {
|
|
|
2137
2301
|
accessible: boolean;
|
|
2138
2302
|
parent: string | null;
|
|
2139
2303
|
protected: boolean;
|
|
2304
|
+
unprotectable: boolean;
|
|
2140
2305
|
personal: boolean;
|
|
2141
2306
|
details: null | {
|
|
2142
2307
|
archivedAt: string | null;
|
|
@@ -2337,6 +2502,7 @@ export type TokenPlan = {
|
|
|
2337
2502
|
scope: {
|
|
2338
2503
|
[key: string]: string;
|
|
2339
2504
|
};
|
|
2505
|
+
withheld?: string[];
|
|
2340
2506
|
};
|
|
2341
2507
|
|
|
2342
2508
|
export type TokenRow = {
|
|
@@ -2351,4 +2517,7 @@ export type TokenRow = {
|
|
|
2351
2517
|
scope: null | {
|
|
2352
2518
|
[key: string]: string;
|
|
2353
2519
|
};
|
|
2520
|
+
session?: {
|
|
2521
|
+
bindingId: string | null;
|
|
2522
|
+
};
|
|
2354
2523
|
};
|