puppet-nginx icon indicating copy to clipboard operation
puppet-nginx copied to clipboard

Add support for HTTPS upstream

Open vkhromov opened this issue 5 years ago • 1 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.5.3
  • Ruby: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
  • Distribution: Ubuntu 16.04 LTS
  • Module version: master

How to reproduce (e.g Puppet code you use)

Try to add location with options from https://docs.nginx.com/nginx/admin-guide/security-controls/securing-http-traffic-upstream/

What are you seeing

No args for nginx::resource::location to specify proxy_ssl_certificate, proxy_ssl_certificate_key, or any other options from above doc.

What behaviour did you expect instead

Allow to provide options to nginx::resource::location to configure location according to https://docs.nginx.com/nginx/admin-guide/security-controls/securing-http-traffic-upstream/

Output log

N/A

Any additional information you'd like to impart

The above could potentially be done by generating an external file with corresponding nginx settings and then by providing the file inside $include arg, but that means that we need manually choose a filename for every nginx::resource::location invocation, which is quite inconvenient.

vkhromov avatar Jul 22 '19 12:07 vkhromov

Hey, I just saw this when looking for the same. However, I solved it with:

...
   location_cfg_append:   
      proxy_buffer_size: '16k'
      proxy_ssl_session_reuse: 'on'
      proxy_ssl_trusted_certificate: 'some_path'
...

In the same way you can set the other ssl items.

That is, I use hiera and the location_cfg_append item is available in server and location structures. Does that help?

ajcollett avatar Jul 20 '20 16:07 ajcollett