Configuration example and README update.

This commit is contained in:
Stanislav Nikitin 2019-09-08 00:21:15 +05:00
parent f5c005e20c
commit c30906ba8c
No known key found for this signature in database
GPG Key ID: 106900B32F8192EE
2 changed files with 34 additions and 2 deletions

View File

@ -12,8 +12,34 @@ Right now authentication provider is able to connect only to PostgreSQL database
## Installation ## Installation
*TBW* Right now you can build it yourself by using ``go get``:
```bash
go get -u -v develop.pztrn.name/pztrn/inn2-fudforum-auth
```
Binary will be placed in ``$GOPATH/bin``. Use [this configuration example](/inn2-fudforum-auth.dist.yaml) as example and tune it.
## Configuration ## Configuration
*TBW* ### Provider
See [this configuration example](/inn2-fudforum-auth.dist.yaml), it has comments for each section.
Don't forget to define default group and other groups your INN2 is using in ``readers.conf``!
### INN2
INN2 authentication uses ``auth`` and ``access`` blocks, first for authentication and second for authorization. We should define them both for each users group. Example for ``admin`` group from configuration example:
```text
auth admin {
hosts: *
auth: /usr/local/bin/inn2-fudforum-auth -config /etc/news/inn2-fudforum-auth.yaml
}
access admin {
users: "*@admin"
newsgroups: *
}
```

View File

@ -20,6 +20,12 @@ groups:
default: "regular" default: "regular"
# Groups to users mapping. # Groups to users mapping.
# This is a list of structures. Example "admin" group included. # This is a list of structures. Example "admin" group included.
# Group name from "group" parameter will be added to user as INN2 wants
# only on successful authentications. In this example this string will
# be returned to INN2:
#
# User:localadmin@admin
#
groups: groups:
- group: "admin" - group: "admin"
# This is a list of users. # This is a list of users.