sebix.hockeypuck

Hockeypuck

这个角色安装 hockeypuck 及其可用的 Golang 版本。

Hockeypuck 是一个现代的 OpenPGP 密钥服务器,使用 Go 语言编写。

这个角色安装 PostgreSQL,并将其配置为 Hockeypuck 的后端。 hockeypuck 被克隆到服务器上并在那里构建。 使用 systemd 管理该服务器。

要求

角色变量

可用变量及其默认值列表:

hockeypuck_home: /var/lib/hockeypuck
hockeypuck_directory: "{{ hockeypuck_home }}/hockeypuck/"
hockeypuck_hostname: "{{ hostname|d(ansible_hostname)|d(inventory_hostname) }}"
hockeypuck_templates: "{{ hockeypuck_directory }}/contrib/templates"
hockeypuck_index_template: "{{ hockeypuck_templates }}/index.html.tmpl"
hockeypuck_vindex_template: "{{ hockeypuck_templates }}/index.html.tmpl"
hockeypuck_stats_template: "{{ hockeypuck_templates }}/stats.html.tmpl"
hockeypuck_webroot: "{{ hockeypuck_directory }}/contrib/webroot/"
hockeypuck_logfile: /var/log/hockeypuck/hockeypuck.log
hockeypuck_loglevel: INFO
hockeypuck_recondb: "{{ hockeypuck_home }}/recon.db"
hockeypuck_log_request_details: "true"
hockeypuck_peers: []
hockeypuck_blacklist: []
hockeypuck_conflux_recon_allowCIDRs: []
hockeypuck_conflux_recon_seenCacheSize: 72000
hockeypuck_hkp_bind: :11371
hockeypuck_git_version: branch-2.1
hockeypuck_contact: # 无默认值
hockeypuck_hkp_ssl_enabled: false
hockeypuck_hkp_ssl_certificate: # 无默认值
hockeypuck_hkp_ssl_key: # 无默认值

主机名

主机名用于在配置文件中命名 hockeypuck 实例的主机。

如果用户定义的变量 hockeypuck_hostname 未定义,

  • 则使用用户定义的变量 hostname。 如果该变量未定义,
  • 使用 ansible_hostname,这需要 收集的事实。 如果未收集事实,
  • 则使用 inventory_hostname 作为后备,这个始终被定义。

HKPS/SSL/TLS

要启用 HKPS,请设置启用参数并提供证书和私钥的路径,如下所示:

hockeypuck_hkp_ssl_enabled: true
hockeypuck_hkp_ssl_certificate: "/path/to/certificate"
hockeypuck_hkp_ssl_key: "/path/to/private/key"

对等方

hockeypuck_peers 可以是简单的列表:

- example.com
- example.net

这假设 http 和 recon 使用相同地址,以及默认的端口 11370 和 11371。对等方名称为 peer$index

或者,hockeypuck_peers 可以是映射:

- name: full example
  http_addr: example.net
  http_addr_port: 11371
  recon_addr: example.net
  recon_addr: 11370

端口是可选的。

如果 hockeypuck 服务器在一个反向代理后面,则将 hockeypuck_conflux_recon_allowCIDRs 设置为代理的 IP 地址。Hockeypuck 仅允许来自配置对等方和允许的网络范围的传入 recon。

hockeypuck_conflux_recon_allowCIDRs:
  - 10.0.0.1/8
  - 192.168.0.1/32

密钥黑名单

可以使用 hockeypuck_blacklist 选项来 黑名单 密钥,每个列表项一个指纹:

hockeypuck_blacklist:
  - B4530375102C9EB270909C9C006694EB
  - a490d0f4d311a4153e2bb7cadbb802b258acd84f

有关现有有用黑名单的信息,请查看 CIRCL 的 openpgp-keys-filterlists

依赖

在服务器上安装 go,通过 gantsign.golang

示例剧本

- hosts: servers
  roles:
    - sebix.hockeypuck
  vars:
     # 可选变量,完整列表见上文,包括默认值
    - golang_version: 1.19
    - hockeypuck_contact: "您的密钥指纹"

许可证

BSD-3-Clause

作者信息

https://intevation.de/

关于项目

Installing and setting up the Hockeypuck OpenPGP key server

安装
ansible-galaxy install sebix.hockeypuck
许可证
bsd-3-clause
下载
80
拥有者