@tamga-network/onboard 0.0.0-stage → 0.8.2
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 +190 -0
- package/README.md +154 -2
- package/lib/application.d.ts +116 -0
- package/lib/application.d.ts.map +1 -0
- package/lib/application.js +262 -0
- package/lib/application.js.map +1 -0
- package/lib/checks.d.ts +124 -0
- package/lib/checks.d.ts.map +1 -0
- package/lib/checks.js +1028 -0
- package/lib/checks.js.map +1 -0
- package/lib/cli.d.ts +3 -0
- package/lib/cli.d.ts.map +1 -0
- package/lib/cli.js +515 -0
- package/lib/cli.js.map +1 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -0
- package/lib/keys.d.ts +106 -0
- package/lib/keys.d.ts.map +1 -0
- package/lib/keys.js +247 -0
- package/lib/keys.js.map +1 -0
- package/lib/mcp.d.ts +240 -0
- package/lib/mcp.d.ts.map +1 -0
- package/lib/mcp.js +459 -0
- package/lib/mcp.js.map +1 -0
- package/lib/network.d.ts +22 -0
- package/lib/network.d.ts.map +1 -0
- package/lib/network.js +37 -0
- package/lib/network.js.map +1 -0
- package/lib/node.d.ts +200 -0
- package/lib/node.d.ts.map +1 -0
- package/lib/node.js +931 -0
- package/lib/node.js.map +1 -0
- package/lib/paths.d.ts +12 -0
- package/lib/paths.d.ts.map +1 -0
- package/lib/paths.js +60 -0
- package/lib/paths.js.map +1 -0
- package/lib/rules.d.ts +65 -0
- package/lib/rules.d.ts.map +1 -0
- package/lib/rules.js +357 -0
- package/lib/rules.js.map +1 -0
- package/package.json +47 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Tamga Network
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,155 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @tamga-network/onboard
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Joining tool for institutions — for the IT team of a university, company or public body that will issue or verify credentials
|
|
4
|
+
on Tamga Network. It prepares and checks everything on the institution's side **before** the operator registers it, and checks
|
|
5
|
+
how the institution appears **after** registration:
|
|
6
|
+
|
|
7
|
+
- the application files (registration data, same rules as the operator's registration tool),
|
|
8
|
+
- the institution's two signing keys and the certificate requests (CSRs) — generated on your own computer,
|
|
9
|
+
- your own setup: domain, DNS confirmation, https addresses, `.well-known` metadata, the lookup endpoint,
|
|
10
|
+
- after joining: your record in the signed trust list, credential types, certificate chain to the network root,
|
|
11
|
+
- for a state or operator running a Besu node of the network's ledger: the node key, a configuration template, the node
|
|
12
|
+
declaration and read-only checks of the running node (`tamga-onboard node`).
|
|
13
|
+
|
|
14
|
+
It **never writes to the network or the trust list** and sends nothing anywhere: its output is local files (applications, CSRs,
|
|
15
|
+
a report) that you send to the operator. Private keys never leave your computer. No personal data is asked for or written —
|
|
16
|
+
not even the name of a signatory.
|
|
17
|
+
|
|
18
|
+
The same operations are available as a local **MCP server** (`tamga-onboard mcp`, stdio), so the institution's own AI assistant
|
|
19
|
+
can run the steps.
|
|
20
|
+
|
|
21
|
+
## New in 0.8.2
|
|
22
|
+
|
|
23
|
+
First published release: the institution steps (`init`, `validate`, `keys`, `check`, `sandbox`), the state / operator node
|
|
24
|
+
steps (`node init | declare | check`) and the local MCP server (`tamga-onboard mcp`).
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
Published on npm as the `0.8.2` test release (first release of this package; the stable `1.0.0` comes when everything is
|
|
29
|
+
ready — in test releases the commands and options may change). Released together with the other `@tamga-network/*` packages.
|
|
30
|
+
This first release is published by hand without npm provenance (npm's trusted publishing from GitHub Actions can only be set
|
|
31
|
+
up for a package that already exists); later releases are built by GitHub Actions and carry provenance.
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npm install -g @tamga-network/onboard # or: npx -p @tamga-network/onboard tamga-onboard --help
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Node.js 22 or later. No `openssl` needed. In a clone of this repository it also runs from source without a build step:
|
|
38
|
+
`npm install`, then `npx tsx packages/onboard/src/cli.ts` in place of `tamga-onboard` (the compiled `lib/cli.js` is meant for
|
|
39
|
+
the published package).
|
|
40
|
+
|
|
41
|
+
## Steps
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
tamga-onboard init # questions → tamga-onboarding/<slug>/ (or: init --from answers.json)
|
|
45
|
+
tamga-onboard keys tamga-onboarding/<slug>
|
|
46
|
+
tamga-onboard check tamga-onboarding/<slug> --report report.json
|
|
47
|
+
# send to the operator: <slug>.issuer.json, <slug>.rp.json (if any), keys/*.csr.pem, report.json — never keys/*.key.pem
|
|
48
|
+
# after registration (up to 24 hours):
|
|
49
|
+
tamga-onboard check tamga-onboarding/<slug> --listing
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
| Command | What it does |
|
|
53
|
+
|---|---|
|
|
54
|
+
| `init [--from <answers.json>] [--out <dir>]` | Asks for (or reads) the institution's data and writes `onboarding.json` + the registration application(s). Unknown fields are rejected, so names of people cannot slip in. |
|
|
55
|
+
| `validate <file\|dir> …` | Checks an application, an answers file or an onboarding folder with the registration rules (ADR-0024) plus identifier format and checksum, https addresses, ISCED-F codes. |
|
|
56
|
+
| `keys [dir] [--passphrase-env <VAR>] [--no-passphrase] [--allow-synced]` | Generates the keys (issuer: credential + status list; verifier: access) as P-256 / ES256 on this computer, writes `keys/<name>.key.pem` (owner-only permissions; passphrase of at least 12 characters — on Windows required unless `--no-passphrase`) and `keys/<name>.csr.pem`. Refuses a folder synced to OneDrive, Dropbox, Google Drive or iCloud unless `--allow-synced`. The CSR subject carries the legal name, country and `organizationIdentifier` (`VATTR-<VKN>` / `NTRTR-<MERSIS>`); an access-certificate CSR also carries the DNS name and the support address. Never overwrites. |
|
|
57
|
+
| `keys --inspect <csr.pem> [dir]` | Checks a CSR made elsewhere (HSM, remote signing service) against your application. |
|
|
58
|
+
| `check [dir]` | Your setup: applications, keys ↔ CSRs ↔ certificates from the operator, domain and DNS TXT confirmation (`--dns-txt <value>`), https addresses, own-service metadata, lookup endpoint (probed with invalid requests only), verifier domain. Only https; redirects are followed hop by hop and local / private network addresses are refused (`--allow-http`, `--allow-private` for local tests). |
|
|
59
|
+
| `check [dir] --listing` · `check --listing-only --env sandbox --slug <slug>` | Your record in the signed trust list, verified against the root pins embedded in this package (`--pin <hex>` overrides with a value you verified out of band at tamga.network/trust-anchor; the report then shows a warning row). Registration certificates are downloaded and their signature checked against the registrar keys in the signed list. |
|
|
60
|
+
| `sandbox` | Where and how to try the sandbox ("Try your institution"). |
|
|
61
|
+
| `mcp [--root <dir>]` | Local MCP server (stdio) with the tools below. |
|
|
62
|
+
|
|
63
|
+
Exit codes: `0` ok · `1` a check or validation failed · `2` usage error. `--json` prints the report as JSON.
|
|
64
|
+
|
|
65
|
+
## State / operator node (`tamga-onboard node`)
|
|
66
|
+
|
|
67
|
+
For a state (or another operator) that runs a node of the network's Besu ledger. Nothing is written to the chain, the
|
|
68
|
+
allowlist or the network: votes, allowlist reloads and peer changes stay with the operators.
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
tamga-onboard node init --state TR --role validator --ip 192.0.2.10 --interface 10.0.0.10 --out /var/lib/besu
|
|
72
|
+
tamga-onboard node declare /var/lib/besu --contact noc@example.org # → tr-validator.json, send to the operator
|
|
73
|
+
# after genesis.json, static-nodes.json and the allowlist are in place and the node runs:
|
|
74
|
+
tamga-onboard node check /var/lib/besu --chain-rpc https://<operator endpoint> --permissions-file permissions_config.rendered.toml
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
| Command | What it does |
|
|
78
|
+
|---|---|
|
|
79
|
+
| `node init --state <CC> --role validator\|rpc --ip <IP> [--interface <IP>] [--p2p-port 30303] [--rpc-port 8545] [--out <dir>] [--allow-synced]` | Generates the node key (secp256k1) **on the node's own machine** and writes `key` (Besu key file format, owner-only permissions; refused in a folder synced to OneDrive, Dropbox, Google Drive or iCloud unless `--allow-synced`; never overwritten), `key.pub`, `node.json` and a `besu.toml` template. Prints the enode public key and the validator address (the address Governance must hold for the state). The template: permissioned mode (both allowlist flags on), JSON-RPC on 127.0.0.1 only (QBFT, PERM, ADMIN for the node's own use; outside clients get ETH, NET, WEB3 only through `network/rpc-proxy`), P2P listening on one internal interface (`p2p-interface`; `0.0.0.0` / `::` are refused — without it Besu listens on every interface) and advertising `--ip` (`p2p-host`), discovery off, WebSocket and GraphQL off. Genesis is neither generated nor downloaded: it comes from the network's operators and its sha256 is compared out of band with at least two of them. |
|
|
80
|
+
| `node declare [dir] --contact <role address> [--name <name>] [--out <file>]` | Writes the `tamga-node-declaration/1` file (schema `network/permissions/schema/node-declaration.schema.json`) the operator adds to `network/permissions/nodes/`. The contact is the institution's operations mailbox or https page — no personal names (an address that does not look like a role mailbox gets a warning). Without a node folder (key in an HSM): `--public-key --state --role --ip --p2p-port`. A declaration grants no authority. |
|
|
81
|
+
| `node check [dir] [--rpc <url>] [--chain-rpc <url>] [--public-rpc <url>] [--permissions-file <toml>] [--config <besu.toml>] [--declaration <json>] [--client-cert <pem> --client-key <pem>] [--allow-private] [--json] [--report <file>]` | Read-only checks of your own node (only read-only JSON-RPC methods are ever called): reachable (N1), in sync and same genesis as a reference endpoint (N2–N3), peers (N4), running key = `node.json` / declaration (N5), node and account allowlists = the rendered file of `trust:chain-permissions render` and the reference endpoint (N6), in the validator set (N7), the external endpoint refuses `admin_`, `perm_`, `qbft_`, `debug_`, `txpool_` and `eth_accounts` but answers `eth_blockNumber` / `net_version` (N8), `besu.toml` interfaces and permissioning flags (N9), clock against the latest block (N10). |
|
|
82
|
+
|
|
83
|
+
Addresses are only the ones you type; nothing is read from a file except the local RPC port in `besu.toml`. Loopback is
|
|
84
|
+
allowed by default (you check your own node, whose admin endpoint listens on 127.0.0.1 by design); other local / private
|
|
85
|
+
networks — RFC 1918, link-local (cloud metadata), CGNAT, ULA — need `--allow-private`, also after name resolution; plain http
|
|
86
|
+
only to loopback / private addresses; redirects are not followed. Declaration matching, block proposal, voting and account-permission checks
|
|
87
|
+
need operator rights and stay with the operator.
|
|
88
|
+
|
|
89
|
+
### Answers file (`init --from`)
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"role": "issuer",
|
|
94
|
+
"slug": "example-college",
|
|
95
|
+
"legal_name": "Example College",
|
|
96
|
+
"identifier": { "scheme": "TR-VKN", "value": "TR1234567890" },
|
|
97
|
+
"postal_address": { "street_address": "Example Street 1", "locality": "Istanbul", "country": "TR" },
|
|
98
|
+
"contact": { "support_uri": "https://example.edu.tr/support", "email": "info@example.edu.tr" },
|
|
99
|
+
"domain": "example.edu.tr",
|
|
100
|
+
"vcts": ["urn:tamga:edu:StudentCredential:1", "urn:tamga:edu:DiplomaCredential:1"],
|
|
101
|
+
"hosting": "hosted",
|
|
102
|
+
"identity_matching": { "privacy_policy_uri": "https://example.edu.tr/privacy/tamga" },
|
|
103
|
+
"lookup_url": "https://sis.example.edu.tr/tamga/lookup",
|
|
104
|
+
"isced_f_codes": ["0613"]
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`hosting: "own"` (your own issuing service) needs `issuer_url` and `status_list_base`. A verifier (`"role": "verifier"`) gives
|
|
109
|
+
`dns_name`, `service_description`, `is_public_sector_body` and `scopes` (purpose, credential type, the fewest fields, privacy
|
|
110
|
+
policy per use).
|
|
111
|
+
|
|
112
|
+
## MCP server
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{ "mcpServers": { "tamga-onboard": { "command": "npx", "args": ["-y", "-p", "@tamga-network/onboard", "tamga-onboard", "mcp"] } } }
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Before the first publish, from source: `"command": "npx", "args": ["tsx", "<repo>/packages/onboard/src/cli.ts", "mcp", "--root", "<folder>"]`.
|
|
119
|
+
|
|
120
|
+
Tools: `create_application`, `validate_application`, `generate_keys_and_csr`, `check_installation`, `check_listing`,
|
|
121
|
+
`sandbox_info`, and for a node `generate_node_key`, `create_node_declaration`, `check_node`. File access is limited to the server's root folder (`--root`, default the working directory), also after
|
|
122
|
+
symbolic links and junctions are resolved; private key content is never returned (only paths and public-key digests); a
|
|
123
|
+
passphrase is given only as the name of an environment variable starting with `TAMGA_`; root pins cannot be overridden and
|
|
124
|
+
local network addresses are never read; request addresses outside the institution's domain are flagged; check results mark
|
|
125
|
+
text read from the network as untrusted data. The node key is never returned and is never written to a synced folder over
|
|
126
|
+
MCP; `check_node` reaches loopback / private addresses only if their origin is listed in the server's
|
|
127
|
+
`TAMGA_ONBOARD_PRIVATE_NODES` environment variable (comma-separated, e.g. `http://127.0.0.1:8545`), public ones only over https.
|
|
128
|
+
|
|
129
|
+
## Security notes
|
|
130
|
+
|
|
131
|
+
- In production, generating the keys in an HSM or a remote signing service is preferred; then use `keys --inspect` on the CSR
|
|
132
|
+
it produces. Keys generated by this tool are software keys — keep them owner-only and backed up.
|
|
133
|
+
- The lookup endpoint is only probed with requests that must be refused; no record, real or invented, is involved.
|
|
134
|
+
- The trust list is read only over https and verified against embedded pins; nothing the network says is executed.
|
|
135
|
+
|
|
136
|
+
## Türkçe
|
|
137
|
+
|
|
138
|
+
Kurumun bilgi işlem ekibi için katılım aracı: başvuru dosyasını hazırlar ve kayıt kurallarıyla denetler, kurumun iki anahtarını
|
|
139
|
+
**kendi bilgisayarında** üretip operatöre gidecek CSR'ları yazar, kurulumu (alan adı, DNS teyidi, meta veri, sorgu ucu) ve
|
|
140
|
+
katıldıktan sonra güven listesindeki görünümü denetler. Ağa ve listeye yazmaz; kişi bilgisi sormaz ve yazmaz; özel anahtar
|
|
141
|
+
bilgisayardan çıkmaz. Sıra: `init` → `keys` → `check --report` → dosyaları operatöre gönder → kayıttan sonra `check --listing`.
|
|
142
|
+
Aynı işlemler `tamga-onboard mcp` ile yerel MCP sunucusu olarak da kullanılır.
|
|
143
|
+
|
|
144
|
+
**Devlet / işletmeci düğümü** (`tamga-onboard node`): `node init` düğüm anahtarını (secp256k1) düğümün kendi makinesinde üretir
|
|
145
|
+
(yalnız sahibine okunur, bulut eşitleme klasörüne yazılmaz, üzerine yazılmaz), enode açık anahtarını ve validator adresini
|
|
146
|
+
gösterir, `besu.toml` şablonunu yazar (izinli kip; RPC yalnız 127.0.0.1; P2P yalnız belirli iç arayüzde — 0.0.0.0 değil;
|
|
147
|
+
keşif kapalı). Genesis araçla üretilmez: işletmecilerden alınır, özeti en az iki işletmeciyle bant dışı karşılaştırılır.
|
|
148
|
+
`node declare` operatöre gidecek `tamga-node-declaration/1` bildirimini yazar (iletişim kurumun görev adresi; kişi adı yok).
|
|
149
|
+
`node check` çalışan düğümü yalnız okuyarak denetler: senkron ve aynı genesis, eşler, anahtar, izin listesi (çizimle ve
|
|
150
|
+
karşılaştırma ucuyla), validator kümesi, dış uçta yalnız eth/net/web3, yapılandırma, saat. Zincire, izin listesine, ağa yazmaz;
|
|
151
|
+
oy ve izin yükleme işletmecilerde kalır. MCP araçları: `generate_node_key`, `create_node_declaration`, `check_node`. Sandbox denemesi için başvuru gerekmez:
|
|
152
|
+
`tamga-onboard sandbox`. Paket npm'de `0.8.2` deneme sürümü olarak yayımlanmıştır (ilk sürüm):
|
|
153
|
+
`npm install -g @tamga-network/onboard` ya da `npx -p @tamga-network/onboard tamga-onboard --help`; Node.js 22 ve üstü.
|
|
154
|
+
|
|
155
|
+
Docs: https://docs.tamga.network · Source: https://github.com/tamga-network/tamga-network (packages/onboard) · Apache-2.0
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `tamga-onboard init` — kurumun yanıtlarından (etkileşimli ya da dosyadan) operatöre gidecek başvuru dosyalarını üretir:
|
|
3
|
+
* `<slug>.issuer.json` belge veren kaydı (kayıt aracının `trust:register issuer` girdisi)
|
|
4
|
+
* `<ad>.rp.json` doğrulayıcı kaydı ya da barındırılan kurumun kimlik eşleştirme kaydı (`trust:register rp`)
|
|
5
|
+
* `onboarding.json` kurumun yerel dosyası: rol, ortam, alan adı, sorgu ucu, ISCED-F kodları, anahtar adları
|
|
6
|
+
* Kişi bilgisi yok: yetkili adı, imza yetkilisi, personel sorulmaz; yanıtlarda bilinmeyen alan reddedilir. Kayıt kuralları `rules.ts`.
|
|
7
|
+
* ADR-0024 (kayıt verisi), ADR-0050 (kurum sertifikası), ADR-0057 (barındırılan servis), runbook §A.1 (kimlik eşleştirme kaydı).
|
|
8
|
+
*/
|
|
9
|
+
import type { Environment } from "./network.js";
|
|
10
|
+
type Rec = Record<string, any>;
|
|
11
|
+
export type Role = "issuer" | "verifier";
|
|
12
|
+
/** Kurumun yanıtları (`init --from <dosya>` biçimi). Kişi bilgisi alanı yoktur. */
|
|
13
|
+
export interface Answers {
|
|
14
|
+
role: Role;
|
|
15
|
+
/** Varsayılan `production` (sandbox'ta kurum "Kurumunu dene" ile test kurumu açar; başvuru dosyası gerekmez) */
|
|
16
|
+
environment?: Environment;
|
|
17
|
+
/** Kalıcı kısa ad (3–32 küçük harf, rakam, tire) — kamuya açıktır, operatörle birlikte seçilir */
|
|
18
|
+
slug: string;
|
|
19
|
+
legal_name: string;
|
|
20
|
+
trade_name?: string;
|
|
21
|
+
identifier: {
|
|
22
|
+
scheme: "TR-VKN" | "TR-MERSIS";
|
|
23
|
+
value: string;
|
|
24
|
+
};
|
|
25
|
+
postal_address: {
|
|
26
|
+
street_address: string;
|
|
27
|
+
locality?: string;
|
|
28
|
+
postal_code?: string;
|
|
29
|
+
country: string;
|
|
30
|
+
};
|
|
31
|
+
/** Destek adresi (https; erişim sertifikasına da yazılır) + kurumsal e-posta / telefon (kişisel değil) */
|
|
32
|
+
contact: {
|
|
33
|
+
support_uri: string;
|
|
34
|
+
email?: string;
|
|
35
|
+
phone?: string;
|
|
36
|
+
};
|
|
37
|
+
info_uri?: string;
|
|
38
|
+
/** Kurumun alan adı (DNS TXT teyidi bunun üzerinde) */
|
|
39
|
+
domain: string;
|
|
40
|
+
/** Verilmezse ülke TR ise KVKK */
|
|
41
|
+
supervisory_authority?: Rec;
|
|
42
|
+
category?: string;
|
|
43
|
+
class?: string;
|
|
44
|
+
assurance?: string;
|
|
45
|
+
assurance_basis?: string;
|
|
46
|
+
vcts?: string[];
|
|
47
|
+
/** `hosted` (Tamga'nın barındırılan servisi, imza kurumun uzaktan imza hizmetinde) · `own` (kurumun kendi servisi) */
|
|
48
|
+
hosting?: "hosted" | "own";
|
|
49
|
+
issuer_url?: string;
|
|
50
|
+
status_list_base?: string;
|
|
51
|
+
revocation_policy_uri?: string;
|
|
52
|
+
authentic_source?: {
|
|
53
|
+
name: string;
|
|
54
|
+
mode?: string;
|
|
55
|
+
};
|
|
56
|
+
/** Kurumun sorgu ucu (examples/05-institution-source); her kayıtta ISCED-F şart */
|
|
57
|
+
lookup_url?: string;
|
|
58
|
+
/** Kurumun program alan kodları (ISCED-F 2013, 4 hane) — biçim denetimi için; listeye girmez */
|
|
59
|
+
isced_f_codes?: string[];
|
|
60
|
+
/** Barındırılan kurumun kimlik eşleştirme kaydı (runbook §A.1): alan adı kurumun kendi alan adı altında */
|
|
61
|
+
identity_matching?: {
|
|
62
|
+
dns_name?: string;
|
|
63
|
+
privacy_policy_uri: string;
|
|
64
|
+
};
|
|
65
|
+
dns_name?: string;
|
|
66
|
+
service_description?: Record<string, string>;
|
|
67
|
+
is_public_sector_body?: boolean;
|
|
68
|
+
scopes?: Rec[];
|
|
69
|
+
pseudonyms?: "single" | "multiple";
|
|
70
|
+
}
|
|
71
|
+
export declare const KVKK: {
|
|
72
|
+
name: string;
|
|
73
|
+
country: string;
|
|
74
|
+
info_uri: string;
|
|
75
|
+
form_uri: string;
|
|
76
|
+
};
|
|
77
|
+
/** Kimlik eşleştirme kullanımı (barındırılan kurum; runbook §A.1) */
|
|
78
|
+
export declare const IDENTITY_VCT = "urn:tamga:id:IdentityAttestation:1";
|
|
79
|
+
export declare const IDENTITY_MATCHING_CLAIMS: string[];
|
|
80
|
+
export interface Profile {
|
|
81
|
+
tool: "@tamga-network/onboard";
|
|
82
|
+
format: 1;
|
|
83
|
+
role: Role;
|
|
84
|
+
environment: Environment;
|
|
85
|
+
slug: string;
|
|
86
|
+
domain: string;
|
|
87
|
+
hosting?: "hosted" | "own";
|
|
88
|
+
lookup_url?: string;
|
|
89
|
+
isced_f_codes?: string[];
|
|
90
|
+
applications: {
|
|
91
|
+
issuer?: string;
|
|
92
|
+
rp?: string;
|
|
93
|
+
};
|
|
94
|
+
/** Kurumun kendi ürettiği anahtarlar (özel anahtar yalnız kurumda) */
|
|
95
|
+
keys: Array<{
|
|
96
|
+
name: string;
|
|
97
|
+
purpose: "credential" | "status" | "access";
|
|
98
|
+
}>;
|
|
99
|
+
/** Anahtarını operatörün barındırılan servisi üreten kayıtlar (barındırılan kurumun kimlik eşleştirme erişim sertifikası) */
|
|
100
|
+
operator_keys?: string[];
|
|
101
|
+
/** Alan adı teyidi için operatörün verdiği tek kullanımlık değer (DNS TXT) — `check` arar */
|
|
102
|
+
dns_txt?: string;
|
|
103
|
+
}
|
|
104
|
+
export interface Built {
|
|
105
|
+
problems: string[];
|
|
106
|
+
warnings: string[];
|
|
107
|
+
issuer?: Rec;
|
|
108
|
+
rp?: Rec;
|
|
109
|
+
profile?: Profile;
|
|
110
|
+
}
|
|
111
|
+
/** Yanıtları denetler ve başvuru dosyalarını kurar. Hata varsa `problems` dolu döner (dosya yazılmamalı). */
|
|
112
|
+
export declare function buildApplications(a: Answers): Built;
|
|
113
|
+
/** Profil dosyasını (onboarding.json) denetler — elle düzenlenmişse bilinmeyen alan ya da bozuk değer kalmasın. */
|
|
114
|
+
export declare function validateProfile(p: Rec): string[];
|
|
115
|
+
export {};
|
|
116
|
+
//# sourceMappingURL=application.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../src/application.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKhD,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE/B,MAAM,MAAM,IAAI,GAAG,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