@knowttl/technitium-axi 0.1.0 → 0.1.1
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/LICENSE +21 -0
- package/README.md +355 -44
- package/axi-credential.schema.json +2 -2
- package/command-inventory.json +6336 -1
- package/dist/archive-contract.js +31 -0
- package/dist/catalogue.js +22 -2
- package/dist/cli.js +33 -8
- package/dist/cluster.js +129 -0
- package/dist/configuration.js +163 -0
- package/dist/credentials.js +41 -12
- package/dist/private-file.js +73 -11
- package/dist/read-contracts.js +20 -12
- package/dist/reads.js +25 -5
- package/dist/routing.js +14 -0
- package/dist/vendor.js +6 -2
- package/dist/write-contracts.js +154 -0
- package/dist/writes.js +940 -0
- package/package.json +38 -10
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { settingsFields, dhcpFields, identityFields } from './configuration.js';
|
|
2
|
+
export const recordTypeNames = {
|
|
3
|
+
0: 'Unknown', 1: 'A', 2: 'NS', 3: 'MD', 4: 'MF', 5: 'CNAME', 6: 'SOA', 7: 'MB', 8: 'MG', 9: 'MR',
|
|
4
|
+
10: 'NULL', 11: 'WKS', 12: 'PTR', 13: 'HINFO', 14: 'MINFO', 15: 'MX', 16: 'TXT', 17: 'RP', 18: 'AFSDB',
|
|
5
|
+
19: 'X25', 20: 'ISDN', 21: 'RT', 22: 'NSAP', 23: 'NSAP_PTR', 24: 'SIG', 25: 'KEY', 26: 'PX', 27: 'GPOS',
|
|
6
|
+
28: 'AAAA', 29: 'LOC', 30: 'NXT', 31: 'EID', 32: 'NIMLOC', 33: 'SRV', 34: 'ATMA', 35: 'NAPTR', 36: 'KX',
|
|
7
|
+
37: 'CERT', 38: 'A6', 39: 'DNAME', 40: 'SINK', 41: 'OPT', 42: 'APL', 43: 'DS', 44: 'SSHFP', 45: 'IPSECKEY',
|
|
8
|
+
46: 'RRSIG', 47: 'NSEC', 48: 'DNSKEY', 49: 'DHCID', 50: 'NSEC3', 51: 'NSEC3PARAM', 52: 'TLSA', 53: 'SMIMEA',
|
|
9
|
+
55: 'HIP', 56: 'NINFO', 57: 'RKEY', 58: 'TALINK', 59: 'CDS', 60: 'CDNSKEY', 61: 'OPENPGPKEY', 62: 'CSYNC',
|
|
10
|
+
63: 'ZONEMD', 64: 'SVCB', 65: 'HTTPS', 99: 'SPF', 100: 'UINFO', 101: 'UID', 102: 'GID', 103: 'UNSPEC',
|
|
11
|
+
104: 'NID', 105: 'L32', 106: 'L64', 107: 'LP', 108: 'EUI48', 109: 'EUI64', 128: 'NXNAME', 249: 'TKEY',
|
|
12
|
+
250: 'TSIG', 251: 'IXFR', 252: 'AXFR', 253: 'MAILB', 254: 'MAILA', 255: 'ANY', 256: 'URI', 257: 'CAA',
|
|
13
|
+
258: 'AVC', 259: 'DOA', 260: 'AMTRELAY', 261: 'RESINFO', 262: 'WALLET', 263: 'CLA', 264: 'IPN',
|
|
14
|
+
32768: 'TA', 32769: 'DLV', 65280: 'ANAME', 65281: 'FWD', 65282: 'APP', 65283: 'CHILD_NS', 65284: 'PARENT_NS', 65357: 'ALIAS',
|
|
15
|
+
};
|
|
16
|
+
// Reviewed against DNS Server 0dd592aad21eced4221a9a46204cb1a299972ca0.
|
|
17
|
+
// Selectors describe vendor matching, including composite keys and owner/type singletons.
|
|
18
|
+
export const recordFamilies = {
|
|
19
|
+
A: { selector: ['ipAddress'], replacement: ['newIpAddress'], optional: ['ptr', 'createPtrZone', 'updateSvcbHints'] },
|
|
20
|
+
AAAA: { selector: ['ipAddress'], replacement: ['newIpAddress'], optional: ['ptr', 'createPtrZone', 'updateSvcbHints'] },
|
|
21
|
+
NS: { selector: ['nameServer'], replacement: ['newNameServer'], optional: ['glue'] },
|
|
22
|
+
CNAME: { selector: [], replacement: ['cname'] },
|
|
23
|
+
DNAME: { selector: [], replacement: ['dname'] },
|
|
24
|
+
PTR: { selector: ['ptrName'], replacement: ['newPtrName'] },
|
|
25
|
+
MX: { selector: ['preference', 'exchange'], replacement: ['newPreference', 'newExchange'] },
|
|
26
|
+
TXT: { selector: ['text'], replacement: ['newText'], optional: ['splitText', 'newSplitText', 'characterStringsBase64', 'newCharacterStringsBase64'] },
|
|
27
|
+
RP: { selector: ['mailbox', 'txtDomain'], replacement: ['newMailbox', 'newTxtDomain'] },
|
|
28
|
+
SRV: { selector: ['priority', 'weight', 'port', 'target'], replacement: ['newPriority', 'newWeight', 'newPort', 'newTarget'] },
|
|
29
|
+
NAPTR: { selector: ['naptrOrder', 'naptrPreference', 'naptrFlags', 'naptrServices', 'naptrRegexp', 'naptrReplacement'],
|
|
30
|
+
replacement: ['naptrNewOrder', 'naptrNewPreference', 'naptrNewFlags', 'naptrNewServices', 'naptrNewRegexp', 'naptrNewReplacement'] },
|
|
31
|
+
DS: { selector: ['keyTag', 'algorithm', 'digestType', 'digest'], replacement: ['newKeyTag', 'newAlgorithm', 'newDigestType', 'newDigest'] },
|
|
32
|
+
SSHFP: { selector: ['sshfpAlgorithm', 'sshfpFingerprintType', 'sshfpFingerprint'], replacement: ['newSshfpAlgorithm', 'newSshfpFingerprintType', 'newSshfpFingerprint'] },
|
|
33
|
+
TLSA: { selector: ['tlsaCertificateUsage', 'tlsaSelector', 'tlsaMatchingType', 'tlsaCertificateAssociationData'],
|
|
34
|
+
replacement: ['newTlsaCertificateUsage', 'newTlsaSelector', 'newTlsaMatchingType', 'newTlsaCertificateAssociationData'] },
|
|
35
|
+
SVCB: { selector: ['svcPriority', 'svcTargetName', 'svcParams'], replacement: ['newSvcPriority', 'newSvcTargetName', 'newSvcParams'], optional: ['autoIpv4Hint', 'autoIpv6Hint'] },
|
|
36
|
+
HTTPS: { selector: ['svcPriority', 'svcTargetName', 'svcParams'], replacement: ['newSvcPriority', 'newSvcTargetName', 'newSvcParams'], optional: ['autoIpv4Hint', 'autoIpv6Hint'] },
|
|
37
|
+
URI: { selector: ['uriPriority', 'uriWeight', 'uri'], replacement: ['newUriPriority', 'newUriWeight', 'newUri'] },
|
|
38
|
+
CAA: { selector: ['flags', 'tag', 'value'], replacement: ['newFlags', 'newTag', 'newValue'] },
|
|
39
|
+
ANAME: { selector: ['aname'], replacement: ['newAName'] },
|
|
40
|
+
FWD: { selector: ['protocol', 'forwarder'], replacement: ['newProtocol', 'newForwarder'],
|
|
41
|
+
optional: ['dnssecValidation', 'proxyType', 'proxyAddress', 'proxyPort', 'proxyUsername', 'proxyPassword', 'forwarderPriority'] },
|
|
42
|
+
APP: { selector: [], replacement: ['appName', 'classPath', 'recordData'] },
|
|
43
|
+
SOA: { selector: [], replacement: ['primaryNameServer', 'responsiblePerson', 'serial', 'refresh', 'retry', 'expire', 'minimum'], optional: ['useSerialDateScheme'] },
|
|
44
|
+
raw: { selector: ['rdata'], replacement: ['newRData'] },
|
|
45
|
+
};
|
|
46
|
+
const words = (value) => value.split(' ');
|
|
47
|
+
const recordFields = [...new Set(Object.values(recordFamilies).flatMap(row => [...row.selector, ...row.replacement, ...row.optional ?? []]))];
|
|
48
|
+
export const writeContracts = [
|
|
49
|
+
...[
|
|
50
|
+
['119', 'init', 'init', 'clusterDomain primaryNodeIpAddresses', 'clusterDomain primaryNodeIpAddresses'],
|
|
51
|
+
['120', 'primary delete', 'primary/delete', 'node forceDelete', ''],
|
|
52
|
+
['121', 'primary join', 'primary/join', 'secondaryNodeId secondaryNodeUrl secondaryNodeIpAddresses secondaryNodeCertificate', 'secondaryNodeId secondaryNodeUrl secondaryNodeIpAddresses secondaryNodeCertificate'],
|
|
53
|
+
['122', 'primary remove-secondary', 'primary/removeSecondary', 'secondaryNodeId', 'secondaryNodeId'],
|
|
54
|
+
['123', 'primary delete-secondary', 'primary/deleteSecondary', 'secondaryNodeId', 'secondaryNodeId'],
|
|
55
|
+
['124', 'primary update-secondary', 'primary/updateSecondary', 'secondaryNodeId secondaryNodeUrl secondaryNodeIpAddresses secondaryNodeCertificate', 'secondaryNodeId secondaryNodeUrl secondaryNodeIpAddresses secondaryNodeCertificate'],
|
|
56
|
+
['126', 'primary set-options', 'primary/setOptions', 'node heartbeatRefreshIntervalSeconds heartbeatRetryIntervalSeconds configRefreshIntervalSeconds configRetryIntervalSeconds', ''],
|
|
57
|
+
['127', 'init-join', 'initJoin', 'secondaryNodeIpAddresses primaryNodeUrl primaryNodeIpAddress ignoreCertificateErrors primaryNodeUsername primaryNodePassword primaryNodeTotp', 'secondaryNodeIpAddresses primaryNodeUrl primaryNodeUsername primaryNodePassword'],
|
|
58
|
+
['128', 'secondary leave', 'secondary/leave', 'node forceLeave', ''],
|
|
59
|
+
['129', 'secondary notify', 'secondary/notify', 'primaryNodeId primaryNodeUrl primaryNodeIpAddresses', 'primaryNodeId primaryNodeUrl primaryNodeIpAddresses'],
|
|
60
|
+
['130', 'secondary resync', 'secondary/resync', 'node', ''],
|
|
61
|
+
['131', 'secondary update-primary', 'secondary/updatePrimary', 'node primaryNodeUrl primaryNodeIpAddresses', 'primaryNodeUrl'],
|
|
62
|
+
['132', 'secondary promote', 'secondary/promote', 'node forceDeletePrimary', ''],
|
|
63
|
+
['133', 'update-ip-address', 'updateIpAddress', 'node ipAddresses', 'ipAddresses'],
|
|
64
|
+
].map(([id, command, path, fields, required]) => ({ id: `OP-${id}`, command: `admin cluster ${command}`, path: `/api/admin/cluster/${path}`,
|
|
65
|
+
fields: words(fields), required: required ? words(required) : [], ...(id === '127' ? { secrets: ['primaryNodePassword', 'primaryNodeTotp'] } : {}) })),
|
|
66
|
+
...[
|
|
67
|
+
['OP-087', 'remove', 'remove'], ['OP-088', 'convert-to-reserved', 'convertToReserved'], ['OP-089', 'convert-to-dynamic', 'convertToDynamic'],
|
|
68
|
+
].map(([id, command, path]) => ({ id: id, command: `dhcp lease ${command}`, path: `/api/dhcp/leases/${path}`,
|
|
69
|
+
fields: words('name clientIdentifier hardwareAddress'), required: ['name'] })),
|
|
70
|
+
{ id: 'OP-092', command: 'dhcp scope set', path: '/api/dhcp/scopes/set', fields: Object.keys(dhcpFields), required: ['name'], baselinePath: '/api/dhcp/scopes/get', baselineTarget: ['name'] },
|
|
71
|
+
{ id: 'OP-093', command: 'dhcp scope add-reserved-lease', path: '/api/dhcp/scopes/addReservedLease', fields: words('name hardwareAddress ipAddress hostName comments'), required: words('name hardwareAddress ipAddress') },
|
|
72
|
+
{ id: 'OP-094', command: 'dhcp scope remove-reserved-lease', path: '/api/dhcp/scopes/removeReservedLease', fields: words('name hardwareAddress'), required: words('name hardwareAddress') },
|
|
73
|
+
...[['OP-095', 'enable'], ['OP-096', 'disable'], ['OP-097', 'delete']].map(([id, action]) => ({
|
|
74
|
+
id: id, command: `dhcp scope ${action}`, path: `/api/dhcp/scopes/${action}`, fields: ['name'], required: ['name'],
|
|
75
|
+
})),
|
|
76
|
+
{ id: 'OP-002', command: 'user login', path: '/api/user/login', fields: words('user pass totp'), required: ['user', 'pass'], secrets: ['pass', 'totp'] },
|
|
77
|
+
{ id: 'OP-003', command: 'user create-token', path: '/api/user/createToken', fields: words('user pass totp tokenName'), required: ['tokenName'], secrets: ['pass', 'totp'] },
|
|
78
|
+
{ id: 'OP-004', command: 'user create-single-use-token', path: '/api/user/createSingleUseToken', fields: [], required: [] },
|
|
79
|
+
{ id: 'OP-005', command: 'user logout', path: '/api/user/logout', fields: [], required: [] },
|
|
80
|
+
{ id: 'OP-007', command: 'user session delete', path: '/api/user/session/delete', fields: ['partialToken'], required: ['partialToken'] },
|
|
81
|
+
{ id: 'OP-008', command: 'user change-password', path: '/api/user/changePassword', fields: words('pass newPass totp iterations'), required: ['pass', 'newPass'], secrets: ['pass', 'newPass', 'totp'] },
|
|
82
|
+
{ id: 'OP-009', command: 'user 2fa init', path: '/api/user/2fa/init', fields: [], required: [] },
|
|
83
|
+
{ id: 'OP-010', command: 'user 2fa enable', path: '/api/user/2fa/enable', fields: ['totp'], required: ['totp'], secrets: ['totp'] },
|
|
84
|
+
{ id: 'OP-011', command: 'user 2fa disable', path: '/api/user/2fa/disable', fields: [], required: [] },
|
|
85
|
+
{ id: 'OP-013', command: 'user profile set', path: '/api/user/profile/set', fields: words('displayName sessionTimeoutSeconds'), required: [] },
|
|
86
|
+
{ id: 'OP-099', command: 'admin session create-token', path: '/api/admin/sessions/createToken', fields: words('user tokenName'), required: words('user tokenName') },
|
|
87
|
+
{ id: 'OP-100', command: 'admin session delete', path: '/api/admin/sessions/delete', fields: words('node partialToken'), required: ['partialToken'] },
|
|
88
|
+
{ id: 'OP-102', command: 'admin user create', path: '/api/admin/users/create', fields: words('user pass displayName'), required: words('user pass'), secrets: ['pass'] },
|
|
89
|
+
{ id: 'OP-104', command: 'admin user set', path: '/api/admin/users/set', fields: words('user displayName newUser totpEnabled disabled sessionTimeoutSeconds newPass iterations memberOfGroups'), required: ['user'], secrets: ['newPass'] },
|
|
90
|
+
{ id: 'OP-105', command: 'admin user delete', path: '/api/admin/users/delete', fields: ['user'], required: ['user'] },
|
|
91
|
+
{ id: 'OP-107', command: 'admin group create', path: '/api/admin/groups/create', fields: words('group description'), required: ['group'] },
|
|
92
|
+
{ id: 'OP-110', command: 'admin group delete', path: '/api/admin/groups/delete', fields: ['group'], required: ['group'] },
|
|
93
|
+
{ id: 'OP-113', command: 'admin permission set', path: '/api/admin/permissions/set', fields: words('node section userPermissions groupPermissions'), required: ['section'], baselinePath: '/api/admin/permissions/get', baselineTarget: words('node section') },
|
|
94
|
+
{ id: 'OP-115', command: 'admin sso set', path: '/api/admin/sso/set', fields: Object.keys(identityFields).filter(key => key.startsWith('sso')), required: [], secrets: ['ssoClientSecret'] },
|
|
95
|
+
{ id: 'OP-116', command: 'admin sso user create', path: '/api/admin/sso/users/create', fields: words('user displayName ssoIdentifier memberOfGroups'), required: words('user ssoIdentifier') },
|
|
96
|
+
{ id: 'OP-117', command: 'admin sso user set', path: '/api/admin/sso/users/set', fields: words('user newUser displayName memberOfGroups'), required: ['user'] },
|
|
97
|
+
{ id: 'OP-142', command: 'admin ldap set', path: '/api/admin/ldap/set', fields: Object.keys(identityFields).filter(key => key.startsWith('ldap')), required: [], secrets: ['ldapBindPassword'] },
|
|
98
|
+
{ id: 'OP-019', command: 'dashboard stats delete-all', path: '/api/dashboard/stats/deleteAll', fields: ['node'], required: [] },
|
|
99
|
+
...[
|
|
100
|
+
['OP-054', 'cache', 'delete', 'domain'], ['OP-055', 'cache', 'flush', ''],
|
|
101
|
+
['OP-057', 'allowed', 'add', 'domain'], ['OP-058', 'allowed', 'delete', 'domain'],
|
|
102
|
+
['OP-059', 'allowed', 'flush', ''], ['OP-060', 'allowed', 'import', 'allowedZones'],
|
|
103
|
+
['OP-063', 'blocked', 'add', 'domain'], ['OP-064', 'blocked', 'delete', 'domain'],
|
|
104
|
+
['OP-065', 'blocked', 'flush', ''], ['OP-066', 'blocked', 'import', 'blockedZones'],
|
|
105
|
+
].map(([id, family, action, field]) => ({ id: id, command: `${family} ${action}`, path: `/api/${family}/${action}`,
|
|
106
|
+
fields: field ? [field] : [], required: field ? [field] : [] })),
|
|
107
|
+
{ id: 'OP-022', command: 'zone create', path: '/api/zones/create', fields: words('node zone type catalog useSoaSerialDateScheme primaryNameServerAddresses zoneTransferProtocol tsigKeyName validateZone initializeForwarder protocol forwarder dnssecValidation proxyType proxyAddress proxyPort proxyUsername proxyPassword'), required: ['zone', 'type'], secrets: ['proxyPassword'] },
|
|
108
|
+
{ id: 'OP-023', command: 'zone import', path: '/api/zones/import', fields: words('node zone overwrite overwriteZone overwriteSoaSerial records'), required: ['zone'] },
|
|
109
|
+
{ id: 'OP-025', command: 'zone clone', path: '/api/zones/clone', fields: words('node zone sourceZone'), required: ['zone', 'sourceZone'] },
|
|
110
|
+
{ id: 'OP-026', command: 'zone convert', path: '/api/zones/convert', fields: words('node zone type'), required: ['zone', 'type'] },
|
|
111
|
+
...[['OP-027', 'enable'], ['OP-028', 'disable'], ['OP-029', 'delete'], ['OP-030', 'resync']].map(([id, action]) => ({
|
|
112
|
+
id: id, command: `zone ${action}`, path: `/api/zones/${action}`, fields: words(action === 'delete' ? 'node zone zones' : 'node zone'), required: action === 'delete' ? [] : ['zone'],
|
|
113
|
+
})),
|
|
114
|
+
{ id: 'OP-032', command: 'zone options set', path: '/api/zones/options/set', fields: words('node zone disabled catalog overrideCatalogQueryAccess overrideCatalogZoneTransfer overrideCatalogNotify primaryNameServerAddresses primaryZoneTransferProtocol primaryZoneTransferTsigKeyName validateZone queryAccess queryAccessNetworkACL zoneTransfer zoneTransferNetworkACL zoneTransferTsigKeyNames notify notifyNameServers notifySecondaryCatalogsNameServers update updateNetworkACL updateSecurityPolicies'), required: ['zone'], baselinePath: '/api/zones/options/get', baselineTarget: ['zone', 'node'] },
|
|
115
|
+
{ id: 'OP-034', command: 'zone permission set', path: '/api/zones/permissions/set', fields: words('node zone userPermissions groupPermissions'), required: ['zone'], baselinePath: '/api/zones/permissions/get', baselineTarget: ['zone', 'node'] },
|
|
116
|
+
{ id: 'OP-035', command: 'zone dnssec sign', path: '/api/zones/dnssec/sign', fields: words('node zone algorithm pemKskPrivateKey pemZskPrivateKey hashAlgorithm kskKeySize zskKeySize curve dnsKeyTtl zskRolloverDays nxProof iterations saltLength'), required: ['zone', 'algorithm'], secrets: ['pemKskPrivateKey', 'pemZskPrivateKey'] },
|
|
117
|
+
{ id: 'OP-036', command: 'zone dnssec unsign', path: '/api/zones/dnssec/unsign', fields: words('node zone'), required: ['zone'] },
|
|
118
|
+
...[
|
|
119
|
+
['OP-039', 'convert-to-nsec', 'convertToNSEC', '', ''],
|
|
120
|
+
['OP-040', 'convert-to-nsec3', 'convertToNSEC3', 'iterations saltLength', ''],
|
|
121
|
+
['OP-041', 'update-nsec3-params', 'updateNSEC3Params', 'iterations saltLength', ''],
|
|
122
|
+
['OP-042', 'update-dns-key-ttl', 'updateDnsKeyTtl', 'ttl', 'ttl'],
|
|
123
|
+
['OP-044', 'update-private-key', 'updatePrivateKey', 'keyTag rolloverDays', 'keyTag rolloverDays'],
|
|
124
|
+
['OP-045', 'delete-private-key', 'deletePrivateKey', 'keyTag', 'keyTag'],
|
|
125
|
+
['OP-046', 'publish-all-private-keys', 'publishAllPrivateKeys', '', ''],
|
|
126
|
+
['OP-047', 'rollover-dns-key', 'rolloverDnsKey', 'keyTag', 'keyTag'],
|
|
127
|
+
['OP-048', 'retire-dns-key', 'retireDnsKey', 'keyTag', 'keyTag'],
|
|
128
|
+
].map(([id, command, path, fields, required]) => ({ id: id, command: `zone dnssec properties ${command}`, path: `/api/zones/dnssec/properties/${path}`,
|
|
129
|
+
fields: words(`node zone ${fields}`.trim()), required: words(`zone ${required}`.trim()) })),
|
|
130
|
+
{ id: 'OP-140', command: 'zone dnssec properties activate-ksk-dns-key', path: '/api/zones/dnssec/properties/activateKskDnsKey', fields: words('zone keyTag'), required: words('zone keyTag') },
|
|
131
|
+
{ id: 'OP-043', command: 'zone dnssec properties add-private-key', path: '/api/zones/dnssec/properties/addPrivateKey', fields: words('node zone keyType rolloverDays algorithm pemPrivateKey hashAlgorithm keySize curve'), required: ['zone', 'keyType', 'algorithm'], secrets: ['pemPrivateKey'] },
|
|
132
|
+
...[['OP-049', 'add'], ['OP-051', 'update'], ['OP-052', 'delete']].map(([id, action]) => ({ id: id, command: `zone record ${action}`, path: `/api/zones/records/${action}`,
|
|
133
|
+
fields: [...words('node zone domain type ttl overwrite comments expiryTtl newDomain disable'), ...recordFields], required: ['zone', 'domain', 'type'], secrets: ['proxyPassword'] })),
|
|
134
|
+
{ id: 'OP-077', command: 'dns-client resolve', path: '/api/dnsClient/resolve', fields: words('node server domain type protocol dnssec eDnsClientSubnet import'), required: ['server', 'domain', 'type'] },
|
|
135
|
+
{ id: 'OP-080', command: 'settings set', path: '/api/settings/set', fields: Object.keys(settingsFields), required: [], secrets: Object.keys(settingsFields).filter(key => settingsFields[key].secret), baselinePath: '/api/settings/get', baselineTarget: [] },
|
|
136
|
+
{ id: 'OP-082', command: 'settings force-update-block-lists', path: '/api/settings/forceUpdateBlockLists', fields: [], required: [] },
|
|
137
|
+
{ id: 'OP-083', command: 'settings temporary-disable-blocking', path: '/api/settings/temporaryDisableBlocking', fields: ['minutes'], required: ['minutes'] },
|
|
138
|
+
...[
|
|
139
|
+
['OP-070', 'download-and-install', 'downloadAndInstall'],
|
|
140
|
+
['OP-071', 'download-and-update', 'downloadAndUpdate'],
|
|
141
|
+
['OP-074', 'uninstall', 'uninstall'],
|
|
142
|
+
].map(([id, command, path]) => ({ id: id, command: `app ${command}`, path: `/api/apps/${path}`,
|
|
143
|
+
fields: command === 'uninstall' ? ['name'] : ['name', 'url'], required: command === 'uninstall' ? ['name'] : ['name', 'url'] })),
|
|
144
|
+
{ id: 'OP-076', command: 'app config set', path: '/api/apps/config/set', fields: ['name', 'config'], required: ['name', 'config'], secrets: ['config'] },
|
|
145
|
+
{ id: 'OP-072', command: 'app install', path: '/api/apps/install', fields: ['node', 'name'], required: ['name'] },
|
|
146
|
+
{ id: 'OP-073', command: 'app update', path: '/api/apps/update', fields: ['node', 'name'], required: ['name'] },
|
|
147
|
+
{ id: 'OP-085', command: 'settings restore', path: '/api/settings/restore', fields: words('node authConfig clusterConfig webServiceSettings dnsSettings logSettings zones allowedZones blockedZones blockLists apps scopes stats logs deleteExistingFiles'), required: [] },
|
|
148
|
+
{ id: 'OP-136', command: 'log delete', path: '/api/logs/delete', fields: ['node', 'log'], required: ['log'] },
|
|
149
|
+
{ id: 'OP-137', command: 'log delete-all', path: '/api/logs/deleteAll', fields: ['node'], required: [] },
|
|
150
|
+
{ id: 'OP-109', command: 'admin group set', path: '/api/admin/groups/set', fields: words('group newGroup description members'), required: ['group'], baselinePath: '/api/admin/groups/get', baselineTarget: ['group'] },
|
|
151
|
+
{ id: 'OP-143', command: 'admin ldap test', path: '/api/admin/ldap/test', fields: words('ldapServer ldapPort ldapSslOption ldapIgnoreSslErrors ldapBindUsername ldapBindPassword ldapSearchBase ldapUserSearchFilter ldapGroupAttribute'), required: [], secrets: ['ldapBindPassword'] },
|
|
152
|
+
];
|
|
153
|
+
export const writeFlags = ['--json', '--help', '--config', '--profile', '--input-file', '--execute', '--confirm', '--result-file', '--reconcile'];
|
|
154
|
+
export const writeCapabilities = writeContracts.flatMap(row => row.id === 'OP-077' ? ['OP-077.import'] : [row.id]);
|