File

mod_client_certs/README.md @ 6302:06fbbd45ba75

mod_cloud_notify: Readme: fix links and labels that were removed in the last commit diff --git a/mod_cloud_notify/README.md b/mod_cloud_notify/README.md --- a/mod_cloud_notify/README.md +++ b/mod_cloud_notify/README.md @@ -1,3 +1,9 @@ +---- +-labels: +-- 'Stage-Beta' +-summary: 'XEP-0357: Cloud push notifications' +---- + # Introduction This module enables support for sending "push notifications" to clients @@ -32,15 +38,15 @@ notification to your device. When your d it will display it or wake up the app so it can connect to XMPP and receive any pending messages. -This protocol is described for developers in \[XEP-0357: Push -Notifications\]. +This protocol is described for developers in [XEP-0357: Push +Notifications]. -For this module to work reliably, you must have \[mod_smacks\], -\[mod_mam\] and \[mod_carbons\] also enabled on your server. +For this module to work reliably, you must have [mod_smacks], +[mod_mam] and [mod_carbons] also enabled on your server. Some clients, notably Siskin and Snikket iOS need some additional extensions that are not currently defined in a standard XEP. To support -these clients, see \[mod_cloud_notify_extensions\]. +these clients, see [mod_cloud_notify_extensions]. # Configuration @@ -58,18 +64,18 @@ these clients, see \[mod_cloud_notify_ex # Internal design notes App servers are notified about offline messages, messages stored by -\[mod_mam\] or messages waiting in the smacks queue. The business rules +[mod_mam] or messages waiting in the smacks queue. The business rules outlined [here](//mail.jabber.org/pipermail/standards/2016-February/030925.html) are all honored[^2]. -To cooperate with \[mod_smacks\] this module consumes some events: +To cooperate with [mod_smacks] this module consumes some events: `smacks-ack-delayed`, `smacks-hibernation-start` and `smacks-hibernation-end`. These events allow this module to send out notifications for messages received while the session is hibernated by -\[mod_smacks\] or even when smacks acknowledgements for messages are +[mod_smacks] or even when smacks acknowledgements for messages are delayed by a certain amount of seconds configurable with the -\[mod_smacks\] setting `smacks_max_ack_delay`. +[mod_smacks] setting `smacks_max_ack_delay`. The `smacks_max_ack_delay` setting allows to send out notifications to clients which aren't already in smacks hibernation state (because the
author Menel <menel@snikket.de>
date Fri, 13 Jun 2025 10:44:37 +0200
parent 6003:fe081789f7b5
line wrap: on
line source

---
labels:
- 'Stage-Alpha'
summary: 'Client-side certificate management for Prosody'
...

Introduction
============

[XEP-0257](http://xmpp.org/extensions/xep-0257.html) specifies a
protocol for clients to store and manage client side certificates. When
a client presents a stored client side certificate during the TLS
handshake, it can log in without supplying a password (using SASL
EXTERNAL). This makes it possible to have multiple devices accessing an
account, without any of them needing to know the password, and makes it
easier to revoke access for a single device.

Details
=======

Each user can add their own certificates. These do not need to be signed
by a trusted CA, yet they do need to be valid at the time of logging in
and they should include an subjectAltName with otherName
"id-on-xmppAddr" with the JID of the user.

Generating your certificate
---------------------------

1.  To generate your own certificate with a "id-on-xmppAddr" attribute
    using the command line `openssl` tool, first create a file called
    `client.cnf` with contents:

        [req] prompt = no
        x509_extensions = v3_extensions
        req_extensions = v3_extensions
        distinguished_name = distinguished_name

        [v3_extensions]
        extendedKeyUsage = clientAuth
        keyUsage = digitalSignature,keyEncipherment
        basicConstraints = CA:FALSE
        subjectAltName = @subject_alternative_name

        [subject_alternative_name]
        otherName.0 =
        1.3.6.1.5.5.7.8.5;FORMAT:UTF8,UTF8:hamlet@shakespeare.lit

        [distinguished_name]
        commonName = Your Name
        emailAddress = hamlet@shakespeare.lit

2.  Replace the values for `otherName.0` and `commonName` and
    `emailAddress` with your own values. The JID in `otherName.0` can
    either be a full JID or a bare JID, in the former case, the client
    can only use the resource specified in the resource. There are many
    other fields you can add, however, for SASL EXTERNAL, they will have
    no meaning. You can add more JIDs as `otherName.1`, `otherName.2`,
    etc.
3.  Create a private key (as an example, a 4096 bits RSA key):

        openssl genrsa -out client.key 4096

4.  Create the certificate request:

        openssl req -key client.key -new -out client.req -config client.cnf -extensions v3_extensions

5.  Sign it yourself:

        openssl x509 -req -days 365 -in client.req -signkey client.key -out client.crt -extfile client.cnf -extensions v3_extensions

The 365 means the certificate will be valid for a year starting now.

The `client.key` **must** be kept secret, and is only needed by clients
connecting using this certificate. The `client.crt` file contains the
certificate that should be sent to the server using XEP-0257, and is
also needed by clients connecting to the server. The `client.req` file
is not needed anymore.

Configuration
=============

(None yet)

Compatibility
=============

  ----- -----------------------------
  0.9   Works
  0.8   Untested. Probably doesn't.
  ----- -----------------------------

Clients
=======

(None?)

TODO
====

Possible options to add to the configuration:

-   Require certificates to be signed by a trusted CA.
-   Do not require a id-on-xmppAddr
-   Remove expired certs after a certain time
-   Limit the number of certificates per user