All Projects → krombel → matrix-register-bot

krombel / matrix-register-bot

Licence: Apache-2.0 License
Bot that offers two step registrations to a matrix-synapse server

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to matrix-register-bot

matrix-chart
Helm chart for deploying a Matrix homeserver stack
Stars: ✭ 83 (+232%)
Mutual labels:  matrix, synapse
matrix-synapse-rest-password-provider
Password Provider for Synapse fetching data from a REST endpoint
Stars: ✭ 35 (+40%)
Mutual labels:  matrix, synapse
matrix-registration
a token based matrix registration api
Stars: ✭ 182 (+628%)
Mutual labels:  matrix, registration
combining3Dmorphablemodels
Project Page of Combining 3D Morphable Models: A Large scale Face-and-Head Model - [CVPR 2019]
Stars: ✭ 80 (+220%)
Mutual labels:  matrix, registration
synadm
Command line admin tool for Synapse (Matrix reference homeserver)
Stars: ✭ 93 (+272%)
Mutual labels:  matrix, synapse
matrix-puppet-facebook
a puppetted facebook bridge
Stars: ✭ 90 (+260%)
Mutual labels:  matrix
numerl
Small matrix library for Erlang.
Stars: ✭ 22 (-12%)
Mutual labels:  matrix
login-signup-form
A login and signup form using HTML, PHP, and MySQL. This form allows users to register and login. All information is stored in a MySQL database. After successful login the user is redirected to their dashboard. Project Website:
Stars: ✭ 40 (+60%)
Mutual labels:  registration
alvito
Alvito - An Algorithm Visualization Tool for Python
Stars: ✭ 52 (+108%)
Mutual labels:  matrix
journal
a blogging platform built on [matrix]
Stars: ✭ 71 (+184%)
Mutual labels:  matrix
ph-commons
Java 1.8+ Library with tons of utility classes required in all projects
Stars: ✭ 23 (-8%)
Mutual labels:  matrix
BrainPrep
Preprocessing pipeline on Brain MR Images through FSL and ANTs, including registration, skull-stripping, bias field correction, enhancement and segmentation.
Stars: ✭ 107 (+328%)
Mutual labels:  registration
axon
The synapse TUI client
Stars: ✭ 40 (+60%)
Mutual labels:  synapse
CovGT-3DRegistration-matlab
A 3D Scene Registration Method via Covariance Descriptors and an Evolutionary Stable Strategy Game Theory Solver
Stars: ✭ 20 (-20%)
Mutual labels:  registration
rust-synapse-compress-state
A tool to compress some state in a Synapse instance's database
Stars: ✭ 69 (+176%)
Mutual labels:  synapse
simple-matrix-bot-lib
An easy to use bot library for the Matrix ecosystem written in Python. https://matrix.to/#/#simplematrixbotlib:matrix.org
Stars: ✭ 27 (+8%)
Mutual labels:  matrix
canvas-cast
Cast any <canvas> element to an LED Matrix over WebSockets with an Arduino/ESP8266.
Stars: ✭ 39 (+56%)
Mutual labels:  matrix
python-twelve-tone
🎶 12-tone matrix to generate dodecaphonic melodies 🎶
Stars: ✭ 68 (+172%)
Mutual labels:  matrix
reactjs-login-register-crud
ReactJS CRUD Application, ReactJS FileUpload, ReactJS Sample application, ReactJS Boilerplate, ReactJS Login, ReactJS FileUpload, ReactJS Register
Stars: ✭ 47 (+88%)
Mutual labels:  registration
Synapse
An SCP:SL Modloader. Designed from Scratch with Harmony
Stars: ✭ 29 (+16%)
Mutual labels:  synapse

matrix-register-bot

state: alpha #matrix-register-bot:msg-net.de

This bot provides a two-step-registration for matrix (synapse).

This is done in several steps:

  • potential new user registers on a bot-provided site
  • user has to verify its mail address
  • bot sends a message to predefined room with a registration notification.
  • users in that room now can approve or decline the registration.
  • When approved
    • the bot creates short time credentials
    • sends them to the user
    • stores them encrypted in own databas or uses that as initial password for registration

There are two operation modes available:

  • operationMode=synapse
  • operationMode=local:
    • Bot handles user management. Therefore it stores the user-data and uses matrix-synapse-rest-auth to authenticate the users.
    • This way it is possible to set the display name of a user on first login (first- and lastname instead of username)
    • The email address of the user can be used to implement third party lookup (requires mxisd)
    • search for users you have not seen yet but are available on the server

Requirements

  • Working PHP environment with
    • database connection provider [one of sqlite, mysql, postgres]
    • curl extension
    • mail capability to interact with the users (verification, approval (+ initial password), notifications)
      • either via sendmail or with credentials
  • composer installed
  • matrix-synapse-rest-auth when using operationMode=local

How to install

git clone https://github.com/krombel/matrix-register-bot
cd matrix-register-bot
composer install
cp config.sample.php config.php
editor config.php
  • Configure your webserver to have the folder public accessible via web.

When running operationMode=local:

  • Configure your webserver to provide the folder internal internally. This is only meant to be accessible by mxisd and matrix-synapse-rest-auth
  • To integrate with matrix-synapse-rest-auth:
    • /_matrix-internal/identity/v1/check_credentials should map to internal/login.php
  • To integrate with mxisd: Have a look at the docs of mxisd and apply as follows:
Key file which handles that Description
rest.endpoints.auth internal/login.php Validate credentials and get user profile
rest.endpoints.directory internal/directory_search.php Search for users by arbitrary input
rest.endpoints.identity.single internal/identity_single.php Endpoint to query a single 3PID
rest.endpoints.identity.bulk internal/identity_bulk.php Endpoint to query a list of 3PID

Further notes:

Security: Passwords from registration form are stored in clear text

Currently the passwords which are typed in while capturing the register request are stored in clear text. The bot needs to access them to trigger a register request with correct credentials. It is currently strongly recommended to set "getPasswordOnRegistration" => false in your config! This leads to autocreating passwords which will then be send to the users directly without storing it.

Use the ChangePasswortInterceptor (if operationMode=local)

To allow users to change their pasword you need a reverse proxy which maps /_matrix/client/r0/account/password to internal/intercept_change_password.php. Here is an example for nginx:

        location /_matrix/client/r0/account/password {
                proxy_pass http://localhost/mxbot/internal/intercept_change_password.php;
                proxy_set_header X-Forwarded-For $remote_addr;
        }

The bot postpones some actions

There is a cron.php which implements retries and database cleanups (e.g. to remove a username claim) For this run cron.php regularly with your system of choice. A suggested interval is once per day

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].