A Diaspora* auth provider for Synapse
Project description
A diaspora authenticator for matrix synapse.
Installation
This package is easy to install from pypi:
Just run this command to install:
pip install synapse-diaspora-auth
Alternatively, to install from git:
pip install git+https://git.fosscommunity.in/necessary129/synapse-diaspora-auth.git
Configuration
In your homeserver.yaml file, the password_providers directive should look like this:
password_providers:
- module: "diaspora_auth_provider.DiasporaAuthProvider"
config:
pepper: <pepper>
database:
engine: <db engine>
name: "<database>"
username: <db_user>
password: <db_password>
host: "127.0.0.1"
port: <port>
You should get pepper from <DIASPORA_HOME>/database.yaml or from <DIASPORA_HOME>/initializers/devise.rb as config.pepper.
the engine should either be mysql or postgres
The port is usually 5432 for PostgreSQL and 3306 for MariaDB/MySQL
Database
synapse-diaspora-auth currently supports MySQL and PostgreSQL as the database engines.
PostgreSQL
It is recommended to create a seperate user for synapse in the postgres database, with read-only access to <database>.
To do that, first login to postgres as the root user:
sudo -u postgres psql <database>
then, run these commands:
CREATE user <db_user> WITH password '<db_password>';
GRANT CONNECT ON DATABASE <database> TO <db_user>;
GRANT SELECT ON users TO <db_user>;
MySQL
The commands are almost the same in MySQL:
login to MySQL as root:
sudo mysql -u root
Then run these queries:
CREATE user '<db_user>'@'localhost' WITH password '<db_password>';
GRANT SELECT ON <database>.users TO '<db_user>'@'localhost';
And you will be good to go!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for synapse_diaspora_auth-0.0.4-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 093a6668f55d3b29adb5f9183417e8926d306b5db2d885fd844ad61219d6cafa |
|
MD5 | a212f4f51483f3c95c7119afa35ca1d4 |
|
BLAKE2b-256 | 0f355cb6f1a64f627a1deb0c6e8d17c4a37323c2ef2947a77ee6e77da258bfee |