@flickfyi/flkr 0.0.146 → 0.0.156
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/node_modules/@flickfyi/attestation/.turbo/turbo-build.log +5 -5
- package/node_modules/@flickfyi/attestation/dist/index.js +2 -2
- package/node_modules/@flickfyi/attestation/src/verify-attestation.ts +5 -3
- package/node_modules/@flickfyi/attestation/tests/verify-attestation.test.ts +67 -1
- package/node_modules/@flickfyi/biscuit/.turbo/turbo-build.log +4 -4
- package/node_modules/@flickfyi/core/.turbo/turbo-build.log +83 -82
- package/node_modules/@flickfyi/http-message-sig/.turbo/turbo-build.log +6 -6
- package/node_modules/@flickfyi/http-message-sig/dist/index.js +683 -3
- package/node_modules/@flickfyi/http-message-sig/package.json +3 -2
- package/node_modules/@flickfyi/http-message-sig/src/build.ts +3 -1
- package/node_modules/@flickfyi/http-message-sig/tests/build.spec.ts +6 -0
- package/node_modules/@flickfyi/identity/.turbo/turbo-build.log +7 -6
- package/node_modules/@flickfyi/identity/README.md +36 -0
- package/node_modules/@flickfyi/identity/dist/index.d.ts +9 -6
- package/node_modules/@flickfyi/identity/dist/index.js +1 -1
- package/node_modules/@flickfyi/identity/src/types.ts +8 -3
- package/node_modules/@flickfyi/identity/src/verify-attestation.ts +10 -6
- package/node_modules/@flickfyi/identity/tests/fixtures/expired-attestation.json +9 -0
- package/node_modules/@flickfyi/identity/tests/supplied-attestation.test.ts +104 -0
- package/node_modules/@flickfyi/lens/.turbo/turbo-build.log +4 -4
- package/node_modules/@flickfyi/photon/.turbo/turbo-build.log +5 -5
- package/node_modules/@flickfyi/rwsdk-extensions/.turbo/turbo-build.log +4 -4
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isArrayBuffer } from '@sindresorhus/is'
|
|
1
2
|
import {
|
|
2
3
|
type BareItem,
|
|
3
4
|
isInnerList,
|
|
@@ -587,7 +588,8 @@ function toStructuredParameterValue(value: ParameterValue): BareItem {
|
|
|
587
588
|
if (
|
|
588
589
|
typeof value === 'string' ||
|
|
589
590
|
typeof value === 'number' ||
|
|
590
|
-
typeof value === 'boolean'
|
|
591
|
+
typeof value === 'boolean' ||
|
|
592
|
+
isArrayBuffer(value)
|
|
591
593
|
) {
|
|
592
594
|
return value
|
|
593
595
|
}
|
|
@@ -353,6 +353,12 @@ describe('build', () => {
|
|
|
353
353
|
})
|
|
354
354
|
|
|
355
355
|
describe('buildSignatureInputString', () => {
|
|
356
|
+
it('serializes binary proof parameters as structured byte sequences', () => {
|
|
357
|
+
expect(
|
|
358
|
+
buildSignatureInputString([], { proof: new Uint8Array([1, 2, 3]).buffer })
|
|
359
|
+
).toBe('();proof=:AQID:')
|
|
360
|
+
})
|
|
361
|
+
|
|
356
362
|
describe('specification test cases', () => {
|
|
357
363
|
it('constructs minimal example', () => {
|
|
358
364
|
const components: Component[] = []
|
|
@@ -12,18 +12,19 @@ dist/signature-parameters.js 2.10 kB │ gzip: 0.79 kB
|
|
|
12
12
|
dist/signing.js 2.29 kB │ gzip: 1.09 kB
|
|
13
13
|
dist/cwt.d.ts 2.48 kB │ gzip: 0.80 kB
|
|
14
14
|
dist/biscuit.js 7.65 kB │ gzip: 2.60 kB
|
|
15
|
-
dist/index.d.ts
|
|
15
|
+
dist/index.d.ts 8.26 kB │ gzip: 2.13 kB
|
|
16
16
|
dist/base-BgCpAGbi.js 11.49 kB │ gzip: 3.79 kB
|
|
17
|
-
dist/index.js 13.
|
|
17
|
+
dist/index.js 13.62 kB │ gzip: 3.68 kB
|
|
18
18
|
dist/nist-BxBMnBNH.js 41.79 kB │ gzip: 13.28 kB
|
|
19
19
|
dist/curve-DYf6id8S.js 91.31 kB │ gzip: 28.67 kB
|
|
20
20
|
dist/cwt-C-BaViSq.js 107.64 kB │ gzip: 24.53 kB
|
|
21
21
|
|
|
22
|
-
[32m✓ built in
|
|
23
|
-
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for
|
|
22
|
+
[32m✓ built in 7.91s[39m
|
|
23
|
+
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for 7.8s of this 7.9s build (99%).
|
|
24
24
|
The slowest callbacks, timed inside each callback (the wait before a callback starts is excluded, the time it awaits is included):
|
|
25
|
-
- plugin rolldown-plugin-dts:generate load (
|
|
26
|
-
|
|
25
|
+
- plugin rolldown-plugin-dts:generate load (95%, 7.5s, 9 calls)
|
|
26
|
+
- plugin rolldown-plugin-dts:fake-js transform (43%, 3.4s, 9 calls)
|
|
27
|
+
These rows add up to more than the total. Callbacks can overlap, so the same time counts for more than one row.
|
|
27
28
|
1 callback is listed without a time. Its calls overlapped, so the time inside one call includes work from other calls. To find its cost, profile the build with `node --cpu-prof`:
|
|
28
29
|
- plugin rolldown-plugin-dts:resolver resolveId (17 calls)
|
|
29
30
|
See https://rolldown.rs/reference/InputOptions.checks#bundlertimings for more details.
|
|
@@ -43,6 +43,42 @@ const result = await verifySignature(request, {
|
|
|
43
43
|
// => { type: 'attestation', keyId: string, counter: number }
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
+
### Verifying a supplied device proof
|
|
47
|
+
|
|
48
|
+
Swift's `DeviceRegistration.sign` includes its cached Apple attestation as binary
|
|
49
|
+
`attestation` metadata in the existing `Signature-Input`. The assertion signs that
|
|
50
|
+
metadata along with the request. For public reads, the existing key resolver can
|
|
51
|
+
verify the supplied proof instead of loading a stored key:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { verifyAttestation as verifyAppleAttestation } from '@flickfyi/attestation'
|
|
55
|
+
import { verifyAttestation, verifyIdentity } from '@flickfyi/identity'
|
|
56
|
+
import is from '@sindresorhus/is'
|
|
57
|
+
|
|
58
|
+
const identity = await verifyIdentity(request)
|
|
59
|
+
await verifyAttestation({
|
|
60
|
+
request,
|
|
61
|
+
skipCounterVerification: true,
|
|
62
|
+
getAttestationKey: async (keyId, parameters) => {
|
|
63
|
+
const proof = parameters.attestation
|
|
64
|
+
if (!is.arrayBuffer(proof)) throw new Error('Missing attestation proof')
|
|
65
|
+
const key = await verifyAppleAttestation({
|
|
66
|
+
appId, // Trusted server configuration, never taken from the request.
|
|
67
|
+
attestation: new Uint8Array(proof),
|
|
68
|
+
challenge: new TextEncoder().encode(identity.publicKey),
|
|
69
|
+
expectedKeyId: keyId,
|
|
70
|
+
})
|
|
71
|
+
return { appId, counter: 0, publicKey: key.publicKeyBase58 }
|
|
72
|
+
},
|
|
73
|
+
})
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The proof's challenge is the identity key ID supplied when Swift first attested
|
|
77
|
+
the device. Certificate dates do not expire that proof; Apple chain signatures
|
|
78
|
+
and the request's signed timestamps are still verified. The public-read policy
|
|
79
|
+
uses request freshness without a stored counter. Account authorization remains
|
|
80
|
+
separate; supplying a proof does not grant access to private data.
|
|
81
|
+
|
|
46
82
|
## Headers
|
|
47
83
|
|
|
48
84
|
Signed requests include:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IdentityTokenProof, MintIdentityTokenInput, VerifiedIdentityToken, mintIdentityToken, verifyIdentityToken } from "./cwt.js";
|
|
2
2
|
import { SignIdentityOptions, signIdentity } from "./signing.js";
|
|
3
|
+
import { Parameters } from "@flickfyi/http-message-sig";
|
|
3
4
|
import { Tracer } from "@opentelemetry/api";
|
|
4
5
|
//#region src/offline-sdk-authorization.d.ts
|
|
5
6
|
type OfflineSDKAuthorizationCredential = {
|
|
@@ -91,12 +92,13 @@ type VerifyOptions = {
|
|
|
91
92
|
*/
|
|
92
93
|
acceptableUrls?: string[];
|
|
93
94
|
/**
|
|
94
|
-
*
|
|
95
|
+
* Resolves key data from storage or from a supplied attestation proof.
|
|
95
96
|
* Required for attestation signature verification.
|
|
96
97
|
* @param keyId - The base58-encoded App Attest credential ID
|
|
97
|
-
* @
|
|
98
|
+
* @param parameters - Signature metadata; untrusted until verified
|
|
99
|
+
* @returns Verified key data (including appId), or undefined if not found
|
|
98
100
|
*/
|
|
99
|
-
getAttestationKey?: (keyId: string) => Promise<AttestationKeyData | undefined>;
|
|
101
|
+
getAttestationKey?: (keyId: string, parameters: Parameters) => Promise<AttestationKeyData | undefined>;
|
|
100
102
|
/** Max allowed counter skew (default: 0). Tolerates counter being slightly behind expected. */
|
|
101
103
|
maxCounterSkew?: number;
|
|
102
104
|
/**
|
|
@@ -123,11 +125,12 @@ type VerifyAttestationOptions = {
|
|
|
123
125
|
*/
|
|
124
126
|
acceptableUrls?: string[];
|
|
125
127
|
/**
|
|
126
|
-
*
|
|
128
|
+
* Resolves key data from storage or from a supplied attestation proof.
|
|
127
129
|
* @param keyId - The base58-encoded App Attest credential ID
|
|
128
|
-
* @
|
|
130
|
+
* @param parameters - Signature metadata; untrusted until verified
|
|
131
|
+
* @returns Verified key data (including appId), or undefined if not found
|
|
129
132
|
*/
|
|
130
|
-
getAttestationKey: (keyId: string) => Promise<AttestationKeyData | undefined>;
|
|
133
|
+
getAttestationKey: (keyId: string, parameters: Parameters) => Promise<AttestationKeyData | undefined>;
|
|
131
134
|
/** Max allowed counter skew (default: 0). Tolerates counter being slightly behind expected. */
|
|
132
135
|
maxCounterSkew?: number;
|
|
133
136
|
/** The incoming request to verify */
|
|
@@ -185,7 +185,7 @@ async function verifyAttestation(options) {
|
|
|
185
185
|
...request.headers.has("Content-Digest") ? ["content-digest"] : []
|
|
186
186
|
]);
|
|
187
187
|
const keyId = validateSignatureParameters(parameters);
|
|
188
|
-
const attestationKey = await traceOperation(tracer, "identity.attestation.key.load", () => getAttestationKey(keyId));
|
|
188
|
+
const attestationKey = await traceOperation(tracer, "identity.attestation.key.load", () => getAttestationKey(keyId, parameters));
|
|
189
189
|
if (!attestationKey) throw new Error("Attestation key not found");
|
|
190
190
|
const payload = new TextEncoder().encode(signatureBase);
|
|
191
191
|
return {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Parameters } from '@flickfyi/http-message-sig'
|
|
1
2
|
import type { Tracer } from '@opentelemetry/api'
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -59,12 +60,16 @@ export type VerifyOptions = {
|
|
|
59
60
|
*/
|
|
60
61
|
acceptableUrls?: string[]
|
|
61
62
|
/**
|
|
62
|
-
*
|
|
63
|
+
* Resolves key data from storage or from a supplied attestation proof.
|
|
63
64
|
* Required for attestation signature verification.
|
|
64
65
|
* @param keyId - The base58-encoded App Attest credential ID
|
|
65
|
-
* @
|
|
66
|
+
* @param parameters - Signature metadata; untrusted until verified
|
|
67
|
+
* @returns Verified key data (including appId), or undefined if not found
|
|
66
68
|
*/
|
|
67
|
-
getAttestationKey?: (
|
|
69
|
+
getAttestationKey?: (
|
|
70
|
+
keyId: string,
|
|
71
|
+
parameters: Parameters
|
|
72
|
+
) => Promise<AttestationKeyData | undefined>
|
|
68
73
|
/** Max allowed counter skew (default: 0). Tolerates counter being slightly behind expected. */
|
|
69
74
|
maxCounterSkew?: number
|
|
70
75
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { verifyAssertion } from '@flickfyi/attestation'
|
|
2
|
-
import { verifySignatures } from '@flickfyi/http-message-sig'
|
|
2
|
+
import { type Parameters, verifySignatures } from '@flickfyi/http-message-sig'
|
|
3
3
|
import { traceOperation } from '@flickfyi/rwsdk-extensions/otel'
|
|
4
4
|
import type { Tracer } from '@opentelemetry/api'
|
|
5
5
|
|
|
@@ -15,11 +15,15 @@ export type VerifyAttestationOptions = {
|
|
|
15
15
|
*/
|
|
16
16
|
acceptableUrls?: string[]
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Resolves key data from storage or from a supplied attestation proof.
|
|
19
19
|
* @param keyId - The base58-encoded App Attest credential ID
|
|
20
|
-
* @
|
|
20
|
+
* @param parameters - Signature metadata; untrusted until verified
|
|
21
|
+
* @returns Verified key data (including appId), or undefined if not found
|
|
21
22
|
*/
|
|
22
|
-
getAttestationKey: (
|
|
23
|
+
getAttestationKey: (
|
|
24
|
+
keyId: string,
|
|
25
|
+
parameters: Parameters
|
|
26
|
+
) => Promise<AttestationKeyData | undefined>
|
|
23
27
|
/** Max allowed counter skew (default: 0). Tolerates counter being slightly behind expected. */
|
|
24
28
|
maxCounterSkew?: number
|
|
25
29
|
/** The incoming request to verify */
|
|
@@ -90,11 +94,11 @@ export async function verifyAttestation(
|
|
|
90
94
|
|
|
91
95
|
const keyId = validateSignatureParameters(parameters)
|
|
92
96
|
|
|
93
|
-
//
|
|
97
|
+
// Resolve the attestation key
|
|
94
98
|
const attestationKey = await traceOperation(
|
|
95
99
|
tracer,
|
|
96
100
|
'identity.attestation.key.load',
|
|
97
|
-
() => getAttestationKey(keyId)
|
|
101
|
+
() => getAttestationKey(keyId, parameters)
|
|
98
102
|
)
|
|
99
103
|
if (!attestationKey) {
|
|
100
104
|
throw new Error('Attestation key not found')
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"appId": "TEST.com.example.app",
|
|
3
|
+
"challenge": "MjM2aDdwdWt2cWk2dThBRHU1M2VyYld5TFlYTnlORXVCOUJSTk1YdFZLVWZa",
|
|
4
|
+
"data": "o2NmbXRvYXBwbGUtYXBwYXR0ZXN0Z2F0dFN0bXSiY3g1Y4FZAYYwggGCMIIBKKADAgECAhEA6bJS1B8t2ojGddeL1wZPcTAKBggqhkjOPQQDAjAmMSQwIgYDVQQDExtBcHAgQXR0ZXN0IFRlc3QgQ2VydGlmaWNhdGUwHhcNMDAwMTAxMDAwMDAwWhcNMDEwMTAxMDAwMDAwWjAmMSQwIgYDVQQDExtBcHAgQXR0ZXN0IFRlc3QgQ2VydGlmaWNhdGUwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARrF9Hy4SxCR/i85uVjpEDydwN9gS3rM6D0oTlF2JjClk/jQuL+Gn+bjufrSnwPnhYrzjNXazFezsu2QGg3v1H1ozcwNTAzBgkqhkiG92NkCAIEJjAkoSIEINOCdMSDXws3g7cMLogy2weRCmvs9luC271skT+IICXSMAoGCCqGSM49BAMCA0gAMEUCICzizbVCmoPjlOLHNysQpfegnx+vGdp51uV9Ve1aUC6qAiEA7gvJrloFuQDMlE0hTUgLg+iVAdh4Eejhtf+DFlJSCwlncmVjZWlwdEBoYXV0aERhdGFYpCGoMoaOUNW050OWHh6y1DvvF+yjmpIZ3oGk6nhhJ6gjQAAAAABhcHBhdHRlc3RkZXZlbG9wACBpi+pj3ESjRGY/8UKa6hCELfJ7a5ke8lhmssbALNzFvqUBAgMmIAEhWCBrF9Hy4SxCR/i85uVjpEDydwN9gS3rM6D0oTlF2JjCliJYIE/jQuL+Gn+bjufrSnwPnhYrzjNXazFezsu2QGg3v1H1",
|
|
5
|
+
"identityPrivateKey": "0000000000000000000000000000000000000000000000000000000000000002",
|
|
6
|
+
"keyId": "871YvGnK3pybLyqN9Z4FwbuUd6T2WRXCdAnwBsujPiNh",
|
|
7
|
+
"privateKey": "0000000000000000000000000000000000000000000000000000000000000001",
|
|
8
|
+
"rootCertificate": "-----BEGIN CERTIFICATE-----\nMIIBgjCCASigAwIBAgIRAOmyUtQfLdqIxnXXi9cGT3EwCgYIKoZIzj0EAwIwJjEk\nMCIGA1UEAxMbQXBwIEF0dGVzdCBUZXN0IENlcnRpZmljYXRlMB4XDTAwMDEwMTAw\nMDAwMFoXDTAxMDEwMTAwMDAwMFowJjEkMCIGA1UEAxMbQXBwIEF0dGVzdCBUZXN0\nIENlcnRpZmljYXRlMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaxfR8uEsQkf4\nvOblY6RA8ncDfYEt6zOg9KE5RdiYwpZP40Li/hp/m47n60p8D54WK84zV2sxXs7L\ntkBoN79R9aM3MDUwMwYJKoZIhvdjZAgCBCYwJKEiBCDTgnTEg18LN4O3DC6IMtsH\nkQpr7PZbgtu9bJE/iCAl0jAKBggqhkjOPQQDAgNIADBFAiAs4s21QpqD45Tixzcr\nEKX3oJ8frxnaedblfVXtWlAuqgIhAO4Lya5aBbkAzJRNIU1IC4PolQHYeBHo4bX/\ngxZSUgsJ\n-----END CERTIFICATE-----"
|
|
9
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { verifyAttestation as verifyAppleAttestation } from '@flickfyi/attestation'
|
|
2
|
+
import { signAssertion } from '@flickfyi/attestation/testing'
|
|
3
|
+
import { type Parameters, signatureHeaders } from '@flickfyi/http-message-sig'
|
|
4
|
+
import is from '@sindresorhus/is'
|
|
5
|
+
import { describe, expect, it } from 'vitest'
|
|
6
|
+
|
|
7
|
+
import { verifySignature } from '~/index'
|
|
8
|
+
import { signIdentity } from '~/sign-identity'
|
|
9
|
+
import { verifyAttestation } from '~/verify-attestation'
|
|
10
|
+
import { verifyIdentity } from '~/verify-identity'
|
|
11
|
+
|
|
12
|
+
import fixture from './fixtures/expired-attestation.json'
|
|
13
|
+
|
|
14
|
+
const proof = new Uint8Array(Buffer.from(fixture.data, 'base64')).buffer
|
|
15
|
+
|
|
16
|
+
describe('supplied App Attest proof', () => {
|
|
17
|
+
it('verifies an expired proof and a fresh assertion without stored key data', async () => {
|
|
18
|
+
const request = await signedRequest(proof)
|
|
19
|
+
const options = await verificationOptions(request)
|
|
20
|
+
const expected = { counter: 1, keyId: fixture.keyId, type: 'attestation' }
|
|
21
|
+
|
|
22
|
+
await expect(verifyAttestation({ ...options, request })).resolves.toEqual(expected)
|
|
23
|
+
await expect(verifySignature(request, options)).resolves.toEqual(expected)
|
|
24
|
+
expect([...request.headers.keys()].toSorted()).toEqual([
|
|
25
|
+
'signature',
|
|
26
|
+
'signature-input',
|
|
27
|
+
])
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it.each([undefined, 'not-bytes'])(
|
|
31
|
+
'rejects missing or nonbinary proof metadata: %s',
|
|
32
|
+
async attestation => {
|
|
33
|
+
const request = await signedRequest(attestation)
|
|
34
|
+
await expect(
|
|
35
|
+
verifyAttestation({ ...(await verificationOptions(request)), request })
|
|
36
|
+
).rejects.toThrow('Missing attestation proof')
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
it('rejects malformed proof bytes', async () => {
|
|
41
|
+
const request = await signedRequest(new Uint8Array([0]).buffer)
|
|
42
|
+
await expect(
|
|
43
|
+
verifyAttestation({ ...(await verificationOptions(request)), request })
|
|
44
|
+
).rejects.toThrow('Invalid attestation object')
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
it('rejects changed signature metadata even with a valid attestation proof', async () => {
|
|
48
|
+
const request = await signedRequest(proof)
|
|
49
|
+
request.headers.set(
|
|
50
|
+
'Signature-Input',
|
|
51
|
+
`${request.headers.get('Signature-Input')};extra="changed"`
|
|
52
|
+
)
|
|
53
|
+
await expect(
|
|
54
|
+
verifyAttestation({ ...(await verificationOptions(request)), request })
|
|
55
|
+
).rejects.toThrow('Invalid assertion signature')
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
async function verificationOptions(request: Request) {
|
|
60
|
+
const identity = await verifyIdentity(request)
|
|
61
|
+
return {
|
|
62
|
+
async getAttestationKey(keyId: string, parameters: Parameters) {
|
|
63
|
+
const attestation = parameters.attestation
|
|
64
|
+
if (!is.arrayBuffer(attestation)) {
|
|
65
|
+
throw new Error('Missing attestation proof')
|
|
66
|
+
}
|
|
67
|
+
const key = await verifyAppleAttestation({
|
|
68
|
+
appId: fixture.appId,
|
|
69
|
+
attestation: new Uint8Array(attestation),
|
|
70
|
+
challenge: new TextEncoder().encode(identity.publicKey),
|
|
71
|
+
expectedKeyId: keyId,
|
|
72
|
+
trustedRootCerts: [fixture.rootCertificate],
|
|
73
|
+
})
|
|
74
|
+
return { appId: fixture.appId, counter: 0, publicKey: key.publicKeyBase58 }
|
|
75
|
+
},
|
|
76
|
+
skipCounterVerification: true as const,
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function signedRequest(attestation: Parameters['attestation'] | undefined) {
|
|
81
|
+
const request = await signIdentity(new Request('https://example.com/deployments'), {
|
|
82
|
+
privateKey: Buffer.from(fixture.identityPrivateKey, 'hex'),
|
|
83
|
+
})
|
|
84
|
+
const headers = await signatureHeaders(request, {
|
|
85
|
+
attestation,
|
|
86
|
+
components: ['@method', '@target-uri'],
|
|
87
|
+
expires: new Date(Date.now() + 60_000),
|
|
88
|
+
key: 'sig2',
|
|
89
|
+
signer: {
|
|
90
|
+
keyid: fixture.keyId,
|
|
91
|
+
sign: data =>
|
|
92
|
+
signAssertion({
|
|
93
|
+
appId: fixture.appId,
|
|
94
|
+
counter: 1,
|
|
95
|
+
payload: new TextEncoder().encode(data),
|
|
96
|
+
privateKey: Buffer.from(fixture.privateKey, 'hex'),
|
|
97
|
+
}),
|
|
98
|
+
},
|
|
99
|
+
tag: 'app-attest',
|
|
100
|
+
})
|
|
101
|
+
request.headers.append('Signature', headers.Signature)
|
|
102
|
+
request.headers.append('Signature-Input', headers['Signature-Input'])
|
|
103
|
+
return request
|
|
104
|
+
}
|
|
@@ -9,12 +9,12 @@ dist/bundle-plugin.js 2.52 kB │ gzip: 1.11 kB
|
|
|
9
9
|
dist/index.d.ts 6.08 kB │ gzip: 2.00 kB
|
|
10
10
|
dist/index.js 28.55 kB │ gzip: 7.81 kB
|
|
11
11
|
|
|
12
|
-
[32m✓ built in 4.
|
|
13
|
-
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for 4.
|
|
12
|
+
[32m✓ built in 4.52s[39m
|
|
13
|
+
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for 4.4s of this 4.5s build (98%).
|
|
14
14
|
The slowest callbacks, timed inside each callback (the wait before a callback starts is excluded, the time it awaits is included):
|
|
15
|
-
- plugin rolldown-plugin-dts:generate load (
|
|
15
|
+
- plugin rolldown-plugin-dts:generate load (96%, 4.3s, 2 calls)
|
|
16
16
|
Additional callback time came from callbacks under 1s.
|
|
17
17
|
See https://rolldown.rs/reference/InputOptions.checks#bundlertimings for more details.
|
|
18
18
|
[39m
|
|
19
|
-
◇ injected env (0) from .env // tip:
|
|
19
|
+
◇ injected env (0) from .env // tip: ⌁ auth for agents [www.vestauth.com]
|
|
20
20
|
Publishing @flickfyi/lens@0.0.6...
|
|
@@ -5,7 +5,7 @@ transforming...
|
|
|
5
5
|
rendering chunks...
|
|
6
6
|
[32m
|
|
7
7
|
[36m[unplugin:dts][32m Start generate declaration files...[39m
|
|
8
|
-
[32m[36m[unplugin:dts][32m Declaration files built in
|
|
8
|
+
[32m[36m[unplugin:dts][32m Declaration files built in 3293ms.
|
|
9
9
|
[39m
|
|
10
10
|
computing gzip size...
|
|
11
11
|
dist/version.js 0.08 kB │ gzip: 0.09 kB
|
|
@@ -22,12 +22,12 @@ dist/jsx-runtime.cjs 0.51 kB │ gzip: 0.30 kB
|
|
|
22
22
|
dist/schemas.cjs 1.35 kB │ gzip: 0.47 kB
|
|
23
23
|
dist/index.cjs 2.39 kB │ gzip: 0.80 kB
|
|
24
24
|
|
|
25
|
-
[32m✓ built in 3.
|
|
26
|
-
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for 3.
|
|
25
|
+
[32m✓ built in 3.55s[39m
|
|
26
|
+
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for 3.4s of this 3.5s build (98%).
|
|
27
27
|
The slowest callbacks, timed inside each callback (the wait before a callback starts is excluded, the time it awaits is included):
|
|
28
|
-
- plugin unplugin-dts buildStart (
|
|
28
|
+
- plugin unplugin-dts buildStart (87%, 3.0s, 2 calls)
|
|
29
29
|
Additional callback time came from callbacks under 1s.
|
|
30
30
|
See https://rolldown.rs/reference/InputOptions.checks#bundlertimings for more details.
|
|
31
31
|
[39m
|
|
32
|
-
◇ injected env (2) from .env // tip: ⌘
|
|
32
|
+
◇ injected env (2) from .env // tip: ⌘ suppress logs { quiet: true }
|
|
33
33
|
Publishing @flickfyi/photon@0.0.35...
|
|
@@ -5,7 +5,7 @@ transforming...
|
|
|
5
5
|
rendering chunks...
|
|
6
6
|
[32m
|
|
7
7
|
[36m[unplugin:dts][32m Start generate declaration files...[39m
|
|
8
|
-
[32m[36m[unplugin:dts][32m Declaration files built in
|
|
8
|
+
[32m[36m[unplugin:dts][32m Declaration files built in 10405ms.
|
|
9
9
|
[39m
|
|
10
10
|
computing gzip size...
|
|
11
11
|
dist/otel-worker.js 0.56 kB │ gzip: 0.36 kB
|
|
@@ -16,10 +16,10 @@ dist/otel.js 4.44 kB │ gzip: 1.45 kB
|
|
|
16
16
|
dist/rpc-client.js 6.34 kB │ gzip: 2.44 kB
|
|
17
17
|
dist/lifecycles.js 6.35 kB │ gzip: 2.27 kB
|
|
18
18
|
|
|
19
|
-
[32m✓ built in
|
|
20
|
-
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for
|
|
19
|
+
[32m✓ built in 10.72s[39m
|
|
20
|
+
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for 10.5s of this 10.7s build (98%).
|
|
21
21
|
The slowest callbacks, timed inside each callback (the wait before a callback starts is excluded, the time it awaits is included):
|
|
22
|
-
- plugin unplugin-dts buildStart (
|
|
22
|
+
- plugin unplugin-dts buildStart (94%, 10.0s, 1 call)
|
|
23
23
|
Additional callback time came from callbacks under 1s.
|
|
24
24
|
See https://rolldown.rs/reference/InputOptions.checks#bundlertimings for more details.
|
|
25
25
|
[39m
|