Added: Config Folder

This commit is contained in:
TheJoKlLa 2021-09-21 16:35:21 +02:00
parent 3f3ba27ac9
commit fb03ba6e5b
6 changed files with 83 additions and 1 deletions

48
config/bffh/bffh.dhall Normal file
View File

@ -0,0 +1,48 @@
-- { actor_connections = [] : List { _1 : Text, _2 : Text }
{ actor_connections = [{ _1 = "Testmachine", _2 = "Actor" }]
, actors =
{ Actor = { module = "Shelly", params = {=} }
}
, init_connections = [] : List { _1 : Text, _2 : Text }
--, init_connections = [{ _1 = "Initiator", _2 = "Testmachine" }]
, initiators =
{ Initiator = { module = "Dummy", params = {=} }
}
, listens =
[ { address = "::", port = Some 59661 }
]
, machines =
{ Testmachine =
{ description = Some "A test machine"
, disclose = "lab.test.read"
, manage = "lab.test.admin"
, name = "Testmachine"
, read = "lab.test.read"
, write = "lab.test.write"
},
Another =
{ description = Some "Another test machine"
, disclose = "lab.test.read"
, manage = "lab.test.admin"
, name = "Another"
, read = "lab.test.read"
, write = "lab.test.write"
},
Yetmore =
{ description = Some "Yet more test machines"
, disclose = "lab.test.read"
, manage = "lab.test.admin"
, name = "Yetmore"
, read = "lab.test.read"
, write = "lab.test.write"
}
}
, mqtt_url = "tcp://mqtt:1883"
, db_path = "/tmp/bffh"
, roles =
{ Testrole =
{ parents = [] : List Text
, permissions = [] : List Text
}
}
}

1
config/bffh/pass.toml Normal file
View File

@ -0,0 +1 @@
Testuser = "secret"

19
config/bffh/roles.toml Normal file
View File

@ -0,0 +1,19 @@
[anotherrole]
[testrole]
permissions = [
"lab.test.*"
]
[somerole]
parents = ["testparent/lmdb"]
permissions = [
"lab.some.admin"
]
[testparent]
permissions = [
"lab.some.write",
"lab.some.read",
"lab.some.disclose",
]

11
config/bffh/users.toml Normal file
View File

@ -0,0 +1,11 @@
[Testuser]
# Define them in roles.toml as well
roles = ["somerole/lmdb", "testrole/lmdb"]
# If two or more users want to use the same machine at once the higher prio
# wins
priority = 0
# You can add whatever random data you want.
# It will get stored in the `kv` field in UserData.
noot = "noot!"

View File

@ -0,0 +1,3 @@
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log

View File

@ -17,4 +17,4 @@ services:
ports: ports:
- "1883:1883" - "1883:1883"
volumes: volumes:
- "./config/mosquitto:/mosquitto/config" - "./config/mosquitto:/mosquitto/config/"