restauth-service

restauth-service may be used to manage services that connect to RestAuth. A service is a system that wants to use RestAuth to store users, preferences and groups.

RestAuth stores a name (which may not include a ‘:’) and a password that identify the service. A service additionally has zero or more IPv4 or IPv6 addresses associated with it, a service can only authenticate from the given adresses.

Usage

restauth-service [-h] {add,ls,rm,view,set-hosts,set-password} ...

Use one of the commands (either add, view, ls, set-hosts, set-password or rm) to perform the respective operation. Each command usually requires more arguments to it, see the respective section for arguments (and possible options) for each command.

Getting runtime help

To get an authoritative list of available commands, use:

restauth-service --help

If you want more information on a specific comannd, do:

restauth-service command --help

... or see the Available commands section below.

Examples

restauth-service add example.com
Add the service example.com and prompt for a password.
restauth-service add --gen-password example.com 127.0.0.1 ::1
Add the service example.com and associate 127.0.0.1 and ::1 with it. Also generate a password and print it to stdout, so it can be used for configuration of the actual service
restauth-service ls
List all available services.
restauth-service view example.com
View all details of the service example.com.
restauth-service set-password --password=foobar example.com
Set the password of the service example.com (which must already exist) to foobar.
restauth-service set-hosts example.com 192.168.0.1 192.168.0.2
Enable the service example.com for the hosts 192.168.0.1 192.168.0.2. Note that this removes any previously configured hosts.
restauth-service remove example.com
Remove the service example.com from RestAuth. This will also remove any groups defined for the service, see restauth-groups(1).

Available commands

The following subsections never document the ‘-h’ parameter for clarity.

add

add [-h] [--password PWD | --gen-password] SERVICE [HOST [HOST ...]]

Add a new service.

--password PWD

The password to use.

--gen-password

Generate a password and print it to stdout.

SERVICE

The name of the service.

[HOST [HOST ...]]

A host that the service is able to connect from. You can name multiple hosts as additional positional arguments. If ommitted, this service cannot be used from anywhere.

ls

ls [-h]
List all available services.

rm

rm [-h] SERVICE

Completely remove a service. This will also remove any groups associated with that service.

SERVICE

The name of the service.

set-hosts

set-hosts [-h] SERVICE [HOST [HOST ...]]

Set hosts that a service can connect from.

SERVICE

The name of the service.

[HOST [HOST ...]]

A host that the service is able to connect from. You can name multiple hosts as additional positional arguments. If ommitted, this service cannot be used from anywhere.

set-password

set-password [-h] [--password PWD | --gen-password] SERVICE

Set the password for a service.

--password PWD

The password to use.

--gen-password

Generate a password and print it to stdout.

SERVICE

The name of the service.

view

view [-h] SERVICE

View details of a service.

SERVICE

The name of the service.

Influential environment variables

DJANGO_SETTINGS_MODULE

The path to the Django settings module. If not set, RestAuth.settings is used, which should be fine in most cases. For more information, please read the Django documentation.

PYTHONPATH

A semi-colon (‘;’) seperated list of additional directories to search for python modules. The RestAuth installation must be in the module search path for any commands to work. For more information, please read the official python documentation.

Table Of Contents

Previous topic

Database replication

Next topic

restauth-user

This Page