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

Add missing semicolon in proxy SSL settings #927

Merged
merged 2 commits into from
Oct 8, 2018

Conversation

mayorova
Copy link
Contributor

@mayorova mayorova commented Oct 8, 2018

Starting APIcast with APICAST_PROXY_HTTPS_PASSWORD_FILE was failing with:

nginx: [emerg] invalid number of arguments in "proxy_ssl_password_file" directive in /tmp/lua_At34WX:455

Apparently, it's because of the missing ; in the end of the directive.

The same for proxy_ssl_session_reuse, although I didn't really try it.

@mayorova mayorova requested a review from a team as a code owner October 8, 2018 09:49
@mayorova
Copy link
Contributor Author

mayorova commented Oct 8, 2018

@3scale/apicast-core need some help with fixing the test...

When running locally with PROVE_FILES=t/mutual-ssl.t make prove it asks me Enter PEM pass phrase.
Running APIcast "for real" just takes the passphrase from the file and starts OK.

t/mutual-ssl.t Outdated

=== TEST 2: Mutual SSL with password file
--- main_config
env APICAST_PROXY_HTTPS_PASSWORD_FILE=$Test::Nginx::Util::ServRoot/html/passwords.file;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not use main_config because this is a blackbox test.
You can use env block like https://github.com/3scale/apicast/blob/620c1b269fafa29068e35b93c0c3e83de4ccf920/t/http-proxy.t#L15-L18

@mayorova mayorova force-pushed the fix-missing-semicolon-proxy-ssl branch from 8ff5234 to 3827272 Compare October 8, 2018 10:32
);

run_tests();

__DATA__
=== TEST 1: mutual SSL

=== TEST 1: Mutual SSL with password file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe adding a new test would have been better so we can be sure that it works with and without the password file.

Copy link
Contributor Author

@mayorova mayorova Oct 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidor I tried that first... (kept removing the original test as a new commit)
It didn't work. For some reason, even having the same exact WORKING test 2 times in the t/mutual-ssl.t was failing :/

@mikz mikz merged commit 0d386bc into master Oct 8, 2018
@mikz mikz deleted the fix-missing-semicolon-proxy-ssl branch October 8, 2018 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants