Software /
code /
prosody-modules
Annotate
mod_audit_tokens/mod_audit_tokens.lua @ 5931:d194d1012fd3
Updating dox for mod_rest. Ideas expressed / clarified:
1) Making clear that mod_rest isn't to be installed under VirtualHosts AND as a component.
2) Understanding some of the implications of this choice:
A) Changes to user authentication
B) How it affects subdomains
3) More consistent use of domain names for clarity.
4) Using different heading sizes to show scope of section.
Essentially, I added all the tidbits I had to clarify in getting this to work in my
own example.
author | Ben Smith <bens@effortlessis.com> |
---|---|
date | Mon, 13 May 2024 13:25:13 -0700 |
parent | 5773:c89077b4f46e |
rev | line source |
---|---|
5735
b357ff3d0c8a
mod_audit_auth: Include hostpart with audit events
Kim Alvefur <zash@zash.se>
parents:
4933
diff
changeset
|
1 local jid = require"util.jid"; |
b357ff3d0c8a
mod_audit_auth: Include hostpart with audit events
Kim Alvefur <zash@zash.se>
parents:
4933
diff
changeset
|
2 |
4932
530d116b7f68
mod_audit*: modules for audit logging in prosody
Jonas Schäfer <jonas@wielicki.name>
parents:
diff
changeset
|
3 module:depends("audit"); |
4933
08dea42a302a
mod_audit*: fix luacheck warnings
Jonas Schäfer <jonas@wielicki.name>
parents:
4932
diff
changeset
|
4 -- luacheck: read globals module.audit |
4932
530d116b7f68
mod_audit*: modules for audit logging in prosody
Jonas Schäfer <jonas@wielicki.name>
parents:
diff
changeset
|
5 |
5773
c89077b4f46e
mod_audit_tokens: Record events fired by mod_tokenauth in audit log
Kim Alvefur <zash@zash.se>
parents:
5772
diff
changeset
|
6 module:hook("token-grant-created", function(event) |
c89077b4f46e
mod_audit_tokens: Record events fired by mod_tokenauth in audit log
Kim Alvefur <zash@zash.se>
parents:
5772
diff
changeset
|
7 module:audit(jid.join(event.username, event.host), "token-grant-created", { |
4932
530d116b7f68
mod_audit*: modules for audit logging in prosody
Jonas Schäfer <jonas@wielicki.name>
parents:
diff
changeset
|
8 }); |
530d116b7f68
mod_audit*: modules for audit logging in prosody
Jonas Schäfer <jonas@wielicki.name>
parents:
diff
changeset
|
9 end) |
530d116b7f68
mod_audit*: modules for audit logging in prosody
Jonas Schäfer <jonas@wielicki.name>
parents:
diff
changeset
|
10 |
5773
c89077b4f46e
mod_audit_tokens: Record events fired by mod_tokenauth in audit log
Kim Alvefur <zash@zash.se>
parents:
5772
diff
changeset
|
11 module:hook("token-grant-revoked", function(event) |
c89077b4f46e
mod_audit_tokens: Record events fired by mod_tokenauth in audit log
Kim Alvefur <zash@zash.se>
parents:
5772
diff
changeset
|
12 module:audit(jid.join(event.username, event.host), "token-grant-revoked", { |
4932
530d116b7f68
mod_audit*: modules for audit logging in prosody
Jonas Schäfer <jonas@wielicki.name>
parents:
diff
changeset
|
13 }); |
530d116b7f68
mod_audit*: modules for audit logging in prosody
Jonas Schäfer <jonas@wielicki.name>
parents:
diff
changeset
|
14 end) |
5772
238c4ac8b735
mod_audit_auth: Add audit record when a client connects that has not been seen before
Matthew Wild <mwild1@gmail.com>
parents:
5771
diff
changeset
|
15 |
5773
c89077b4f46e
mod_audit_tokens: Record events fired by mod_tokenauth in audit log
Kim Alvefur <zash@zash.se>
parents:
5772
diff
changeset
|
16 module:hook("token-revoked", function(event) |
c89077b4f46e
mod_audit_tokens: Record events fired by mod_tokenauth in audit log
Kim Alvefur <zash@zash.se>
parents:
5772
diff
changeset
|
17 module:audit(jid.join(event.username, event.host), "token-revoked", { |
5772
238c4ac8b735
mod_audit_auth: Add audit record when a client connects that has not been seen before
Matthew Wild <mwild1@gmail.com>
parents:
5771
diff
changeset
|
18 }); |
5773
c89077b4f46e
mod_audit_tokens: Record events fired by mod_tokenauth in audit log
Kim Alvefur <zash@zash.se>
parents:
5772
diff
changeset
|
19 end) |