walkamongus / puppet-harbor

Puppet Harbor module
https://forge.puppet.com/walkamongus/harbor
4 stars 7 forks source link

Added reading of keys 'ssl_ca_cert' and optional 'host' from swagger.… #23

Closed entasisj closed 4 years ago

entasisj commented 4 years ago

…yaml for configuration of harbor-swagger-client.

The value of key 'ssl_ca_cert' should point to a local certificate bundle which integrates a self-signed certificate. This allows to enable SSL connection (verify_ssl: true) also if a self-signed certificate is involved. The value of key 'host' is required in order to use key 'verify_ssl_host' with value 'true'. This is neccessary because the default value for 'host' is 'localhost' which cannot be verified. These changes are required in order to have SSL connection working well as recommended in the documentation of the harbor-swagger-client: https://github.com/bt-lemery/harbor-swagger-client/blob/master/lib/harbor_swagger_client/configuration.rb.

entasisj commented 4 years ago

Added the additional configuration to all resources which make use of the SwaggerClient. I'm not experienced enough with Ruby or Puppet's provider to separate that repeated code into a function available for the sources.