wkd

Ansible Role: WKD

Build Status

Provides Jinja2 filter plugins to hash PGP user ids in the form required by the Web Key Directory draft standard.

  • wkd_hash(): Returns the WKD hash given a PGP user id string.
  • wkd_host(wkd_method=["advanced","direct"]): Returns the domain-part derived from given PGP user id string. If wkd_method is set to advanced the openpgpkey sub-domain is prepended (see section Key Discovery in draft standard).
  • wkd_dir(wkd_method=["advanced","direct"]): Returns the directory path derived from the given PGP user id string (see section Key Discovery in draft standard).
  • wkd_url(wkd_method=["advanced","direct"]): Returns the WKD URL derived from the given PGP user id string (see section Key Discovery in draft standard).

Note that this role essentially contains pure Python implementation of the WKD hash algorithm. It does not depend on GnuPG command line/library, nor does it provide modules / tasks capable of manipulating PGP key files. The following projects/roles provide higher level abstractions:

Requirements

None

Role Variables

None

Dependencies

None

Example Playbook

Usage of wkd_hash filter:

- hosts: localhost
  tasks:
    - import_role:
        name: znerol.wkd

    - loop:
        - "[email protected]"
        - "[email protected]"
        - "[email protected]"
        - "[email protected]"
        - "äëöüï@example.org"
        - "[email protected]"
      debug:
        msg: "WKD hash for {{ item }} is {{ item | wkd_hash() }}"

See test/test.yml for sample input/output.

License

GPLv3

About

OpenPGP Web Key Directory generation

Install
ansible-galaxy install znerol/ansible-role-wkd
GitHub repository
License
Unknown
Downloads
206
Owner