-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Metricbeat][Aerospike Module] Add support for TLS #38126
Conversation
…ord in the clientpolicy
…TLS in the aerospike.yml.disabled config
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
"testing" | ||
|
||
"github.com/elastic/elastic-agent-libs/transport/tlscommon" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what does the error mean, any guidance is much appreciated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The imports starting with github.com/elastic/
need to appear before other 3rd party imports, run goimports -w -local github.com/elastic metricbeat/module/aerospike
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Let's see if it's fixed now :)
7f575e7
to
8965a52
Compare
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
@herrBez so, I don't have much experience with Aerospike---is the idea there that basic auth would be used with the access controls in enterprise, or with a reverse proxy like nginx? If it's the latter (or both) it might be good to comment that and provide an example. |
Hi, |
assert.Equal(t, test.expectedClientPolicy.User, result.User, test.Name) | ||
assert.Equal(t, test.expectedClientPolicy.Password, result.Password, test.Name) | ||
assert.Equal(t, test.expectedClientPolicy.ClusterName, result.ClusterName, test.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you mind switching to Equalf
and providing a description of what didn't match?
Right now if this fails in CI we will get an error like "A" does not equal "B"
. It is a lot easier to debug if we get something like Aerospike policy username is wrong. got: "A" expected: "B"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Thank you for the feedback. I don't mind at all ^^. So something like:
assert.Equalf(t, test.expectedClientPolicy.User, result.User, "Aerospike policy [Test '%s'] username is wrong: expected '%s' got '%s'", test.Name, test.expectedClientPolicy.User, result.User)
Or something like:
assert.Equalf(t, test.expectedClientPolicy.User, result.User, "Aerospike policy [Test '%s'] username is wrong", test.Name)
??
Should I also modify the existing tests to use Equalf?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need the test name, when it errors out go test will give us that. I prefer the ones that have expected and got (or something like that).
One thing I think that helps is to fail the test and just double check that the error message gives you enough context that you have some idea of where the problem is. For example telling me that the Username is what didn't match, the value we got, and the expected value goes a long way to helping understand where the problem might be.
I think you can just focus on the tests you are adding. That helps limit the scope of the PR.
require an upgrade of the dependencies
|
Co-authored-by: subham sarkar <[email protected]>
- [reference-config] add empty line after hosts list - [test] remove empty line after function header - [test] use generic pointer instead of custom one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, make sure to fix the docs and x-pack/metricbeat CI. make update
should probably fix them.
Thank you all for the help and the patience! After the merge I noticed we did not add an entry in the release notes. Should we add one? |
Yes, we should! Thanks. |
No. Duplicates are not expected. Also, yes you can create a new PR to include the changelog entry. Please do it ASAP and tomorrow we have code freeze for 8.14 release. |
Done in #38923 . |
Proposed commit message
[Aerospike] Add TLS support
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Aerospike has a documentation https://aerospike.com/docs/server/guide/security/tls documentation that explains how to configure aerospike with TLS.
Nevertheless, in my tests I used NGINX with the following configuration to perform SSL termination:
And the following docker-compose.yml:
Related issues
Use cases
Monitor TLS and Username/Password protected Aerospike Databases
Screenshots
Logs