Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add OCSP support to federated environment #67

Merged
merged 15 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions federation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@ XMPP 2 hosts the following MUC rooms:
* `muc3`
* `muc4`

## Hosts file entries
guusdk marked this conversation as resolved.
Show resolved Hide resolved
To access the XMPP servers and (optional) OCSP responder from your local machine you should
add entries to your hosts file:

```
127.0.0.1 xmpp.localhost.example
127.0.0.1 xmpp1.localhost.example
127.0.0.1 xmpp2.localhost.example
127.0.0.1 xmpp3.localhost.example
127.0.0.1 ocsp.localhost.example
```

This helps when testing with various clients and tools.

## Network

The Docker compose file defines a custom bridge network with a single subnet of `172.50.0.0/24`
Expand Down Expand Up @@ -154,6 +168,7 @@ All certificates are stored in `./_data/certs/`.
This setup allows certificates to be checked for revocation status making a request to the
OCSP responder:
```bash
```bash
guusdk marked this conversation as resolved.
Show resolved Hide resolved
openssl ocsp -url http://localhost:8888 \
-issuer _data/certs/ca/intermediate-ca/intermediate.crt \
-CAfile _data/certs/chain1.pem \
Expand Down
2 changes: 2 additions & 0 deletions federation/docker-compose-network-ipv4-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ services:
- "conference.xmpp1.localhost.example:172.50.0.10"
- "xmpp2.localhost.example:172.50.0.20"
- "conference.xmpp2.localhost.example:172.50.0.20"
- "ocsp.localhost.example:172.50.0.30"
guusdk marked this conversation as resolved.
Show resolved Hide resolved

xmpp2:
networks:
Expand All @@ -29,6 +30,7 @@ services:
- "conference.xmpp1.localhost.example:172.50.0.10"
- "xmpp2.localhost.example:172.50.0.20"
- "conference.xmpp2.localhost.example:172.50.0.20"
- "ocsp.localhost.example:172.50.0.30"

networks:
openfire-federated-net:
Expand Down
4 changes: 2 additions & 2 deletions federation/docker-compose-ocsp-responder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ services:
#
# Test Certificate Status:
# ----------------------
# openssl ocsp -url http://localhost:8888 \
# openssl ocsp -url http://ocsp.localhost.example:8888 \
# -issuer _data/certs/ca/intermediate-ca/intermediate.crt \
# -CAfile _data/certs/chain1.pem \
# -cert _data/certs/server1.crt \
# -text # Adds human-readable output
# -text
ocsp-responder:
image: alpine:latest
volumes:
Expand Down
2 changes: 1 addition & 1 deletion federation/scripts/generate-certificates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# OCSP server configuration
# Defines where the OCSP responder will be accessible in the Docker network
OCSP_URL="http://172.50.0.30:8888"
OCSP_URL="http://ocsp.localhost.example:8888"

# Base directory for all certificate-related files
# All paths in this script will be relative to this directory
Expand Down