entitydb/README.md

73 lines
2.1 KiB
Markdown
Raw Permalink Normal View History

2021-06-02 20:44:19 +00:00
# entitydb
2021-06-02 20:52:15 +00:00
EntityDB holds all network allocations and associated information.
## Format
2021-07-09 12:57:43 +00:00
Every 'entity' has its data stored in a JSON file named as 'UNIQUE.json' where UNIQUE is any unique identifier (UUID/hash/name etc.).
2021-06-02 20:52:15 +00:00
2021-07-09 12:57:43 +00:00
### Content of entity (data)
2021-06-02 20:52:15 +00:00
2021-07-09 12:57:43 +00:00
The data should be a JSON object with a anonymous top-level object and "route" as only object. "route" should be a list of all routes provided by the entity with a required list of devices named "device".
2021-06-02 20:52:15 +00:00
2021-07-09 12:57:43 +00:00
"device" must contain at least one device that is reachable. A router is commonly used as the only object for the network as it is necessary in most setups.
2021-06-03 08:13:14 +00:00
Every device can contain the type of the device (router, generic, server), along with the list of services as "service". When no type is defined, generic is assumed.
2021-06-03 08:51:27 +00:00
2021-07-09 12:57:43 +00:00
Services must have a type (eg. tcp, udp, http, rsync, git) and at least one endpoint in the endpoints list.
2021-06-03 08:51:27 +00:00
2021-07-09 12:57:43 +00:00
Every object may contain a optional description, except lists.
2021-06-03 08:14:09 +00:00
2021-07-09 12:57:43 +00:00
Descriptions should not be used other than for describing things in a human-readable form.
2021-06-03 08:14:09 +00:00
2021-07-09 12:57:43 +00:00
### Example
2021-06-03 08:14:09 +00:00
2021-07-09 12:57:43 +00:00
Here's a example that you may modify to your needs.
```json
{
2021-07-09 12:58:38 +00:00
"route": [
"fdaa:bbcc:ddee::/48": {
"description": "My home network",
"device": [
"fdaa:bbcc:ddee::1": {
"type": "router",
2021-07-09 12:58:38 +00:00
"description": "My custom router running BIRD",
},
"fdaa:bbcc:ddee::5": {
2021-07-09 12:58:38 +00:00
"description": "Electronic mail endpoint",
"service": [
{
"type": "smtp",
"endpoint": [
{ "port": 25 }
]
},
{
"description": "Super-secret authentication gateway",
"type": "kerberos",
"endpoint": [
{ "port": 89 }
]
},
{
"type": "imap",
"endpoint": [
{ "port": 143 }
]
}
]
}
]
},
"fdcc:ba11:b00b::/48": {
"device": [
"fdcc:ba11:b00b::1": {
"type": "router",
}
2021-07-09 12:58:38 +00:00
]
}
]
2021-07-09 12:57:43 +00:00
}
2021-06-03 15:21:24 +00:00
```