-
Notifications
You must be signed in to change notification settings - Fork 25
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
tls config requirement #40
Comments
@StarlightIbuki @Tieske any idea whether we should make |
It should be inferred that the client is trying to access non-tls from scheme and port. The tls setting seems irrelevant. I think this should be a bug introduced in 1.1.0, which is fixed by 1.1.1: #39 |
I have tested with 1.1.1 and it still requires: |
Not sure about the reason. Is it sending tls requests to port 80? (if that is the case it should be explicitly set to true, and we need to notify people about this breaking change). I will investigate it but I don't have enough bandwidth this week. |
Had a look at the tests; lua-resty-aws/spec/04-services/01-secret_manager.lua Lines 14 to 20 in ae4a939
This is wrong, since it mixes 2 concepts; CLI config, and API config. The module The API configuration is what is used when initializing the So when constructing the So this would be more appropriate: local AWS = require("resty.aws")
local AWS_cli_config = require("resty.aws.config").global
local aws = AWS {
region = AWS_cli_config.region, -- copy values over instead of using the entire object
tls = true,
} Looks like we need to update the docs, since this distinction is not clear from the docs (I might have made the same mistake in some of the examples). |
@smithc14 a guess, but this line;
Assumes the scheme is always set. If you change it to: config.tls = scheme ~= "http" (inverting the logic, and default to |
This is a bug that fails to detect the TLS setting when no scheme is provided. It now defaults the scheme to HTTPS, and the TLS setting thus defaults to true if no scheme is provided. |
I was using version 1.0.1 to retrieve secrets successfully but then when I built a new image with 1.1.0 it started to fail with a timeout trying to reach the secretsmanager endpoint over http:
failed to connect to 'http://secretsmanager.us-west-2.amazonaws.com:80'
I had not changed any configuration at all. I went looking in your unit tests and saw the extra change:
config.tls = true
If this is required now you might want to update your public examples to reflect this requirement.
Thanks for the great library.
The text was updated successfully, but these errors were encountered: