@coffre/client 0.12.1 → 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/{index-DxSvWq3r.d.ts → index-eVeI8AOV.d.ts} +17 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +2 -1
- package/dist/{src-CjUBSxZs.js → src-BCKSeCER.js} +7 -1
- package/dist/{workload-CizGtWB7.js → workload-DDSVKy-p.js} +1 -1
- package/dist/workload-postgres.js +1 -1
- package/dist/workload.d.ts +1 -1
- package/dist/workload.js +2 -2
- package/package.json +1 -1
- package/src/api.ts +9 -0
- package/src/index.ts +6 -0
- package/src/routes.ts +1 -0
|
@@ -1710,6 +1710,15 @@ type Api = {
|
|
|
1710
1710
|
revoked: true;
|
|
1711
1711
|
};
|
|
1712
1712
|
};
|
|
1713
|
+
"POST /audit/loss": {
|
|
1714
|
+
input: {
|
|
1715
|
+
from: number;
|
|
1716
|
+
to: number;
|
|
1717
|
+
};
|
|
1718
|
+
output: {
|
|
1719
|
+
resumes: number | null;
|
|
1720
|
+
};
|
|
1721
|
+
};
|
|
1713
1722
|
};
|
|
1714
1723
|
type AccessValue = string | null | {
|
|
1715
1724
|
role: string;
|
|
@@ -3786,6 +3795,14 @@ declare function createClient(options: ClientOptions): {
|
|
|
3786
3795
|
}[];
|
|
3787
3796
|
};
|
|
3788
3797
|
}>;
|
|
3798
|
+
/**
|
|
3799
|
+
* Accept that entries `from` to `to` are lost for good, as an Owner of
|
|
3800
|
+
* the whole instance: the audit watch's finding, inside the range, stays
|
|
3801
|
+
* in the log, and its anchor goes on past them.
|
|
3802
|
+
*/
|
|
3803
|
+
acceptLoss: (range: RouteInput<"POST /audit/loss">) => Promise<{
|
|
3804
|
+
resumes: number | null;
|
|
3805
|
+
}>;
|
|
3789
3806
|
};
|
|
3790
3807
|
};
|
|
3791
3808
|
type CoffreClient = ReturnType<typeof createClient>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as RolesView, A as Decision, B as KeysPlan, C as ApprovalView, D as BindingPlan, E as AuthorizationView, F as DryRunResult, G as MissingKey, H as Me, I as EnvironmentView, J as ProjectSummary, K as OffboardingReport, L as IdentityRow, M as DeletionResult, N as DismissedKey, O as BindingView, P as DryRunOutcome, Q as RoleView, R as ImpactLine, S as Api, T as AuthInfo, U as Member, V as ListedReference, W as MemberAccess, X as RemovedMember, Y as ReferenceView, Z as RoleImpact, _ as byFolder, a as Params, at as TokenRow, b as olderThan, c as RouteOutput, d as planImport, et as SecretKey, f as Unreachable, g as shownMember, h as serviceName, i as ImportAction, it as TokenPlan, j as Deletion, k as ConnectedApp, l as Transport, m as apiMember, n as CoffreClient, nt as SessionRow, o as RouteInput, ot as WorkloadIds, p as unreachable, q as PersonalConfig, r as CoffreError, rt as SetResult, s as RouteKey, t as ClientOptions, tt as SecretVersion, u as createClient, v as foldersOf, w as AuditEntryView, x as AccessValue, y as ageInDays, z as InheritResult } from "./index-
|
|
1
|
+
import { $ as RolesView, A as Decision, B as KeysPlan, C as ApprovalView, D as BindingPlan, E as AuthorizationView, F as DryRunResult, G as MissingKey, H as Me, I as EnvironmentView, J as ProjectSummary, K as OffboardingReport, L as IdentityRow, M as DeletionResult, N as DismissedKey, O as BindingView, P as DryRunOutcome, Q as RoleView, R as ImpactLine, S as Api, T as AuthInfo, U as Member, V as ListedReference, W as MemberAccess, X as RemovedMember, Y as ReferenceView, Z as RoleImpact, _ as byFolder, a as Params, at as TokenRow, b as olderThan, c as RouteOutput, d as planImport, et as SecretKey, f as Unreachable, g as shownMember, h as serviceName, i as ImportAction, it as TokenPlan, j as Deletion, k as ConnectedApp, l as Transport, m as apiMember, n as CoffreClient, nt as SessionRow, o as RouteInput, ot as WorkloadIds, p as unreachable, q as PersonalConfig, r as CoffreError, rt as SetResult, s as RouteKey, t as ClientOptions, tt as SecretVersion, u as createClient, v as foldersOf, w as AuditEntryView, x as AccessValue, y as ageInDays, z as InheritResult } from "./index-eVeI8AOV.js";
|
|
2
2
|
export { type AccessValue, type Api, type ApprovalView, type AuditEntryView, type AuthInfo, type AuthorizationView, type BindingPlan, type BindingView, ClientOptions, CoffreClient, CoffreError, type ConnectedApp, type Decision, type Deletion, type DeletionResult, type DismissedKey, type DryRunOutcome, type DryRunResult, type EnvironmentView, type IdentityRow, type ImpactLine, ImportAction, type InheritResult, type KeysPlan, type ListedReference, type Me, type Member, type MemberAccess, type MissingKey, type OffboardingReport, Params, type PersonalConfig, type ProjectSummary, type ReferenceView, type RemovedMember, type RoleImpact, type RoleView, type RolesView, RouteInput, RouteKey, RouteOutput, type SecretKey, type SecretVersion, type SessionRow, type SetResult, type TokenPlan, type TokenRow, Transport, Unreachable, type WorkloadIds, ageInDays, apiMember, byFolder, createClient, foldersOf, olderThan, planImport, serviceName, shownMember, unreachable };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as serviceName, c as foldersOf, d as Unreachable, f as unreachable, i as apiMember, l as ageInDays, n as createClient, o as shownMember, r as planImport, s as byFolder, t as CoffreError, u as olderThan } from "./src-
|
|
1
|
+
import { a as serviceName, c as foldersOf, d as Unreachable, f as unreachable, i as apiMember, l as ageInDays, n as createClient, o as shownMember, r as planImport, s as byFolder, t as CoffreError, u as olderThan } from "./src-BCKSeCER.js";
|
|
2
2
|
export { CoffreError, Unreachable, ageInDays, apiMember, byFolder, createClient, foldersOf, olderThan, planImport, serviceName, shownMember, unreachable };
|
package/dist/routes.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Params, o as RouteInput, s as RouteKey } from "./index-
|
|
1
|
+
import { a as Params, o as RouteInput, s as RouteKey } from "./index-eVeI8AOV.js";
|
|
2
2
|
//#region src/routes.d.ts
|
|
3
3
|
export type GetKey = Extract<RouteKey, `GET ${string}`>;
|
|
4
4
|
/** Each GET route, with what to ask it. */
|
package/dist/routes.js
CHANGED
|
@@ -142,7 +142,8 @@ const EVERY_ROUTE = {
|
|
|
142
142
|
"DELETE /apps/:id": true,
|
|
143
143
|
"GET /audit": true,
|
|
144
144
|
"GET /audit/verification": true,
|
|
145
|
-
"GET /audit/keys": true
|
|
145
|
+
"GET /audit/keys": true,
|
|
146
|
+
"POST /audit/loss": true
|
|
146
147
|
};
|
|
147
148
|
/**
|
|
148
149
|
* Every route as a method and a URL, each parameter a made-up value: what
|
|
@@ -454,7 +454,13 @@ set: (member, access) => call("PATCH /access/:member", { member }, access) },
|
|
|
454
454
|
}
|
|
455
455
|
},
|
|
456
456
|
/** What an escrowed key is checked against: public material, for admins and owners of the whole instance. */
|
|
457
|
-
keys: () => call("GET /audit/keys", {})
|
|
457
|
+
keys: () => call("GET /audit/keys", {}),
|
|
458
|
+
/**
|
|
459
|
+
* Accept that entries `from` to `to` are lost for good, as an Owner of
|
|
460
|
+
* the whole instance: the audit watch's finding, inside the range, stays
|
|
461
|
+
* in the log, and its anchor goes on past them.
|
|
462
|
+
*/
|
|
463
|
+
acceptLoss: (range) => call("POST /audit/loss", {}, range)
|
|
458
464
|
}
|
|
459
465
|
};
|
|
460
466
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as CoffreError } from "./src-
|
|
1
|
+
import { t as CoffreError } from "./src-BCKSeCER.js";
|
|
2
2
|
import { base64url, bodyDigest, bodyLine, contentDigest, createProof, declaredDigest, generateProofKey, thumbprint } from "./dpop.js";
|
|
3
3
|
//#region src/workload-proofs.ts
|
|
4
4
|
/** `<audience>#jkt=<thumbprint>`: an audience only this key can use (section 4.2). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as upgradeRefused, r as upgradeHeaders } from "./workload-
|
|
1
|
+
import { i as upgradeRefused, r as upgradeHeaders } from "./workload-DDSVKy-p.js";
|
|
2
2
|
import { Buffer } from "node:buffer";
|
|
3
3
|
import { Duplex } from "node:stream";
|
|
4
4
|
//#region src/workload-postgres.ts
|
package/dist/workload.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { r as CoffreError } from "./index-
|
|
1
|
+
import { r as CoffreError } from "./index-eVeI8AOV.js";
|
|
2
2
|
import { C as oidc, S as kubernetes, _ as enrollment, a as askedNonce, b as github, c as upgradeRefused, d as KUBERNETES_TOKEN, f as PlatformProof, g as azure, h as aws, i as WorkloadOptions, l as workload, m as ProofContext, n as UsedCredential, o as fromCoffre, p as Proof, r as Workload, s as upgradeHeaders, t as NarrowOptions, u as AwsCredentials, v as fly, w as vercel, x as keyAudience, y as gcp } from "./workload-CdLHVAtr.js";
|
|
3
3
|
export { type AwsCredentials, CoffreError, KUBERNETES_TOKEN, NarrowOptions, type PlatformProof, type Proof, type ProofContext, UsedCredential, Workload, WorkloadOptions, askedNonce, aws, azure, enrollment, fly, fromCoffre, gcp, github, keyAudience, kubernetes, oidc, upgradeHeaders, upgradeRefused, vercel, workload };
|
package/dist/workload.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as CoffreError } from "./src-
|
|
2
|
-
import { a as workload, c as azure, d as gcp, f as github, g as vercel, h as oidc, i as upgradeRefused, l as enrollment, m as kubernetes, n as fromCoffre, o as KUBERNETES_TOKEN, p as keyAudience, r as upgradeHeaders, s as aws, t as askedNonce, u as fly } from "./workload-
|
|
1
|
+
import { t as CoffreError } from "./src-BCKSeCER.js";
|
|
2
|
+
import { a as workload, c as azure, d as gcp, f as github, g as vercel, h as oidc, i as upgradeRefused, l as enrollment, m as kubernetes, n as fromCoffre, o as KUBERNETES_TOKEN, p as keyAudience, r as upgradeHeaders, s as aws, t as askedNonce, u as fly } from "./workload-DDSVKy-p.js";
|
|
3
3
|
export { CoffreError, KUBERNETES_TOKEN, askedNonce, aws, azure, enrollment, fly, fromCoffre, gcp, github, keyAudience, kubernetes, oidc, upgradeHeaders, upgradeRefused, vercel, workload };
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -1713,6 +1713,15 @@ export type Api = {
|
|
|
1713
1713
|
revoked: true;
|
|
1714
1714
|
};
|
|
1715
1715
|
};
|
|
1716
|
+
"POST /audit/loss": {
|
|
1717
|
+
input: {
|
|
1718
|
+
from: number;
|
|
1719
|
+
to: number;
|
|
1720
|
+
};
|
|
1721
|
+
output: {
|
|
1722
|
+
resumes: number | null;
|
|
1723
|
+
};
|
|
1724
|
+
};
|
|
1716
1725
|
};
|
|
1717
1726
|
|
|
1718
1727
|
export type AccessValue = string | null | {
|
package/src/index.ts
CHANGED
|
@@ -479,6 +479,12 @@ export function createClient(options: ClientOptions) {
|
|
|
479
479
|
},
|
|
480
480
|
/** What an escrowed key is checked against: public material, for admins and owners of the whole instance. */
|
|
481
481
|
keys: () => call('GET /audit/keys', {}),
|
|
482
|
+
/**
|
|
483
|
+
* Accept that entries `from` to `to` are lost for good, as an Owner of
|
|
484
|
+
* the whole instance: the audit watch's finding, inside the range, stays
|
|
485
|
+
* in the log, and its anchor goes on past them.
|
|
486
|
+
*/
|
|
487
|
+
acceptLoss: (range: RouteInput<'POST /audit/loss'>) => call('POST /audit/loss', {}, range),
|
|
482
488
|
},
|
|
483
489
|
};
|
|
484
490
|
}
|