ara-collection icon indicating copy to clipboard operation
ara-collection copied to clipboard

ara_frontend_nginx should have support for https

Open dmsimard opened this issue 4 years ago • 2 comments

The current (very basic) template only runs off of port 80/http: https://github.com/ansible-community/ara-collection/blob/baeddadae54b4e58cea269bdfae0e02608c4c471/roles/ara_frontend_nginx/templates/ara-api.conf.j2

For demo.recordsansible.org we have a template that provides SSL support we can draw inspiration from: https://github.com/ansible-community/ara-infra/blob/master/playbooks/templates/api.demo.recordsansible.org.conf.j2

I guess we would need to add new variables to toggle SSL on or off and paths to certificate/key.

The certificate management is done outside the collection via letsencrypt. I think it's OK for the collection to just set paths in the config files without integrating support for managing the certificates themselves. It's simpler that way and people can set up their certificates however they want and wherever they want :)

We could probably test this in CI by creating a self-signed certificate (and telling the server: it's ok, you can trust this, wink), providing the paths and pointing the callback to https://.

dmsimard avatar Aug 12 '21 01:08 dmsimard

re: integration tests, there happens to be docs about generating self-signed certificates with existing ansible crypto modules: https://docs.ansible.com/ansible/latest/collections/community/crypto/docsite/guide_selfsigned.html

dmsimard avatar Aug 12 '21 02:08 dmsimard

WIP: https://github.com/ansible-community/ara-collection/pull/43

dmsimard avatar Aug 16 '21 00:08 dmsimard