|
3 years ago | |
---|---|---|
.gitignore | 5 years ago | |
LICENSE | 6 years ago | |
README.md | 3 years ago | |
auth.toml | 5 years ago | |
lcmlog-server | 3 years ago | |
lcmlog-server-utils | 5 years ago |
Server side of a tool for reading and writing the lcm staff logs.
lcmlog-server
: main scriptlcmlog-server-utils
: utility scriptThe first line is always the name of the method and can be only GET
, POST
or UPDATE
.
The GET
method is used to print all the logs that meet the required criteria.
The POST
method is used to add a log to the database.
The UPDATE
method is used to regenerate the internal server database.
It should only be called if a log file is added by hand, or if some of the log files get renamed or corrupted.
It assumes that all the log files are correctly formatted.
There are four authentication groups with the following privileges:
GET 150
, GET Admin
and POST 150
.GET 150
, GET Admin
, POST 150
, POST Admin
and UPDATE
.GET 150
, GET Admin
and POST Admin
.GET 150
and GET Admin
.The default directory is /var/local/log/lcmlog-data
.
Initialize the environment using lcmlog-server-utils -i
. The structure is:
auth
auth.toml
150
Admin
Nirvana
Valhalla
data
.data
logs
logfile
Edit files in auth
folder for add users in a group. The format of a row is:
UID username
Authentication for read/write is based upon the access control list. To update ACL after every changes in the auth
folder, use lcmlog-server-utils -u
.
You can lookup authorizations using lcmlog-server-utils -l
.
You can change authorizations by editing files in auth
folder and then using lcmlog-server-utils -u
to update ACL.
You can change the default privileges of an authentication groups by editing the auth/auth.toml
file:
["example-group"]
auth=["priv-1","priv-2",...]
The available privileges are: GET 150
, GET Admin
, POST 150
, POST Admin
and UPDATE
. No further action is needed after editing this file.