ansible-role-hidden-service icon indicating copy to clipboard operation
ansible-role-hidden-service copied to clipboard

Support v3 private keys

Open conorsch opened this issue 7 years ago • 2 comments

The role can generate v3 Onion URLs, but doesn't currently support provisioning them from vars (which has long been supported for v2). Since the v3 URLs are a different format, we'll need to handle slightly differently, but that's fine given the optional v3 flag in the vars dict.

The v3 keys are binary files, so the sanest method to support storing in vars is to base64encode the value prior to storing. The role would then automatically base64decode the var value when writing to the v3 key file.

Thoughts? Happy to submit a PR.

conorsch avatar Oct 30 '18 18:10 conorsch

You are right. This is overdue. Looking forward to your PR.

t2d avatar Oct 31 '18 08:10 t2d

The role supports provisioning support from the vars file via v3 flag:

  #
  # nextgeneration hiddenservice only available in tor >= 0.3.2.1
  # https://trac.torproject.org/projects/tor/wiki/doc/NextGenOnions#Howtosetupyourownprop224service
  #
  nextgenhiddenservice:
     hidden_service_hostname:
     hidden_service_version: 3
     hidden_service_ports:
        - [25, 25] 
        - [587,587]
     hidden_service_private_key:

I like the idea of base64 en/decoding, that would be a lot easier.

xshadow avatar Oct 31 '18 10:10 xshadow