Mercurial > prosody-modules
annotate mod_http_host_status_check/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 | 2a16a6c67288 |
children | 694b62d8a82f |
rev | line source |
---|---|
2219
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 --- |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 labels: Stage-Beta |
2230
42eafc1c61d9
Correct short description key to 'summary'
Kim Alvefur <zash@zash.se>
parents:
2219
diff
changeset
|
3 summary: HTTP Host Status Check |
2219
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 ... |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 Introduction |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 ============ |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 |
2241
2a16a6c67288
mod_host_status_check/README: Linkify module names
Kim Alvefur <zash@zash.se>
parents:
2230
diff
changeset
|
9 This module exposes serves over HTTP the information collected by [mod\_host\_status\_check] and |
2a16a6c67288
mod_host_status_check/README: Linkify module names
Kim Alvefur <zash@zash.se>
parents:
2230
diff
changeset
|
10 [mod\_host\_status\_heartbeat] in a convenient format for automated monitoring tools. |
2219
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 Configuration |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 ============= |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 |
2241
2a16a6c67288
mod_host_status_check/README: Linkify module names
Kim Alvefur <zash@zash.se>
parents:
2230
diff
changeset
|
15 [mod\_http\_status\_check] relies on Prosodys HTTP server and mod\_http for |
2219
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 serving HTTP requests. See [Prosodys HTTP server |
2241
2a16a6c67288
mod_host_status_check/README: Linkify module names
Kim Alvefur <zash@zash.se>
parents:
2230
diff
changeset
|
17 documentation][doc:http] for information about how to |
2219
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 configure ports, HTTP Host names etc. |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 Simply add this module to modules\_enabled for the host you would like to serve it from. |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 There is a single configuration option: |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 ``` {.lua} |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 -- The maximum number of seconds that a host can go without sending a heartbeat, |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 -- before we mark it as TIMEOUT (default: 5) |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 status_check_heartbeat_threshold = 5; |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 ``` |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 Compatibility |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 ============= |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 |
5fcf9d558250
Three new modules: mod_host_status_check, mod_host_status_heartbeat and mod_http_host_status_check
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
33 Works with Prosody 0.9.x and later. |