No Description

Paolo Galli b7c5579a2f Implemented new authorization using toml 5 years ago
.gitignore 151e2b84b2 Update .gitignore 5 years ago
LICENSE d490516589 Initial commit 5 years ago
README.md 461dd65682 Update 5 years ago
auth.toml b7c5579a2f Implemented new authorization using toml 5 years ago
lcmlog-server b7c5579a2f Implemented new authorization using toml 5 years ago
lcmlog-server-utils a89de32f22 Added toml file 5 years ago

README.md

lcmlog-server

Server side of a tool for reading and writing the lcm staff logs. The program doesn't accept any command line options.

For the test session, only the account log can access.

The two kind of logs

Admins and 150 logs.

To do

The authentication process

In the script directory there is a folder named auth that contain the following files:

  • UPDATE
  • 150/
    • GET
    • POST
  • Admin/
    • GET
    • POST

Every file contains the list of the uid of the users that can send and request logs and update the database. If you want to add a new user, you have to add his uid in these files.

Manage the authentication process: lcmlog-auth-utils

The script lcmlog-auth-utils can help to manage this authentication process. It offers two options:

  • authinit: called with the -i option, it makes the initialization of the auth folder structure.
  • authlookup: called with the -l option, show you who is now authorized using getent.

The three methods

The first line is always the name of the method and can be only GET, POST or UPDATE.

GET

The GET method is used to print all the logs that meet the required criteria.

  • The second line of the input is the kind of the log to search for (see below), and it is the only mandatory parameter.
  • The third line is the date: only logs whose date contains the searched for date are printed. The format for the date has not been decided yet, so currently any string can be inserted here.
  • The fourth line is a list of comma separated tags to search for.
  • The fifth line is the name of the user to search for.

POST

The POST method is used to add a log to the database.

  • The second line of the input is the kind (se below).
  • The third one is the date.
  • The fourth one is a list of comma separated tags.
  • The remainder of the file (until EOF is met) is the content of the log.

UPDATE

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.

The format of the log files

To do