Configuration example and README update.

Stanislav Nikitin 4 years ago
parent f5c005e20c
commit c30906ba8c
No known key found for this signature in database
GPG Key ID: 106900B32F8192EE

@ -12,8 +12,34 @@ Right now authentication provider is able to connect only to PostgreSQL database
## Installation
Right now you can build it yourself by using ``go get``:
go get -u -v
Binary will be placed in ``$GOPATH/bin``. Use [this configuration example](/inn2-fudforum-auth.dist.yaml) as example and tune it.
## Configuration
### 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:
auth admin {
hosts: *
auth: /usr/local/bin/inn2-fudforum-auth -config /etc/news/inn2-fudforum-auth.yaml
access admin {
users: "*@admin"
newsgroups: *

@ -20,6 +20,12 @@ groups:
default: "regular"
# Groups to users mapping.
# 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
- group: "admin"
# This is a list of users.