@opentdf/ctl 0.20.0-beta.202 → 0.20.0-beta.203
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/src/cli.js +58 -6
- package/dist/src/cli.js.map +1 -1
- package/package.json +2 -2
package/dist/src/cli.js
CHANGED
|
@@ -14,6 +14,10 @@ class InvalidAuthProvider {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
const containerTypes = ['tdf3', 'ztdf'];
|
|
17
|
+
/** Accepted values for the two integrity-algorithm flags, lowercase by convention. */
|
|
18
|
+
const integrityAlgorithms = ['hs256', 'gmac'];
|
|
19
|
+
/** Flag values are case-insensitive; normalize before yargs checks `choices`. */
|
|
20
|
+
const lowercaseIntegrityAlgorithm = (v) => typeof v === 'string' ? v.toLowerCase() : v;
|
|
17
21
|
const parseJwt = (jwt, field = 1) => {
|
|
18
22
|
return JSON.parse(base64.decode(jwt.split('.')[field]));
|
|
19
23
|
};
|
|
@@ -202,11 +206,8 @@ async function parseCreateOptions(argv) {
|
|
|
202
206
|
c.autoconfigure = !!argv.autoconfigure;
|
|
203
207
|
return c;
|
|
204
208
|
}
|
|
205
|
-
|
|
206
|
-
const c =
|
|
207
|
-
if (argv.assertions?.length) {
|
|
208
|
-
c.assertionConfigs = await parseAssertionConfig(argv.assertions);
|
|
209
|
-
}
|
|
209
|
+
function parseCreateTDFFlags(argv) {
|
|
210
|
+
const c = {};
|
|
210
211
|
if (argv.encapKeyType?.length) {
|
|
211
212
|
if (!isPublicKeyAlgorithm(argv.encapKeyType)) {
|
|
212
213
|
throw new CLIError('CRITICAL', `Unsupported rewrap key algorithm: [${argv.encapKeyType}]`);
|
|
@@ -224,6 +225,29 @@ async function parseCreateTDFOptions(argv) {
|
|
|
224
225
|
if (argv.tdfSpecVersion) {
|
|
225
226
|
c.tdfSpecVersion = argv.tdfSpecVersion;
|
|
226
227
|
}
|
|
228
|
+
if (argv.rootIntegrityAlgorithm?.length) {
|
|
229
|
+
// Only HMAC is supported for the root integrity algorithm.
|
|
230
|
+
if (argv.rootIntegrityAlgorithm.toLowerCase() !== 'hs256') {
|
|
231
|
+
throw new CLIError('CRITICAL', `unsupported root integrity algorithm: [${argv.rootIntegrityAlgorithm}]; only [hs256] is supported`);
|
|
232
|
+
}
|
|
233
|
+
c.rootIntegrityAlgorithm = 'HS256';
|
|
234
|
+
}
|
|
235
|
+
if (argv.segmentIntegrityAlgorithm?.length) {
|
|
236
|
+
const segmentAlg = argv.segmentIntegrityAlgorithm.toUpperCase();
|
|
237
|
+
if (segmentAlg !== 'GMAC' && segmentAlg !== 'HS256') {
|
|
238
|
+
throw new CLIError('CRITICAL', `unsupported segment integrity algorithm: [${argv.segmentIntegrityAlgorithm}]`);
|
|
239
|
+
}
|
|
240
|
+
c.segmentIntegrityAlgorithm = segmentAlg;
|
|
241
|
+
}
|
|
242
|
+
return c;
|
|
243
|
+
}
|
|
244
|
+
async function parseCreateTDFOptions(argv, flags = parseCreateTDFFlags(argv)) {
|
|
245
|
+
const c = { ...(await parseCreateOptions(argv)), ...flags };
|
|
246
|
+
if (argv.assertions?.length) {
|
|
247
|
+
// Reads from disk (parseAssertionConfig falls back to openAsBlob), so it
|
|
248
|
+
// stays here rather than in the pure pass.
|
|
249
|
+
c.assertionConfigs = await parseAssertionConfig(argv.assertions);
|
|
250
|
+
}
|
|
227
251
|
log('DEBUG', `CreateTDFOptions: ${JSON.stringify(c)}`);
|
|
228
252
|
return c;
|
|
229
253
|
}
|
|
@@ -399,6 +423,24 @@ export const handleArgs = (args) => {
|
|
|
399
423
|
type: 'string',
|
|
400
424
|
default: '',
|
|
401
425
|
},
|
|
426
|
+
rootIntegrityAlgorithm: {
|
|
427
|
+
alias: 'root-integrity-algorithm',
|
|
428
|
+
group: 'Encrypt Options:',
|
|
429
|
+
desc: 'Algorithm for the root signature. Only hs256 is supported; gmac is rejected',
|
|
430
|
+
type: 'string',
|
|
431
|
+
choices: integrityAlgorithms,
|
|
432
|
+
coerce: lowercaseIntegrityAlgorithm,
|
|
433
|
+
default: 'hs256',
|
|
434
|
+
},
|
|
435
|
+
segmentIntegrityAlgorithm: {
|
|
436
|
+
alias: 'segment-integrity-algorithm',
|
|
437
|
+
group: 'Encrypt Options:',
|
|
438
|
+
desc: 'Algorithm for per-segment integrity',
|
|
439
|
+
type: 'string',
|
|
440
|
+
choices: integrityAlgorithms,
|
|
441
|
+
coerce: lowercaseIntegrityAlgorithm,
|
|
442
|
+
default: 'gmac',
|
|
443
|
+
},
|
|
402
444
|
rewrapKeyType: {
|
|
403
445
|
alias: 'rewrap-encapsulation-algorithm',
|
|
404
446
|
group: 'Decrypt Options:',
|
|
@@ -536,6 +578,16 @@ export const handleArgs = (args) => {
|
|
|
536
578
|
});
|
|
537
579
|
}, async (argv) => {
|
|
538
580
|
log('DEBUG', 'Running encrypt command');
|
|
581
|
+
// Order is deliberate and covered by bin/opentdf.bats:
|
|
582
|
+
// 1. pure flag checks -- no I/O, so a typo fails instantly
|
|
583
|
+
// 2. oidcEndpoint, mirroring `decrypt`
|
|
584
|
+
// 3. open the input file and any assertion files
|
|
585
|
+
// 4. the auth provider, which may reach the IdP
|
|
586
|
+
const createFlags = parseCreateTDFFlags(argv);
|
|
587
|
+
if (!argv.oidcEndpoint) {
|
|
588
|
+
throw new CLIError('CRITICAL', 'oidcEndpoint must be specified');
|
|
589
|
+
}
|
|
590
|
+
const createOptions = await parseCreateTDFOptions(argv, createFlags);
|
|
539
591
|
const authProvider = await processAuth(argv);
|
|
540
592
|
log('DEBUG', `Initialized auth provider ${JSON.stringify(authProvider)}`);
|
|
541
593
|
const guessedPolicyEndpoint = guessPolicyUrl(argv);
|
|
@@ -551,7 +603,7 @@ export const handleArgs = (args) => {
|
|
|
551
603
|
try {
|
|
552
604
|
log('SILLY', `Initialized client`);
|
|
553
605
|
log('DEBUG', `TDF Create`);
|
|
554
|
-
const ct = await client.createTDF(
|
|
606
|
+
const ct = await client.createTDF(createOptions);
|
|
555
607
|
if (!ct) {
|
|
556
608
|
throw new CLIError('CRITICAL', 'Encrypt configuration error: No output?');
|
|
557
609
|
}
|
package/dist/src/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAOL,aAAa,EACb,OAAO,EACP,cAAc,EACd,OAAO,EAEP,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAS,GAAG,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAgBhD,MAAM,mBAAmB;IACvB,KAAK,CAAC,qBAAqB,KAAmB,CAAC;IAC/C,SAAS;QACP,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF;AAED,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAExC,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAE;IACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC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AAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import { createWriteStream, openAsBlob } from 'node:fs';\nimport { stat } from 'node:fs/promises';\nimport { Writable } from 'node:stream';\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport {\n type AuthProvider,\n type CreateOptions,\n type CreateTDFOptions,\n type HttpRequest,\n type ReadOptions,\n type Source,\n AuthProviders,\n version,\n tdfSpecVersion,\n OpenTDF,\n DecoratedStream,\n isPublicKeyAlgorithm,\n PUBLIC_KEY_ALGORITHMS,\n} from '@opentdf/sdk';\nimport { CLIError, Level, log } from './logger.js';\nimport * as assertions from '@opentdf/sdk/assertions';\nimport { base64 } from '@opentdf/sdk/encodings';\nimport { type KeyPair } from '@opentdf/sdk/singlecontainer';\n\ntype AuthToProcess = {\n auth?: string;\n clientId?: string;\n clientSecret?: string;\n concurrencyLimit?: number;\n oidcEndpoint?: string;\n userId?: string;\n};\n\ntype LoggedAuthProvider = AuthProvider & {\n requestLog: HttpRequest[];\n};\n\nclass InvalidAuthProvider {\n async updateClientPublicKey(): Promise<void> {}\n withCreds(): Promise<HttpRequest> {\n throw new Error('Method not implemented.');\n }\n}\n\nconst containerTypes = ['tdf3', 'ztdf'];\n\nconst parseJwt = (jwt: string, field = 1) => {\n return JSON.parse(base64.decode(jwt.split('.')[field]));\n};\n\nconst parseJwtComplete = (jwt: string) => {\n return { header: parseJwt(jwt, 0), payload: parseJwt(jwt) };\n};\n\nasync function processAuth({\n auth,\n clientId,\n clientSecret,\n concurrencyLimit,\n oidcEndpoint,\n userId,\n}: AuthToProcess): Promise<LoggedAuthProvider> {\n log('DEBUG', 'Processing auth params');\n if (!oidcEndpoint) {\n throw new CLIError('CRITICAL', 'oidcEndpoint must be specified');\n }\n if (auth) {\n log('DEBUG', 'Processing an auth string');\n const authParts = auth.split(':');\n if (authParts.length !== 2) {\n throw new CLIError('CRITICAL', `Auth expects <clientId>:<clientSecret>, received ${auth}`);\n }\n\n [clientId, clientSecret] = authParts;\n } else if (!clientId || !clientSecret) {\n throw new CLIError(\n 'CRITICAL',\n 'Auth expects clientId and clientSecret, or combined auth param'\n );\n }\n const actual = await AuthProviders.clientSecretAuthProvider({\n clientId,\n oidcOrigin: oidcEndpoint,\n exchange: 'client',\n clientSecret,\n });\n if (concurrencyLimit !== 1) {\n await actual.oidcAuth.get();\n }\n const requestLog: AuthProviders.HttpRequest[] = [];\n return {\n requestLog,\n updateClientPublicKey: async (signingKey: KeyPair) => {\n actual.updateClientPublicKey(signingKey);\n log('DEBUG', `updateClientPublicKey: [${signingKey?.publicKey}]`);\n },\n withCreds: async (httpReq: AuthProviders.HttpRequest) => {\n const credible = await actual.withCreds(httpReq);\n if (userId) {\n const url = new URL(credible.url);\n url.searchParams.set('userId', userId);\n credible.url = url.href;\n }\n log('DEBUG', `HTTP Requesting: ${JSON.stringify(credible)}`);\n requestLog.push(credible);\n return credible;\n },\n };\n}\n\nconst rstrip = (str: string, suffix = ' '): string => {\n while (str && suffix && str.endsWith(suffix)) {\n str = str.slice(0, -suffix.length);\n }\n return str;\n};\n\nasync function parseAssertionVerificationKeys(\n s: string\n): Promise<assertions.AssertionVerificationKeys> {\n let u: assertions.AssertionVerificationKeys;\n try {\n u = JSON.parse(s);\n } catch (err) {\n // try as file name:\n try {\n const jsonFile = await openAsBlob(s);\n u = JSON.parse(await jsonFile.text());\n } catch (err2) {\n throw new CLIError(\n 'CRITICAL',\n `Failed to open/parse assertion verification keys as string or file path ${err.message}`,\n err2\n );\n }\n }\n if (typeof u !== 'object' || u === null) {\n throw new Error('Invalid input: The input must be an object');\n }\n // handle both cases of \"keys\"\n if (!('Keys' in u && typeof u.Keys === 'object')) {\n if ('keys' in u && typeof u.keys === 'object') {\n u.Keys = u.keys as Record<string, assertions.AssertionKey>;\n } else {\n throw new CLIError(\n 'CRITICAL',\n 'Invalid input: invalid structure of assertionVerificationKeys'\n );\n }\n }\n for (const assertionName in u.Keys) {\n const assertionKey: assertions.AssertionKey = u.Keys[assertionName];\n // Ensure each entry has the required 'key' and 'alg' fields\n if (typeof assertionKey !== 'object' || assertionKey === null) {\n throw new CLIError('CRITICAL', `Invalid assertion for ${assertionName}: Must be an object`);\n }\n\n if (typeof assertionKey.alg !== 'string') {\n throw new CLIError(\n 'CRITICAL',\n `Invalid assertion for ${assertionName}: Missing or invalid 'key' or 'alg'`\n );\n }\n try {\n u.Keys[assertionName].key = await correctAssertionKeys(assertionKey);\n } catch (err) {\n throw new CLIError('CRITICAL', `Issue converting assertion key from string: ${err.message}`);\n }\n }\n return u;\n}\n\nasync function parseReadOptions(argv: Partial<mainArgs>): Promise<ReadOptions> {\n const r: ReadOptions = { source: await fileAsSource(argv.file as string) };\n if (argv.noVerifyAssertions) {\n r.noVerify = true;\n }\n if (argv.assertionVerificationKeys) {\n r.assertionVerificationKeys = await parseAssertionVerificationKeys(\n argv.assertionVerificationKeys\n );\n }\n if (argv.rewrapKeyType?.length) {\n if (!isPublicKeyAlgorithm(argv.rewrapKeyType)) {\n throw new CLIError('CRITICAL', `Unsupported rewrap key algorithm: [${argv.rewrapKeyType}]`);\n }\n r.wrappingKeyAlgorithm = argv.rewrapKeyType;\n }\n if (argv.concurrencyLimit) {\n r.concurrencyLimit = argv.concurrencyLimit;\n } else {\n r.concurrencyLimit = 100;\n }\n return r;\n}\n\nasync function correctAssertionKeys({\n alg,\n key,\n}: assertions.AssertionKey): Promise<string | Uint8Array> {\n if (alg === 'HS256') {\n // Convert key string to Uint8Array\n if (typeof key !== 'string') {\n throw new CLIError('CRITICAL', 'HS256 key must be a string');\n }\n return new TextEncoder().encode(key); // Update array element directly\n } else if (alg === 'RS256') {\n // Convert PEM string to a KeyLike object\n if (typeof key !== 'string') {\n throw new CLIError('CRITICAL', 'RS256 key must be a PEM string');\n }\n return key;\n }\n // Otherwise its an unsupported alg\n throw new CLIError('CRITICAL', `Unsupported signing key algorithm: ${alg}`); // Handle unsupported algs\n}\n\nasync function parseAssertionConfig(s: string): Promise<assertions.AssertionConfig[]> {\n let u;\n try {\n u = JSON.parse(s);\n } catch (err) {\n // try as file name:\n try {\n const jsonFile = await openAsBlob(s);\n u = JSON.parse(await jsonFile.text());\n } catch (err2) {\n throw new CLIError(\n 'CRITICAL',\n `Failed to open/parse assertions as string or file path ${err.message} [${err2}]`,\n err\n );\n }\n }\n\n // if u is null or empty, return an empty array\n if (!u) {\n return [];\n }\n const a = Array.isArray(u) ? u : [u];\n for (const assertion of a) {\n if (!assertions.isAssertionConfig(assertion)) {\n throw new CLIError('CRITICAL', `invalid assertion config ${JSON.stringify(assertion)}`);\n }\n if (!assertion.signingKey) {\n continue;\n }\n try {\n assertion.signingKey.key = await correctAssertionKeys(assertion.signingKey);\n } catch (err) {\n throw new CLIError(\n 'CRITICAL',\n `Issue converting assertion key from string: ${err.message}`,\n err\n );\n }\n }\n return a;\n}\n\nasync function parseCreateOptions(argv: Partial<mainArgs>): Promise<CreateOptions> {\n const c: CreateOptions = {\n source: await fileAsSource(argv.file as string),\n };\n if (argv.attributes?.length) {\n c.attributes = argv.attributes.split(',');\n }\n c.autoconfigure = !!argv.autoconfigure;\n return c;\n}\n\nasync function parseCreateTDFOptions(argv: Partial<mainArgs>): Promise<CreateTDFOptions> {\n const c: CreateTDFOptions = await parseCreateOptions(argv);\n if (argv.assertions?.length) {\n c.assertionConfigs = await parseAssertionConfig(argv.assertions);\n }\n if (argv.encapKeyType?.length) {\n if (!isPublicKeyAlgorithm(argv.encapKeyType)) {\n throw new CLIError('CRITICAL', `Unsupported rewrap key algorithm: [${argv.encapKeyType}]`);\n }\n c.wrappingKeyAlgorithm = argv.encapKeyType;\n }\n if (argv.mimeType?.length) {\n if (argv.mimeType && /^[a-z]+\\/[a-z0-9-+.]+$/.test(argv.mimeType)) {\n c.mimeType = argv.mimeType as `${string}/${string}`;\n } else {\n throw new CLIError('CRITICAL', 'Invalid mimeType format');\n }\n }\n if (argv.tdfSpecVersion) {\n c.tdfSpecVersion = argv.tdfSpecVersion as never;\n }\n log('DEBUG', `CreateTDFOptions: ${JSON.stringify(c)}`);\n return c;\n}\n\nasync function fileAsSource(file: string): Promise<Source> {\n if (!file) {\n throw new CLIError('CRITICAL', 'Must specify file or pipe');\n }\n try {\n const stats = await stat(file);\n if (!stats?.isFile()) {\n throw new CLIError('CRITICAL', `File does not exist [${file}]`);\n }\n } catch (e) {\n throw new CLIError('CRITICAL', `File is not accessable [${file}]`, e);\n }\n log('DEBUG', `Using input from file [${file}]`);\n return { type: 'file-browser', location: await openAsBlob(file) };\n}\n\nexport const handleArgs = (args: string[]) => {\n return (\n yargs(args)\n .middleware((argv) => {\n if (argv.silent) {\n log.level = 'CRITICAL';\n } else if (argv.logLevel) {\n const ll = argv.logLevel as string;\n log.level = ll.toUpperCase() as Level;\n }\n })\n .fail((msg, err, yargs) => {\n if (err instanceof CLIError) {\n log(err);\n process.exit(1);\n } else if (err) {\n log(err);\n process.exit(2);\n } else {\n console.error(`${msg}\\n\\n${yargs.help()}`);\n process.exit(1);\n }\n })\n\n // AUTH OPTIONS\n .option('kasEndpoint', {\n group: 'Server Endpoints:',\n type: 'string',\n description: 'URL to non-default KAS instance (https://mykas.net)',\n })\n .option('platformUrl', {\n group: 'Server Endpoints:',\n type: 'string',\n description: 'Location of policy service and KAS (https://opentdf.demo)',\n })\n .option('oidcEndpoint', {\n group: 'Server Endpoints:',\n type: 'string',\n description: 'URL to non-default OIDC IdP (https://myidp.net)',\n })\n .option('policyEndpoint', {\n group: 'Server Endpoints:',\n type: 'string',\n description: 'Attribute and key grant service endpoint',\n })\n .option('allowList', {\n group: 'Security:',\n desc: 'allowed KAS origins, comma separated; defaults to the list from \"/key-access-servers\" endpoint',\n type: 'string',\n validate: (uris: string) => uris.split(','),\n })\n .option('ignoreAllowList', {\n group: 'Security:',\n desc: 'disable KAS allowlist feature for decrypt',\n type: 'boolean',\n })\n .option('noVerifyAssertions', {\n alias: 'no-verify-assertions',\n group: 'Decrypt',\n desc: 'Do not verify assertions',\n type: 'boolean',\n })\n .option('assertionVerificationKeys', {\n alias: 'with-assertion-verification-keys',\n group: 'Decrypt',\n desc: 'keys for assertion verification or path to a json file containing keys for assertion verification',\n type: 'string',\n default: '',\n validate: parseAssertionVerificationKeys,\n })\n .option('concurrencyLimit', {\n alias: 'concurrency-limit',\n group: 'Decrypt',\n desc: 'Enable concurrent key split and share lookups',\n type: 'number',\n })\n .option('auth', {\n group: 'OAuth and OIDC:',\n type: 'string',\n description: 'Combined OAuth Client Credentials (<clientId>:<clientSecret>)',\n })\n .option('dpop', {\n group: 'Security:',\n desc: 'Use DPoP for token binding',\n type: 'boolean',\n })\n .implies('auth', '--no-clientId')\n .implies('auth', '--no-clientSecret')\n\n .option('clientId', {\n group: 'OAuth and OIDC:',\n alias: 'cid',\n type: 'string',\n description: 'OAuth Client Credentials: IdP-issued Client ID',\n })\n .implies('clientId', 'clientSecret')\n\n .option('clientSecret', {\n group: 'OAuth and OIDC:',\n alias: 'cs',\n type: 'string',\n description: 'OAuth Client Credentials: IdP-issued Client Secret',\n })\n .implies('clientSecret', 'clientId')\n\n .option('exchangeToken', {\n group: 'OAuth and OIDC:',\n alias: 'et',\n type: 'string',\n description: 'OAuth Token Exchange: Token issued by trusted external IdP',\n })\n .implies('exchangeToken', 'clientId')\n\n // Examples\n .example('$0 --auth ClientID123:Cli3nt$ecret', '# OIDC client credentials')\n\n .example('$0 --clientId ClientID123 --clientSecret Cli3nt$ecret', '# OIDC client credentials')\n\n // Policy, encryption, and container options\n .options({\n assertions: {\n group: 'Encrypt Options:',\n desc: 'ZTDF assertion config objects or path to a json file containing ZTDF assertion config objects',\n type: 'string',\n default: '',\n validate: parseAssertionConfig,\n },\n attributes: {\n group: 'Encrypt Options:',\n desc: 'Data attributes for the policy',\n type: 'string',\n default: '',\n validate: (attributes: string) => attributes.split(','),\n },\n autoconfigure: {\n group: 'Encrypt Options:',\n desc: 'Enable automatic configuration from attributes using policy service',\n type: 'boolean',\n default: false,\n },\n containerType: {\n group: 'Encrypt Options:',\n alias: 't',\n choices: containerTypes,\n description: 'Container format',\n default: 'ztdf',\n },\n encapKeyType: {\n alias: 'encapsulation-algorithm',\n group: 'Encrypt Options:',\n desc: 'Key type for wrapping keys',\n type: 'string',\n choices: PUBLIC_KEY_ALGORITHMS,\n default: 'rsa:2048',\n },\n mimeType: {\n group: 'Encrypt Options:',\n desc: 'Mime type for the plain text file',\n type: 'string',\n default: '',\n },\n rewrapKeyType: {\n alias: 'rewrap-encapsulation-algorithm',\n group: 'Decrypt Options:',\n desc: 'Key type for rewrap',\n type: 'string',\n choices: PUBLIC_KEY_ALGORITHMS,\n default: 'rsa:2048',\n },\n userId: {\n group: 'Encrypt Options:',\n type: 'string',\n description: 'Owner email address',\n },\n tdfSpecVersion: {\n group: 'Encrypt Options:',\n type: 'string',\n description: 'TDF spec version for file creation',\n default: tdfSpecVersion,\n },\n })\n\n .options({\n logLevel: {\n group: 'Verbosity:',\n alias: 'log-level',\n type: 'string',\n default: 'info',\n desc: 'Set logging level',\n },\n silent: {\n group: 'Verbosity:',\n type: 'boolean',\n default: false,\n desc: 'Disable logging',\n },\n })\n .option('output', {\n type: 'string',\n description: 'output file',\n })\n\n .command(\n 'inspect [file]',\n 'Inspect TDF and extract header information, without decrypting',\n (yargs) => {\n yargs.strict().positional('file', {\n describe: 'path to encrypted file',\n type: 'string',\n });\n },\n async (argv) => {\n log('DEBUG', 'Running inspect command');\n const ct = new OpenTDF({\n platformUrl: argv.platformUrl || guessPolicyUrl(argv),\n authProvider: new InvalidAuthProvider(),\n });\n try {\n const reader = ct.open(await parseReadOptions(argv));\n const manifest = await reader.manifest();\n try {\n const dataAttributes = await reader.attributes();\n console.log(JSON.stringify({ manifest, dataAttributes }, null, 2));\n } catch (err) {\n console.error(err);\n console.log(JSON.stringify({ manifest }, null, 2));\n }\n } finally {\n ct.close();\n }\n }\n )\n\n .command(\n 'decrypt [file]',\n 'Decrypt TDF to string',\n (yargs) => {\n yargs.strict().positional('file', {\n describe: 'path to plain text file',\n type: 'string',\n });\n },\n async (argv) => {\n log('DEBUG', 'Running decrypt command');\n const allowedKases = argv.allowList?.split(',');\n log('DEBUG', `Allowed KASes: ${allowedKases}`);\n const ignoreAllowList = !!argv.ignoreAllowList;\n if (!argv.oidcEndpoint) {\n throw new CLIError('CRITICAL', 'oidcEndpoint must be specified');\n }\n const authProvider = await processAuth(argv);\n log('DEBUG', `Initialized auth provider ${JSON.stringify(authProvider)}`);\n const guessedPolicyEndpoint = guessPolicyUrl(argv);\n const client = new OpenTDF({\n authProvider,\n defaultCreateOptions: {\n defaultKASEndpoint: argv.kasEndpoint,\n },\n defaultReadOptions: {\n allowedKASEndpoints: allowedKases,\n ignoreAllowlist: ignoreAllowList,\n noVerify: !!argv.noVerifyAssertions,\n },\n disableDPoP: !argv.dpop,\n policyEndpoint: guessedPolicyEndpoint,\n platformUrl: argv.platformUrl || guessedPolicyEndpoint,\n });\n try {\n log('SILLY', `Initialized client`);\n log('DEBUG', `About to TDF3 decrypt [${argv.file}]`);\n const ct = await client.read(await parseReadOptions(argv));\n const destination = argv.output ? createWriteStream(argv.output) : process.stdout;\n await ct.pipeTo(Writable.toWeb(destination));\n\n const lastRequest = authProvider.requestLog[authProvider.requestLog.length - 1];\n log('SILLY', `last request is ${JSON.stringify(lastRequest)}`);\n let accessToken = null;\n let dpopToken = null;\n for (const h of Object.keys(lastRequest.headers)) {\n switch (h.toLowerCase()) {\n case 'dpop':\n console.assert(!dpopToken, 'Multiple dpop headers found');\n dpopToken = parseJwtComplete(lastRequest.headers[h]);\n log('INFO', `dpop: ${JSON.stringify(dpopToken)}`);\n break;\n case 'authorization':\n console.assert(!accessToken, 'Multiple authorization headers found');\n accessToken = parseJwt(lastRequest.headers[h].split(' ')[1]);\n log('INFO', `Access Token: ${JSON.stringify(accessToken)}`);\n if (argv.dpop) {\n console.assert(accessToken.cnf?.jkt, 'Access token must have a cnf.jkt');\n }\n break;\n }\n }\n console.assert(accessToken, 'No access_token found');\n console.assert(!argv.dpop || dpopToken, 'DPoP requested but absent');\n } finally {\n client.close();\n }\n }\n )\n .command(\n 'encrypt [file]',\n 'Encrypt file or pipe to a TDF',\n (yargs) => {\n yargs.strict().positional('file', {\n describe: 'path to plain text file',\n type: 'string',\n });\n },\n async (argv) => {\n log('DEBUG', 'Running encrypt command');\n const authProvider = await processAuth(argv);\n log('DEBUG', `Initialized auth provider ${JSON.stringify(authProvider)}`);\n const guessedPolicyEndpoint = guessPolicyUrl(argv);\n\n const client = new OpenTDF({\n authProvider,\n defaultCreateOptions: {\n defaultKASEndpoint: argv.kasEndpoint,\n },\n disableDPoP: !argv.dpop,\n policyEndpoint: guessedPolicyEndpoint,\n platformUrl: argv.platformUrl || guessedPolicyEndpoint,\n });\n try {\n log('SILLY', `Initialized client`);\n log('DEBUG', `TDF Create`);\n const ct: DecoratedStream = await client.createTDF(await parseCreateTDFOptions(argv));\n if (!ct) {\n throw new CLIError('CRITICAL', 'Encrypt configuration error: No output?');\n }\n const destination = argv.output ? createWriteStream(argv.output) : process.stdout;\n await ct.pipeTo(Writable.toWeb(destination));\n } finally {\n client.close();\n }\n }\n )\n .usage('openTDF CLI\\n\\nUsage: $0 [options]')\n .alias('help', 'h')\n .demandCommand()\n .recommendCommands()\n .help('help')\n .options({\n env: {\n desc: 'Set the environment',\n },\n })\n\n .version(\n 'version',\n JSON.stringify({\n '@opentdf/sdk': version,\n tdfSpecVersion,\n })\n )\n .alias('version', 'V')\n .strict()\n .parseAsync()\n );\n};\n\nexport type mainArgs = Awaited<ReturnType<typeof handleArgs>>;\nexport const main = async (argsPromise: mainArgs) => {\n return argsPromise;\n};\n\nhandleArgs(hideBin(process.argv))\n .then(main)\n .then(() => {\n // Nothing;\n })\n .catch((err) => {\n console.error(err);\n });\n\nfunction guessPolicyUrl({\n kasEndpoint,\n policyEndpoint,\n}: {\n kasEndpoint?: string;\n policyEndpoint?: string;\n}): string | undefined {\n if (policyEndpoint) {\n return rstrip(policyEndpoint, '/');\n }\n if (kasEndpoint) {\n const uNoSlash = rstrip(kasEndpoint, '/');\n return uNoSlash.endsWith('/kas') ? uNoSlash.slice(0, -4) : uNoSlash;\n }\n return undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAOL,aAAa,EACb,OAAO,EACP,cAAc,EACd,OAAO,EAEP,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAS,GAAG,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAgBhD,MAAM,mBAAmB;IACvB,KAAK,CAAC,qBAAqB,KAAmB,CAAC;IAC/C,SAAS;QACP,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF;AAED,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAExC,sFAAsF;AACtF,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;AAEvD,iFAAiF;AACjF,MAAM,2BAA2B,GAAG,CAAC,CAAU,EAAE,EAAE,CACjD,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAE,CAAY,CAAC;AAE1D,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC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EAAE;IACT,WAAW;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC,CAAC,CAAC;AAEL,SAAS,cAAc,CAAC,EACtB,WAAW,EACX,cAAc,GAIf;IACC,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,MAAM,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACrC,CAAC;IACD,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QAC1C,OAAO,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IACtE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import { createWriteStream, openAsBlob } from 'node:fs';\nimport { stat } from 'node:fs/promises';\nimport { Writable } from 'node:stream';\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport {\n type AuthProvider,\n type CreateOptions,\n type CreateTDFOptions,\n type HttpRequest,\n type ReadOptions,\n type Source,\n AuthProviders,\n version,\n tdfSpecVersion,\n OpenTDF,\n DecoratedStream,\n isPublicKeyAlgorithm,\n PUBLIC_KEY_ALGORITHMS,\n} from '@opentdf/sdk';\nimport { CLIError, Level, log } from './logger.js';\nimport * as assertions from '@opentdf/sdk/assertions';\nimport { base64 } from '@opentdf/sdk/encodings';\nimport { type KeyPair } from '@opentdf/sdk/singlecontainer';\n\ntype AuthToProcess = {\n auth?: string;\n clientId?: string;\n clientSecret?: string;\n concurrencyLimit?: number;\n oidcEndpoint?: string;\n userId?: string;\n};\n\ntype LoggedAuthProvider = AuthProvider & {\n requestLog: HttpRequest[];\n};\n\nclass InvalidAuthProvider {\n async updateClientPublicKey(): Promise<void> {}\n withCreds(): Promise<HttpRequest> {\n throw new Error('Method not implemented.');\n }\n}\n\nconst containerTypes = ['tdf3', 'ztdf'];\n\n/** Accepted values for the two integrity-algorithm flags, lowercase by convention. */\nconst integrityAlgorithms = ['hs256', 'gmac'] as const;\n\n/** Flag values are case-insensitive; normalize before yargs checks `choices`. */\nconst lowercaseIntegrityAlgorithm = (v: unknown) =>\n typeof v === 'string' ? v.toLowerCase() : (v as string);\n\nconst parseJwt = (jwt: string, field = 1) => {\n return JSON.parse(base64.decode(jwt.split('.')[field]));\n};\n\nconst parseJwtComplete = (jwt: string) => {\n return { header: parseJwt(jwt, 0), payload: parseJwt(jwt) };\n};\n\nasync function processAuth({\n auth,\n clientId,\n clientSecret,\n concurrencyLimit,\n oidcEndpoint,\n userId,\n}: AuthToProcess): Promise<LoggedAuthProvider> {\n log('DEBUG', 'Processing auth params');\n if (!oidcEndpoint) {\n throw new CLIError('CRITICAL', 'oidcEndpoint must be specified');\n }\n if (auth) {\n log('DEBUG', 'Processing an auth string');\n const authParts = auth.split(':');\n if (authParts.length !== 2) {\n throw new CLIError('CRITICAL', `Auth expects <clientId>:<clientSecret>, received ${auth}`);\n }\n\n [clientId, clientSecret] = authParts;\n } else if (!clientId || !clientSecret) {\n throw new CLIError(\n 'CRITICAL',\n 'Auth expects clientId and clientSecret, or combined auth param'\n );\n }\n const actual = await AuthProviders.clientSecretAuthProvider({\n clientId,\n oidcOrigin: oidcEndpoint,\n exchange: 'client',\n clientSecret,\n });\n if (concurrencyLimit !== 1) {\n await actual.oidcAuth.get();\n }\n const requestLog: AuthProviders.HttpRequest[] = [];\n return {\n requestLog,\n updateClientPublicKey: async (signingKey: KeyPair) => {\n actual.updateClientPublicKey(signingKey);\n log('DEBUG', `updateClientPublicKey: [${signingKey?.publicKey}]`);\n },\n withCreds: async (httpReq: AuthProviders.HttpRequest) => {\n const credible = await actual.withCreds(httpReq);\n if (userId) {\n const url = new URL(credible.url);\n url.searchParams.set('userId', userId);\n credible.url = url.href;\n }\n log('DEBUG', `HTTP Requesting: ${JSON.stringify(credible)}`);\n requestLog.push(credible);\n return credible;\n },\n };\n}\n\nconst rstrip = (str: string, suffix = ' '): string => {\n while (str && suffix && str.endsWith(suffix)) {\n str = str.slice(0, -suffix.length);\n }\n return str;\n};\n\nasync function parseAssertionVerificationKeys(\n s: string\n): Promise<assertions.AssertionVerificationKeys> {\n let u: assertions.AssertionVerificationKeys;\n try {\n u = JSON.parse(s);\n } catch (err) {\n // try as file name:\n try {\n const jsonFile = await openAsBlob(s);\n u = JSON.parse(await jsonFile.text());\n } catch (err2) {\n throw new CLIError(\n 'CRITICAL',\n `Failed to open/parse assertion verification keys as string or file path ${err.message}`,\n err2\n );\n }\n }\n if (typeof u !== 'object' || u === null) {\n throw new Error('Invalid input: The input must be an object');\n }\n // handle both cases of \"keys\"\n if (!('Keys' in u && typeof u.Keys === 'object')) {\n if ('keys' in u && typeof u.keys === 'object') {\n u.Keys = u.keys as Record<string, assertions.AssertionKey>;\n } else {\n throw new CLIError(\n 'CRITICAL',\n 'Invalid input: invalid structure of assertionVerificationKeys'\n );\n }\n }\n for (const assertionName in u.Keys) {\n const assertionKey: assertions.AssertionKey = u.Keys[assertionName];\n // Ensure each entry has the required 'key' and 'alg' fields\n if (typeof assertionKey !== 'object' || assertionKey === null) {\n throw new CLIError('CRITICAL', `Invalid assertion for ${assertionName}: Must be an object`);\n }\n\n if (typeof assertionKey.alg !== 'string') {\n throw new CLIError(\n 'CRITICAL',\n `Invalid assertion for ${assertionName}: Missing or invalid 'key' or 'alg'`\n );\n }\n try {\n u.Keys[assertionName].key = await correctAssertionKeys(assertionKey);\n } catch (err) {\n throw new CLIError('CRITICAL', `Issue converting assertion key from string: ${err.message}`);\n }\n }\n return u;\n}\n\nasync function parseReadOptions(argv: Partial<mainArgs>): Promise<ReadOptions> {\n const r: ReadOptions = { source: await fileAsSource(argv.file as string) };\n if (argv.noVerifyAssertions) {\n r.noVerify = true;\n }\n if (argv.assertionVerificationKeys) {\n r.assertionVerificationKeys = await parseAssertionVerificationKeys(\n argv.assertionVerificationKeys\n );\n }\n if (argv.rewrapKeyType?.length) {\n if (!isPublicKeyAlgorithm(argv.rewrapKeyType)) {\n throw new CLIError('CRITICAL', `Unsupported rewrap key algorithm: [${argv.rewrapKeyType}]`);\n }\n r.wrappingKeyAlgorithm = argv.rewrapKeyType;\n }\n if (argv.concurrencyLimit) {\n r.concurrencyLimit = argv.concurrencyLimit;\n } else {\n r.concurrencyLimit = 100;\n }\n return r;\n}\n\nasync function correctAssertionKeys({\n alg,\n key,\n}: assertions.AssertionKey): Promise<string | Uint8Array> {\n if (alg === 'HS256') {\n // Convert key string to Uint8Array\n if (typeof key !== 'string') {\n throw new CLIError('CRITICAL', 'HS256 key must be a string');\n }\n return new TextEncoder().encode(key); // Update array element directly\n } else if (alg === 'RS256') {\n // Convert PEM string to a KeyLike object\n if (typeof key !== 'string') {\n throw new CLIError('CRITICAL', 'RS256 key must be a PEM string');\n }\n return key;\n }\n // Otherwise its an unsupported alg\n throw new CLIError('CRITICAL', `Unsupported signing key algorithm: ${alg}`); // Handle unsupported algs\n}\n\nasync function parseAssertionConfig(s: string): Promise<assertions.AssertionConfig[]> {\n let u;\n try {\n u = JSON.parse(s);\n } catch (err) {\n // try as file name:\n try {\n const jsonFile = await openAsBlob(s);\n u = JSON.parse(await jsonFile.text());\n } catch (err2) {\n throw new CLIError(\n 'CRITICAL',\n `Failed to open/parse assertions as string or file path ${err.message} [${err2}]`,\n err\n );\n }\n }\n\n // if u is null or empty, return an empty array\n if (!u) {\n return [];\n }\n const a = Array.isArray(u) ? u : [u];\n for (const assertion of a) {\n if (!assertions.isAssertionConfig(assertion)) {\n throw new CLIError('CRITICAL', `invalid assertion config ${JSON.stringify(assertion)}`);\n }\n if (!assertion.signingKey) {\n continue;\n }\n try {\n assertion.signingKey.key = await correctAssertionKeys(assertion.signingKey);\n } catch (err) {\n throw new CLIError(\n 'CRITICAL',\n `Issue converting assertion key from string: ${err.message}`,\n err\n );\n }\n }\n return a;\n}\n\nasync function parseCreateOptions(argv: Partial<mainArgs>): Promise<CreateOptions> {\n const c: CreateOptions = {\n source: await fileAsSource(argv.file as string),\n };\n if (argv.attributes?.length) {\n c.attributes = argv.attributes.split(',');\n }\n c.autoconfigure = !!argv.autoconfigure;\n return c;\n}\n\n/**\n * The subset of `CreateTDFOptions` derived purely from flags -- no filesystem, no\n * network. Split out so `encrypt` can reject a bad flag before it opens anything.\n * Synchronous on purpose: the missing `async` is the contract.\n */\ntype CreateTDFFlags = Pick<\n CreateTDFOptions,\n | 'wrappingKeyAlgorithm'\n | 'mimeType'\n | 'tdfSpecVersion'\n | 'rootIntegrityAlgorithm'\n | 'segmentIntegrityAlgorithm'\n>;\n\nfunction parseCreateTDFFlags(argv: Partial<mainArgs>): CreateTDFFlags {\n const c: CreateTDFFlags = {};\n if (argv.encapKeyType?.length) {\n if (!isPublicKeyAlgorithm(argv.encapKeyType)) {\n throw new CLIError('CRITICAL', `Unsupported rewrap key algorithm: [${argv.encapKeyType}]`);\n }\n c.wrappingKeyAlgorithm = argv.encapKeyType;\n }\n if (argv.mimeType?.length) {\n if (argv.mimeType && /^[a-z]+\\/[a-z0-9-+.]+$/.test(argv.mimeType)) {\n c.mimeType = argv.mimeType as `${string}/${string}`;\n } else {\n throw new CLIError('CRITICAL', 'Invalid mimeType format');\n }\n }\n if (argv.tdfSpecVersion) {\n c.tdfSpecVersion = argv.tdfSpecVersion as never;\n }\n if (argv.rootIntegrityAlgorithm?.length) {\n // Only HMAC is supported for the root integrity algorithm.\n if (argv.rootIntegrityAlgorithm.toLowerCase() !== 'hs256') {\n throw new CLIError(\n 'CRITICAL',\n `unsupported root integrity algorithm: [${argv.rootIntegrityAlgorithm}]; only [hs256] is supported`\n );\n }\n c.rootIntegrityAlgorithm = 'HS256';\n }\n if (argv.segmentIntegrityAlgorithm?.length) {\n const segmentAlg = argv.segmentIntegrityAlgorithm.toUpperCase();\n if (segmentAlg !== 'GMAC' && segmentAlg !== 'HS256') {\n throw new CLIError(\n 'CRITICAL',\n `unsupported segment integrity algorithm: [${argv.segmentIntegrityAlgorithm}]`\n );\n }\n c.segmentIntegrityAlgorithm = segmentAlg;\n }\n return c;\n}\n\nasync function parseCreateTDFOptions(\n argv: Partial<mainArgs>,\n flags: CreateTDFFlags = parseCreateTDFFlags(argv)\n): Promise<CreateTDFOptions> {\n const c: CreateTDFOptions = { ...(await parseCreateOptions(argv)), ...flags };\n if (argv.assertions?.length) {\n // Reads from disk (parseAssertionConfig falls back to openAsBlob), so it\n // stays here rather than in the pure pass.\n c.assertionConfigs = await parseAssertionConfig(argv.assertions);\n }\n log('DEBUG', `CreateTDFOptions: ${JSON.stringify(c)}`);\n return c;\n}\n\nasync function fileAsSource(file: string): Promise<Source> {\n if (!file) {\n throw new CLIError('CRITICAL', 'Must specify file or pipe');\n }\n try {\n const stats = await stat(file);\n if (!stats?.isFile()) {\n throw new CLIError('CRITICAL', `File does not exist [${file}]`);\n }\n } catch (e) {\n throw new CLIError('CRITICAL', `File is not accessable [${file}]`, e);\n }\n log('DEBUG', `Using input from file [${file}]`);\n return { type: 'file-browser', location: await openAsBlob(file) };\n}\n\nexport const handleArgs = (args: string[]) => {\n return (\n yargs(args)\n .middleware((argv) => {\n if (argv.silent) {\n log.level = 'CRITICAL';\n } else if (argv.logLevel) {\n const ll = argv.logLevel as string;\n log.level = ll.toUpperCase() as Level;\n }\n })\n .fail((msg, err, yargs) => {\n if (err instanceof CLIError) {\n log(err);\n process.exit(1);\n } else if (err) {\n log(err);\n process.exit(2);\n } else {\n console.error(`${msg}\\n\\n${yargs.help()}`);\n process.exit(1);\n }\n })\n\n // AUTH OPTIONS\n .option('kasEndpoint', {\n group: 'Server Endpoints:',\n type: 'string',\n description: 'URL to non-default KAS instance (https://mykas.net)',\n })\n .option('platformUrl', {\n group: 'Server Endpoints:',\n type: 'string',\n description: 'Location of policy service and KAS (https://opentdf.demo)',\n })\n .option('oidcEndpoint', {\n group: 'Server Endpoints:',\n type: 'string',\n description: 'URL to non-default OIDC IdP (https://myidp.net)',\n })\n .option('policyEndpoint', {\n group: 'Server Endpoints:',\n type: 'string',\n description: 'Attribute and key grant service endpoint',\n })\n .option('allowList', {\n group: 'Security:',\n desc: 'allowed KAS origins, comma separated; defaults to the list from \"/key-access-servers\" endpoint',\n type: 'string',\n validate: (uris: string) => uris.split(','),\n })\n .option('ignoreAllowList', {\n group: 'Security:',\n desc: 'disable KAS allowlist feature for decrypt',\n type: 'boolean',\n })\n .option('noVerifyAssertions', {\n alias: 'no-verify-assertions',\n group: 'Decrypt',\n desc: 'Do not verify assertions',\n type: 'boolean',\n })\n .option('assertionVerificationKeys', {\n alias: 'with-assertion-verification-keys',\n group: 'Decrypt',\n desc: 'keys for assertion verification or path to a json file containing keys for assertion verification',\n type: 'string',\n default: '',\n validate: parseAssertionVerificationKeys,\n })\n .option('concurrencyLimit', {\n alias: 'concurrency-limit',\n group: 'Decrypt',\n desc: 'Enable concurrent key split and share lookups',\n type: 'number',\n })\n .option('auth', {\n group: 'OAuth and OIDC:',\n type: 'string',\n description: 'Combined OAuth Client Credentials (<clientId>:<clientSecret>)',\n })\n .option('dpop', {\n group: 'Security:',\n desc: 'Use DPoP for token binding',\n type: 'boolean',\n })\n .implies('auth', '--no-clientId')\n .implies('auth', '--no-clientSecret')\n\n .option('clientId', {\n group: 'OAuth and OIDC:',\n alias: 'cid',\n type: 'string',\n description: 'OAuth Client Credentials: IdP-issued Client ID',\n })\n .implies('clientId', 'clientSecret')\n\n .option('clientSecret', {\n group: 'OAuth and OIDC:',\n alias: 'cs',\n type: 'string',\n description: 'OAuth Client Credentials: IdP-issued Client Secret',\n })\n .implies('clientSecret', 'clientId')\n\n .option('exchangeToken', {\n group: 'OAuth and OIDC:',\n alias: 'et',\n type: 'string',\n description: 'OAuth Token Exchange: Token issued by trusted external IdP',\n })\n .implies('exchangeToken', 'clientId')\n\n // Examples\n .example('$0 --auth ClientID123:Cli3nt$ecret', '# OIDC client credentials')\n\n .example('$0 --clientId ClientID123 --clientSecret Cli3nt$ecret', '# OIDC client credentials')\n\n // Policy, encryption, and container options\n .options({\n assertions: {\n group: 'Encrypt Options:',\n desc: 'ZTDF assertion config objects or path to a json file containing ZTDF assertion config objects',\n type: 'string',\n default: '',\n validate: parseAssertionConfig,\n },\n attributes: {\n group: 'Encrypt Options:',\n desc: 'Data attributes for the policy',\n type: 'string',\n default: '',\n validate: (attributes: string) => attributes.split(','),\n },\n autoconfigure: {\n group: 'Encrypt Options:',\n desc: 'Enable automatic configuration from attributes using policy service',\n type: 'boolean',\n default: false,\n },\n containerType: {\n group: 'Encrypt Options:',\n alias: 't',\n choices: containerTypes,\n description: 'Container format',\n default: 'ztdf',\n },\n encapKeyType: {\n alias: 'encapsulation-algorithm',\n group: 'Encrypt Options:',\n desc: 'Key type for wrapping keys',\n type: 'string',\n choices: PUBLIC_KEY_ALGORITHMS,\n default: 'rsa:2048',\n },\n mimeType: {\n group: 'Encrypt Options:',\n desc: 'Mime type for the plain text file',\n type: 'string',\n default: '',\n },\n rootIntegrityAlgorithm: {\n alias: 'root-integrity-algorithm',\n group: 'Encrypt Options:',\n desc: 'Algorithm for the root signature. Only hs256 is supported; gmac is rejected',\n type: 'string',\n choices: integrityAlgorithms,\n coerce: lowercaseIntegrityAlgorithm,\n default: 'hs256',\n },\n segmentIntegrityAlgorithm: {\n alias: 'segment-integrity-algorithm',\n group: 'Encrypt Options:',\n desc: 'Algorithm for per-segment integrity',\n type: 'string',\n choices: integrityAlgorithms,\n coerce: lowercaseIntegrityAlgorithm,\n default: 'gmac',\n },\n rewrapKeyType: {\n alias: 'rewrap-encapsulation-algorithm',\n group: 'Decrypt Options:',\n desc: 'Key type for rewrap',\n type: 'string',\n choices: PUBLIC_KEY_ALGORITHMS,\n default: 'rsa:2048',\n },\n userId: {\n group: 'Encrypt Options:',\n type: 'string',\n description: 'Owner email address',\n },\n tdfSpecVersion: {\n group: 'Encrypt Options:',\n type: 'string',\n description: 'TDF spec version for file creation',\n default: tdfSpecVersion,\n },\n })\n\n .options({\n logLevel: {\n group: 'Verbosity:',\n alias: 'log-level',\n type: 'string',\n default: 'info',\n desc: 'Set logging level',\n },\n silent: {\n group: 'Verbosity:',\n type: 'boolean',\n default: false,\n desc: 'Disable logging',\n },\n })\n .option('output', {\n type: 'string',\n description: 'output file',\n })\n\n .command(\n 'inspect [file]',\n 'Inspect TDF and extract header information, without decrypting',\n (yargs) => {\n yargs.strict().positional('file', {\n describe: 'path to encrypted file',\n type: 'string',\n });\n },\n async (argv) => {\n log('DEBUG', 'Running inspect command');\n const ct = new OpenTDF({\n platformUrl: argv.platformUrl || guessPolicyUrl(argv),\n authProvider: new InvalidAuthProvider(),\n });\n try {\n const reader = ct.open(await parseReadOptions(argv));\n const manifest = await reader.manifest();\n try {\n const dataAttributes = await reader.attributes();\n console.log(JSON.stringify({ manifest, dataAttributes }, null, 2));\n } catch (err) {\n console.error(err);\n console.log(JSON.stringify({ manifest }, null, 2));\n }\n } finally {\n ct.close();\n }\n }\n )\n\n .command(\n 'decrypt [file]',\n 'Decrypt TDF to string',\n (yargs) => {\n yargs.strict().positional('file', {\n describe: 'path to plain text file',\n type: 'string',\n });\n },\n async (argv) => {\n log('DEBUG', 'Running decrypt command');\n const allowedKases = argv.allowList?.split(',');\n log('DEBUG', `Allowed KASes: ${allowedKases}`);\n const ignoreAllowList = !!argv.ignoreAllowList;\n if (!argv.oidcEndpoint) {\n throw new CLIError('CRITICAL', 'oidcEndpoint must be specified');\n }\n const authProvider = await processAuth(argv);\n log('DEBUG', `Initialized auth provider ${JSON.stringify(authProvider)}`);\n const guessedPolicyEndpoint = guessPolicyUrl(argv);\n const client = new OpenTDF({\n authProvider,\n defaultCreateOptions: {\n defaultKASEndpoint: argv.kasEndpoint,\n },\n defaultReadOptions: {\n allowedKASEndpoints: allowedKases,\n ignoreAllowlist: ignoreAllowList,\n noVerify: !!argv.noVerifyAssertions,\n },\n disableDPoP: !argv.dpop,\n policyEndpoint: guessedPolicyEndpoint,\n platformUrl: argv.platformUrl || guessedPolicyEndpoint,\n });\n try {\n log('SILLY', `Initialized client`);\n log('DEBUG', `About to TDF3 decrypt [${argv.file}]`);\n const ct = await client.read(await parseReadOptions(argv));\n const destination = argv.output ? createWriteStream(argv.output) : process.stdout;\n await ct.pipeTo(Writable.toWeb(destination));\n\n const lastRequest = authProvider.requestLog[authProvider.requestLog.length - 1];\n log('SILLY', `last request is ${JSON.stringify(lastRequest)}`);\n let accessToken = null;\n let dpopToken = null;\n for (const h of Object.keys(lastRequest.headers)) {\n switch (h.toLowerCase()) {\n case 'dpop':\n console.assert(!dpopToken, 'Multiple dpop headers found');\n dpopToken = parseJwtComplete(lastRequest.headers[h]);\n log('INFO', `dpop: ${JSON.stringify(dpopToken)}`);\n break;\n case 'authorization':\n console.assert(!accessToken, 'Multiple authorization headers found');\n accessToken = parseJwt(lastRequest.headers[h].split(' ')[1]);\n log('INFO', `Access Token: ${JSON.stringify(accessToken)}`);\n if (argv.dpop) {\n console.assert(accessToken.cnf?.jkt, 'Access token must have a cnf.jkt');\n }\n break;\n }\n }\n console.assert(accessToken, 'No access_token found');\n console.assert(!argv.dpop || dpopToken, 'DPoP requested but absent');\n } finally {\n client.close();\n }\n }\n )\n .command(\n 'encrypt [file]',\n 'Encrypt file or pipe to a TDF',\n (yargs) => {\n yargs.strict().positional('file', {\n describe: 'path to plain text file',\n type: 'string',\n });\n },\n async (argv) => {\n log('DEBUG', 'Running encrypt command');\n // Order is deliberate and covered by bin/opentdf.bats:\n // 1. pure flag checks -- no I/O, so a typo fails instantly\n // 2. oidcEndpoint, mirroring `decrypt`\n // 3. open the input file and any assertion files\n // 4. the auth provider, which may reach the IdP\n const createFlags = parseCreateTDFFlags(argv);\n if (!argv.oidcEndpoint) {\n throw new CLIError('CRITICAL', 'oidcEndpoint must be specified');\n }\n const createOptions = await parseCreateTDFOptions(argv, createFlags);\n const authProvider = await processAuth(argv);\n log('DEBUG', `Initialized auth provider ${JSON.stringify(authProvider)}`);\n const guessedPolicyEndpoint = guessPolicyUrl(argv);\n\n const client = new OpenTDF({\n authProvider,\n defaultCreateOptions: {\n defaultKASEndpoint: argv.kasEndpoint,\n },\n disableDPoP: !argv.dpop,\n policyEndpoint: guessedPolicyEndpoint,\n platformUrl: argv.platformUrl || guessedPolicyEndpoint,\n });\n try {\n log('SILLY', `Initialized client`);\n log('DEBUG', `TDF Create`);\n const ct: DecoratedStream = await client.createTDF(createOptions);\n if (!ct) {\n throw new CLIError('CRITICAL', 'Encrypt configuration error: No output?');\n }\n const destination = argv.output ? createWriteStream(argv.output) : process.stdout;\n await ct.pipeTo(Writable.toWeb(destination));\n } finally {\n client.close();\n }\n }\n )\n .usage('openTDF CLI\\n\\nUsage: $0 [options]')\n .alias('help', 'h')\n .demandCommand()\n .recommendCommands()\n .help('help')\n .options({\n env: {\n desc: 'Set the environment',\n },\n })\n\n .version(\n 'version',\n JSON.stringify({\n '@opentdf/sdk': version,\n tdfSpecVersion,\n })\n )\n .alias('version', 'V')\n .strict()\n .parseAsync()\n );\n};\n\nexport type mainArgs = Awaited<ReturnType<typeof handleArgs>>;\nexport const main = async (argsPromise: mainArgs) => {\n return argsPromise;\n};\n\nhandleArgs(hideBin(process.argv))\n .then(main)\n .then(() => {\n // Nothing;\n })\n .catch((err) => {\n console.error(err);\n });\n\nfunction guessPolicyUrl({\n kasEndpoint,\n policyEndpoint,\n}: {\n kasEndpoint?: string;\n policyEndpoint?: string;\n}): string | undefined {\n if (policyEndpoint) {\n return rstrip(policyEndpoint, '/');\n }\n if (kasEndpoint) {\n const uNoSlash = rstrip(kasEndpoint, '/');\n return uNoSlash.endsWith('/kas') ? uNoSlash.slice(0, -4) : uNoSlash;\n }\n return undefined;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentdf/ctl",
|
|
3
|
-
"version": "0.20.0-beta.
|
|
3
|
+
"version": "0.20.0-beta.203",
|
|
4
4
|
"description": "Node based CLI for opentdf",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"diff": "^8.0.3"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@opentdf/sdk": "^0.20.0-beta.
|
|
58
|
+
"@opentdf/sdk": "^0.20.0-beta.203",
|
|
59
59
|
"yargs": "^18.0.0"
|
|
60
60
|
}
|
|
61
61
|
}
|