summaryrefslogtreecommitdiff
path: root/README
blob: b66db6341540356c2444d18b714aa5b579e61052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
distixapi - an online API to a distix repository
=============================================================================

Introduction
-----------------------------------------------------------------------------

distix is a distributed ticketing system based on email and git.
distixapi is (or will be) an HTTP based RESTful API to a distix ticket
repository, on top of which an interactive web application for
reading, managing tickets can be built.

distixapi is pre-ALPHA quality at this time. The only API endpoint
that works is `/version`.


Setup/installation
-----------------------------------------------------------------------------

Install from a Debian package, or start from the command line:

    ./distix-backend --port=8080 --log distix-backend.log --user-file=users.yaml

API users are listed in the "users file", which is in YAML and lookd
like this:

    users:
        liw:
            salt: nacl
            password: ....
            scopes: [get, put]

Above, "liw" is the name of the user, "salt" is a random string for
"salting" the password for that user (should be long and different for
each user), "password" is the encrypted password, and "scopes" should
be the HTTP methods the user is allowed to use (one or both of get and
put).

The password encryption can be done with the `distixapi-encpw`
utility:

    ./distixapi-encpw nacl:clrtxtpw

Here, "nacl" is the salt and should be the same as the salt in the
users file. "clrtxtpw" is the password in cleartext. The output is the
encrypted password.

If installed from a Debian package, the users file is in
`/etc/distix-backend/users.yaml`, unless the default configuration
file has been changed. If you change the users file, you need to
restart the server.


Hacking
-----------------------------------------------------------------------------

distix is written in Python 2 (do not ask for Python 3, it will happen
when it happens).

There are no unit tests yet.

There are some integration tests written for the controller's HTTP
API. To run them, run `./check`. You may add any command line
parameters than `yarn` accepts.


Legalese
-----------------------------------------------------------------------------

While distixapi itself is under the AGPL3+ license (see below), this
license does NOT apply to clients of the HTTP API it provides.

Copyright 2017  Lars Wirzenius

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.