Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dependencies required for ssl testing on apache module #17

Open
sheenaajay opened this issue Jun 29, 2021 · 0 comments
Open

Fix dependencies required for ssl testing on apache module #17

sheenaajay opened this issue Jun 29, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@sheenaajay
Copy link
Contributor

Describe the Bug

Fix dependencies required for ssl testing on apache module
As of now all ssl tests are failing due to invalid configuration due to missing cert and key files specified in the vhost file.
apache failed to start with the following error and hence the remaining tests also failed.

`root@beat-neutralist:/etc/apache2# systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Mon 2021-06-28 22:15:31 UTC; 18min ago
Process: 15069 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE)
Process: 15524 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Main PID: 14946 (code=exited, status=0/SUCCESS)

Jun 28 22:15:31 beat-neutralist systemd[1]: Starting The Apache HTTP Server...
Jun 28 22:15:31 beat-neutralist apachectl[15524]: AH00112: Warning: DocumentRoot [/tmp/test] does not exist
Jun 28 22:15:31 beat-neutralist apachectl[15524]: AH00526: Syntax error on line 27 of /etc/apache2/sites-enabled/25-test.sslcerts
Jun 28 22:15:31 beat-neutralist apachectl[15524]: SSLCertificateFile: file '/tmp/ssl_cert' does not exist or is empty
Jun 28 22:15:31 beat-neutralist apachectl[15524]: Action 'start' failed.
Jun 28 22:15:31 beat-neutralist apachectl[15524]: The Apache error log may have more information.
Jun 28 22:15:31 beat-neutralist systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 28 22:15:31 beat-neutralist systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 28 22:15:31 beat-neutralist systemd[1]: Failed to start The Apache HTTP Server.`

Expected Behaviour

Valid vhost configuration for ssl type and required keys and cert should be generated and places in /tmp/ssl_key and /tmp/ssl_cert

Steps to Reproduce

        class { 'apache':
          service_ensure       => stopped,
        }
        host { 'test.sslcertsdironly.com': ip => '127.0.0.1', }
        apache::listen { '443': }

        apache::vhost { 'test.sslcertsdironly.com':
          docroot              => '/tmp/test',
          ssl                  => true,
          ssl_key             => '/tmp/ssl_key',
          ssl_cert              => '/tmp/ssl_cert',
          ssl_certs_dir        => '/tmp',
          ssl_verify_client    => 'require',
        }

Failed Tests spec/acceptance/apache_ssl_spec.rb

Environment

  • Platform [Ubuntu 18.04]

Additional Context

https://forge.puppet.com/modules/camptocamp/openssl
Explore the following module which helps to generate the ssl cert and keys required for apache

@sheenaajay sheenaajay added the bug Something isn't working label Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant