Mercurial > prosody-modules
annotate mod_csi_muc_priorities/README.markdown @ 5193:2bb29ece216b
mod_http_oauth2: Implement stateless dynamic client registration
Replaces previous explicit registration that required either the
additional module mod_adhoc_oauth2_client or manually editing the
database. That method was enough to have something to test with, but
would not probably not scale easily.
Dynamic client registration allows creating clients on the fly, which
may be even easier in theory.
In order to not allow basically unauthenticated writes to the database,
we implement a stateless model here.
per_host_key := HMAC(config -> oauth2_registration_key, hostname)
client_id := JWT { client metadata } signed with per_host_key
client_secret := HMAC(per_host_key, client_id)
This should ensure everything we need to know is part of the client_id,
allowing redirects etc to be validated, and the client_secret can be
validated with only the client_id and the per_host_key.
A nonce injected into the client_id JWT should ensure nobody can submit
the same client metadata and retrieve the same client_secret
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 03 Mar 2023 21:14:19 +0100 |
parents | 562d3b219876 |
children |
rev | line source |
---|---|
3545
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 # Introduction |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 This module lets users specify which of the group chats they are in are |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 less important. This influences when |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 [mod_csi_simple][doc:modules:mod_csi_simple] decides to send |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 stanzas vs waiting until there is more to send. Users in many large |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 public channels might benefit from this. |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 # Configuration |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 The module is configured via ad-hoc an command called *Configure group |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 chat priorities* that should appear in the menus of compatible clients. |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 The command presents a form that accepts a list of XMPP addresses. |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 Currently there is a single priority, *Lower priority*, which is |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 suitable for e.g. noisy public channels. mod_csi_simple considers |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 groupchat messages important by default on the assumptions that smaller |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 and more important private chats are more common among most users. |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 A message of type groupchat from an address in this list will not be |
c1d7e6752d18
mod_csi_muc_priorities: Add a README
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
21 considered important enough to send it to an inactive client, unless it |
3638
6f3e878537f4
mod_csi_muc_priorities: Mention mod_track_muc_joins
Kim Alvefur <zash@zash.se>
parents:
3545
diff
changeset
|
22 is from the current user or mentions of their nickname. **Note** that |
6f3e878537f4
mod_csi_muc_priorities: Mention mod_track_muc_joins
Kim Alvefur <zash@zash.se>
parents:
3545
diff
changeset
|
23 mention support require the separate module [mod_track_muc_joins] |
6f3e878537f4
mod_csi_muc_priorities: Mention mod_track_muc_joins
Kim Alvefur <zash@zash.se>
parents:
3545
diff
changeset
|
24 to also be loaded. |
3639
562d3b219876
mod_csi_muc_priorities: Add an example
Kim Alvefur <zash@zash.se>
parents:
3638
diff
changeset
|
25 |
562d3b219876
mod_csi_muc_priorities: Add an example
Kim Alvefur <zash@zash.se>
parents:
3638
diff
changeset
|
26 ``` {.lua} |
562d3b219876
mod_csi_muc_priorities: Add an example
Kim Alvefur <zash@zash.se>
parents:
3638
diff
changeset
|
27 modules_enabled = { |
562d3b219876
mod_csi_muc_priorities: Add an example
Kim Alvefur <zash@zash.se>
parents:
3638
diff
changeset
|
28 -- other modules etc |
562d3b219876
mod_csi_muc_priorities: Add an example
Kim Alvefur <zash@zash.se>
parents:
3638
diff
changeset
|
29 |
562d3b219876
mod_csi_muc_priorities: Add an example
Kim Alvefur <zash@zash.se>
parents:
3638
diff
changeset
|
30 "csi_simple", |
562d3b219876
mod_csi_muc_priorities: Add an example
Kim Alvefur <zash@zash.se>
parents:
3638
diff
changeset
|
31 "csi_muc_priorities", |
562d3b219876
mod_csi_muc_priorities: Add an example
Kim Alvefur <zash@zash.se>
parents:
3638
diff
changeset
|
32 "track_muc_joins", -- optional |
562d3b219876
mod_csi_muc_priorities: Add an example
Kim Alvefur <zash@zash.se>
parents:
3638
diff
changeset
|
33 } |
562d3b219876
mod_csi_muc_priorities: Add an example
Kim Alvefur <zash@zash.se>
parents:
3638
diff
changeset
|
34 ``` |