@knowttl/technitium-axi 0.0.0-stage → 0.1.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/README.md +73 -2
- package/axi-credential.schema.json +37 -0
- package/bin/technitium-axi.js +10 -0
- package/command-inventory.json +2221 -0
- package/dist/archive-contract.js +27 -0
- package/dist/catalogue.js +20 -0
- package/dist/cli.js +132 -0
- package/dist/credentials.js +149 -0
- package/dist/errors.js +14 -0
- package/dist/private-file.js +75 -0
- package/dist/read-contracts.js +50 -0
- package/dist/reads.js +330 -0
- package/dist/vendor.js +122 -0
- package/package.json +22 -4
package/README.md
CHANGED
|
@@ -1,3 +1,74 @@
|
|
|
1
|
-
#
|
|
1
|
+
# technitium-axi
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
AXI-standard agent-facing CLI for Technitium DNS Server.
|
|
4
|
+
The package provides 46 read operations, strict credential profiles, offline discovery and protected result files.
|
|
5
|
+
Vendor mutations are unavailable.
|
|
6
|
+
|
|
7
|
+
Install the public npm package globally, then run the `technitium-axi` executable:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install -g @knowttl/technitium-axi
|
|
11
|
+
technitium-axi --help
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Use the Node version pinned in [.node-version](.node-version) and the npm version in the `packageManager` field of [package.json](package.json).
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm ci
|
|
18
|
+
npm run build
|
|
19
|
+
npm pack
|
|
20
|
+
npm install --prefix /tmp/technitium-install ./knowttl-technitium-axi-0.1.0.tgz
|
|
21
|
+
/tmp/technitium-install/node_modules/.bin/technitium-axi --help
|
|
22
|
+
/tmp/technitium-install/node_modules/.bin/technitium-axi schema --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Run native package and harness checks on Linux with `unshare`, `ip` and `openssl` installed:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npm run typecheck
|
|
29
|
+
npm run check:generated
|
|
30
|
+
npm run check:journey -- --task B1.01 --paths native --offline
|
|
31
|
+
npm run check:journey -- --task B1.02 --paths native --offline
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
See [Offline package journeys](docs/offline-checks.md) for isolation, synthetic harness boundaries, cleanup and the full native and Artium checks with their required fixture setup.
|
|
35
|
+
|
|
36
|
+
Release automation runs `npm run test:release` and installs the packed package for CLI smoke checks with registry access, without a prepared offline cache.
|
|
37
|
+
|
|
38
|
+
Configure a version 1 config with a named profile containing an HTTPS `origin`, `auth: "token"`, `tokenKind: "api"` and `token: {"env": "MY_TECHNITIUM_TOKEN"}`.
|
|
39
|
+
`schema --json` describes the accepted profile fields.
|
|
40
|
+
SecretRefs also support protected absolute files and explicitly stored credentials.
|
|
41
|
+
Inline secrets and secret flags are refused.
|
|
42
|
+
Ordinary reads never acquire, refresh or store credentials.
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
technitium-axi config path
|
|
46
|
+
technitium-axi config import --input-file /absolute/path/config.json
|
|
47
|
+
technitium-axi profile list
|
|
48
|
+
technitium-axi auth status --profile automation
|
|
49
|
+
technitium-axi status --profile automation
|
|
50
|
+
technitium-axi user session get --profile automation --result-file /absolute/path/session.json
|
|
51
|
+
technitium-axi zone list --profile automation --fields name,type
|
|
52
|
+
technitium-axi zone list --profile automation --full
|
|
53
|
+
technitium-axi settings get --profile automation --result-file /absolute/path/settings.json
|
|
54
|
+
technitium-axi settings backup --profile automation --zones true --result-file /absolute/path/zones.zip
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Config selection uses `--config`, then `TECHNITIUM_AXI_CONFIG`, then the platform config directory.
|
|
58
|
+
Profile selection uses `--profile`, `TECHNITIUM_AXI_PROFILE`, a complete environment profile, the configured default, or the sole profile.
|
|
59
|
+
A selected file profile ignores competing environment fields.
|
|
60
|
+
Partial environment profiles fail without borrowing fields.
|
|
61
|
+
The environment profile uses `TECHNITIUM_AXI_ORIGIN`, `TECHNITIUM_AXI_AUTH`, `TECHNITIUM_AXI_TOKEN_KIND`, `TECHNITIUM_AXI_TOKEN` and optional `USERNAME`, `CA_FILE`, `TLS_SERVER_NAME` fields with the same prefix.
|
|
62
|
+
|
|
63
|
+
`status` and the no-argument view perform one unauthenticated HTTPS status read.
|
|
64
|
+
`user session get` returns a redacted projection; `--result-file` additionally saves the exact confidential JSON in an atomic protected file and reports its path, byte count and SHA-256.
|
|
65
|
+
`caFile` and `tlsServerName` select trust and certificate identity while certificate verification stays enabled.
|
|
66
|
+
Relative `caFile` paths resolve beside the config file that declares them; environment profiles require an absolute CA path.
|
|
67
|
+
Config and CA files must be owned by the current user and not writable by group or others; file SecretRefs and stored credentials must additionally deny all group and other access.
|
|
68
|
+
These reads reject symlinks and redirected paths before consuming the file.
|
|
69
|
+
`doctor` verifies credential protection and performs one bounded session read.
|
|
70
|
+
The generated inventory and each command's `--help` describe the supported read parameters.
|
|
71
|
+
Read [Read contracts and protected results](docs/reads.md) for output bounds, paging, transfer formats and the reviewed archive-entry map.
|
|
72
|
+
Linux file protection is verified natively; native Windows file protection and interruption verification remain PENDING.
|
|
73
|
+
Windows file reads and writes are refused until ownership and ACL verification is available.
|
|
74
|
+
Environment-only profiles and env SecretRefs remain supported when no config file is present.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/knowttl/technitium-axi/axi-credential.schema.json",
|
|
4
|
+
"title": "Technitium credential profile",
|
|
5
|
+
"description": "AXI Credential Standard v2 profile. Secret values must be references.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["origin", "auth", "tokenKind"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"origin": { "type": "string", "pattern": "^https://(?:\\[[0-9A-Fa-f:]+\\]|[A-Za-z0-9.-]+)(?::[0-9]{1,5})?$" },
|
|
11
|
+
"auth": { "const": "token", "type": "string" },
|
|
12
|
+
"tokenKind": { "type": "string", "enum": ["api", "session", "single-use"] },
|
|
13
|
+
"token": { "$ref": "#/definitions/secretRef", "x-secret": true, "default": { "env": "TECHNITIUM_AXI_TOKEN" } },
|
|
14
|
+
"username": { "type": "string", "minLength": 1 },
|
|
15
|
+
"caFile": { "type": "string", "minLength": 1 },
|
|
16
|
+
"tlsServerName": { "type": "string", "pattern": "^[A-Za-z0-9.-]+$" },
|
|
17
|
+
"writes": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["allowWrites", "operations"],
|
|
21
|
+
"default": { "allowWrites": false, "operations": [] },
|
|
22
|
+
"properties": {
|
|
23
|
+
"allowWrites": { "const": false, "type": "boolean" },
|
|
24
|
+
"operations": { "type": "array", "maxItems": 0, "items": { "type": "string" } }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"definitions": {
|
|
29
|
+
"secretRef": {
|
|
30
|
+
"oneOf": [
|
|
31
|
+
{ "type": "object", "additionalProperties": false, "required": ["env"], "properties": { "env": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" } } },
|
|
32
|
+
{ "type": "object", "additionalProperties": false, "required": ["file"], "properties": { "file": { "type": "string", "pattern": "^(?:/|[A-Za-z]:[\\\\/]).+" } } },
|
|
33
|
+
{ "type": "object", "additionalProperties": false, "required": ["stored"], "properties": { "stored": { "const": true, "type": "boolean" } } }
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
|
|
4
|
+
const args = process.argv.slice(2);
|
|
5
|
+
if (args.length === 1 && ['--version', '-v', '-V'].includes(args[0])) {
|
|
6
|
+
console.log(JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version);
|
|
7
|
+
} else {
|
|
8
|
+
const { main } = await import('../dist/cli.js');
|
|
9
|
+
await main(args);
|
|
10
|
+
}
|