!NPRUEisLjcaMtHIzDr:kamax.io

mxisd

259 Members
Federated Matrix Identity Server | https://github.com/kamax-io/mxisd | Version: 0.8.2 | Dev discussions: #mxisd-dev:kamax.io | Related: #matrix-identity:matrix.org104 Servers

Load older messages


SenderMessageTime
31 May 2019
@yogsi:matrix.orgyogsioh cr*p12:49:33
@yogsi:matrix.orgyogsi synapseSql:
profile:
enabled: true
role:
query: "SELECT split_part(address,'@',2) FROM user_threepids WHERE user_id = ?"
12:51:10
@yogsi:matrix.orgyogsioh well, do the identing work by yourself :)12:52:31
@max:kamax.ioMaximusgood job adapting it to your needs12:54:25
@yogsi:matrix.orgyogsithis way I managed to restrict invites only to users with DOMAIN.com in their email address12:54:33
@max:kamax.ioMaximus by default it's mapped to communities in the synapse identity store 12:54:40
@max:kamax.ioMaximuscan I take your example to include it into the docs?12:55:10
@yogsi:matrix.orgyogsisure12:55:20
@max:kamax.ioMaximusty!12:55:29
1 Jun 2019
@nimogit:matrix.orgnimogit hello,
I'm trying to to limit registration to a certain using email as 3pid, but it seems that either synapse or mxisd are not respecting the config rules
can mxisd bypass matrix 3pid's rules?

here is the portion related the synapse homeserver.yaml config file
registrations_require_3pid:
- email
allowed_local_3pids:
- medium: email
pattern: '.*@x\.y\.z'



register:
policy:
threepid:
email:
domain:
whitelist:
- '.*@x.y.z'
blacklist:
- '.*@gmail.com'

17:22:16
@nimogit:matrix.orgnimogit and here is the part of mxisd config

register:
policy:
threepid:
email:
domain:
whitelist:
- '.*@x.y.z'
blacklist:
- '.*@gmail.com'


17:23:14
@nimogit:matrix.orgnimogitsorry for the mistake, the only part related to matrix is the following registrations_require_3pid:  - email  allowed_local_3pids:  - medium: email  pattern: '.*@x\.y\.z'  17:23:59
@max:kamax.ioMaximus Can't advise on synapse in terms of patterns, but the syntax you use for mxisd is wrong. See the docs for the right one 17:24:01
@nimogit:matrix.orgnimogitah! so its the @ before the x.y.z?17:26:26
@max:kamax.ioMaximus the policy is about domains, so what is on the right of/after the @ 17:26:58
@nimogit:matrix.orgnimogiti tried that, i also removed the black list, but i'm still able to register for valid email outside of x.y.z maybe i need to dig into synpase config more17:53:30
@max:kamax.ioMaximus nimogit: After you've made sure you followed the setup steps, including the reverse proxy), and double-checked that they work, please provide the relevant mxisd logs and I can have a look. You can send them in a DM so you don't have to redact/hide emails in them 17:55:36
@nimogit:matrix.orgnimogitDownload log.txt18:10:33
@nimogit:matrix.orgnimogiti'm actually using the dev version, so this the log from the terminal after running mxisd and trying to register with an email from outside x.y.z 18:10:36
@max:kamax.ioMaximusthe reverse proxy config seems incorrect, the endpoint is not redirected to mxisd18:11:35
@nimogit:matrix.orgnimogit location /_matrix/identity { proxy_pass http://localhost:8090/_matrix/identity; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; } this is the part of mxisd18:14:13
@max:kamax.ioMaximusyou're not reading the docs for the feature then, there is a specific section for reverse proxy config18:14:53
@nimogit:matrix.orgnimogitis there anything wrong about?18:14:58
@nimogit:matrix.orgnimogitoh, i'm sorry, i thought i did go through the docs I will visit them again, but the weird part is that if i stop mxisd, the whole registration/invitation/etc (federation) process is stopped18:17:35
@max:kamax.ioMaximusgiven that mxisd is the one dealing with a mandatory step in those, yes it's expected for them to fail if mxisd is not running18:18:39
@nimogit:matrix.orgnimogit sorry i missed to mention the other parts in my reverse proxy config

below is the full config file with the synapse part

location /_matrix/identity {
proxy_pass http://localhost:8090/_matrix/identity;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}


location ^/_matrix/client/r0/register/[^/]/?$ {
proxy_pass http://localhost:8090;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}

location ~* ^/_matrix/client/r0/rooms/([^/]+)/invite$ {
proxy_pass http://localhost:8090;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}

location /_matrix/client/r0/user_directory {
proxy_pass http://localhost:8090/_matrix/client/r0/user_directory;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}

location /_matrix {
proxy_pass http://localhost:8008;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
18:22:13
@max:kamax.ioMaximus

the reverse proxy config seems incorrect, the endpoint is not redirected to mxisd

still true

18:24:03
@max:kamax.ioMaximus the location line is invalid for register 18:24:29
@nimogit:matrix.orgnimogitindeed, that was the problem thank you so much18:31:59
@nimogit:matrix.orgnimogiti replaced location ^/_matrix/client/r0/register/[^/]/?$ { by location ~* ^/_matrix/client/r0/register/[^/]+/requestToken$18:32:33

Show newer messages


Back to Room ListRoom Version: