aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 3a2e3824591b6e5653ba8b16722ba7bbb059db64 (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
Juan de la Cosa
===============

HTTP server for managing [MariaDB](http://mariadb.org/) users.
Designed to work behind [Sproxy](http://hackage.haskell.org/package/sproxy2)
with users' logins being their email addresses
(MariaDB allows up to 80 characters).

Currently it only lets users reset their passwords.

Requirements
============
Juan de la Cosa is written in Haskell with [GHC](http://www.haskell.org/ghc/).
All required Haskell libraries are listed in [juandelacosa.cabal](juandelacosa.cabal).
Use [cabal-install](http://www.haskell.org/haskellwiki/Cabal-Install)
to fetch and build all pre-requisites automatically.


Usage
=====
Type `juandelacosa --help` to see usage summary:

    Usage: juandelacosa [-f|--file FILE] [-g|--group STRING] [-d|--datadir DIR]
                        [(-p|--port INT) | (-s|--socket PATH)]

    Available options:
      -f,--file FILE           Read this MySQL client config file
      -g,--group STRING        Read this options group in the above file
                               (default: "client")
      -d,--datadir DIR         Data directory including static files
                               (default: "...")
      -p,--port INT            listen on this TCP port (localhost only)
      -s,--socket PATH         Listen on this UNIX-socket
                               (default: "/tmp/juandelacosa.sock")
      -h,--help                Show this help text


Database Privileges
===================

```sql
CREATE USER IF NOT EXISTS 'juandelacosa'@'localhost' IDENTIFIED VIA unix_socket;
REVOKE ALL, GRANT OPTION FROM 'juandelacosa'@'localhost';
GRANT UPDATE ON `mysql`.* TO 'juandelacosa'@'localhost';
GRANT SELECT ON `mysql`.`user` TO 'juandelacosa'@'localhost';
```

Screenshots
===========
![Reset Password](./screenshots/resetpassword.png)
![Password Changed](./screenshots/passwordchanged.png)
![No Account](./screenshots/noaccout.png)