Skip to content

Commit

Permalink
Serve public key certificate via HTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-z committed Oct 13, 2024
1 parent b782e06 commit 7bec651
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ def init_cvmfs_repo(repo_name: str):
if res.returncode != 0:
sys.exit(f"Failed to run cvmfs_server mkfs (exit code: {res.returncode})")

# Make the public key available for clients
# Make the public key and certificate available via HTTP
# Useful for clients and publishers:
# https://cvmfs.readthedocs.io/en/stable/cpt-repository-gateway.html#example-procedure
Path("/var/www/html/cvmfs-meta").mkdir(parents=True, exist_ok=True)
Path(f"/var/www/html/cvmfs-meta/{repo_name}.pub").symlink_to(f"/etc/cvmfs/keys/{repo_name}.pub")
Path(f"/var/www/html/cvmfs-meta/{repo_name}.crt").symlink_to(f"/etc/cvmfs/keys/{repo_name}.crt")

# Configure cvmfs-gateway
gateway_key_path = Path(f"/etc/cvmfs/keys/{repo_name}.gw")
Expand Down

0 comments on commit 7bec651

Please sign in to comment.