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 support for self-signed certs to RabbitMQ input plugin #1503

Merged
merged 5 commits into from
Jul 19, 2016
Merged

Add support for self-signed certs to RabbitMQ input plugin #1503

merged 5 commits into from
Jul 19, 2016

Conversation

mattyjones
Copy link
Contributor

@mattyjones mattyjones commented Jul 17, 2016

Required for all PRs:

  • CHANGELOG.md updated
  • Sign CLA (if not already signed)
  • README.md updated (if adding a new plugin)

This adds initial support for using self-signed certs. It will default to false to preserve existing functionality but can be set to true if desired. It also adds godoc strings where need to prevent my linter from going haywire.

screen shot 2016-07-17 at 5 52 19 pm

There are still outstanding golint issues that could be resolved. I will leave it up to the maintainers if this should be done. I would refactor it just to make the linter pass but the code that's present is more readable so I am leaving it in place.

The code changes here are functionality identical to curl -k for reference.

At some point it would be nice to have this folded into agent as this is implemented in several plugins already and could be written in a standard manner for all plugins to use.

Matt Jones added 2 commits July 17, 2016 17:31
When using self-signed the metrics collection will fail, this will allow
the user to specify in the input configuration file if they want to skip
certificate verification. This is functionally identical to `curl -k`

At some point this functionality should be moved to the agent as it is
already implemented identically in several different input plugins.
These should be properly fleshed out at some point to ensure
code completeness
@mattyjones mattyjones changed the title [WIP] Add support for self-signed certs [WIP] Add support for self-signed certs to RabbitMQ plugin Jul 17, 2016
@mattyjones mattyjones changed the title [WIP] Add support for self-signed certs to RabbitMQ plugin [WIP] Add support for self-signed certs to RabbitMQ input plugin Jul 17, 2016
@sparrc
Copy link
Contributor

sparrc commented Jul 17, 2016

@mattyjones there is a generic internal helper function for fully supporting self-signed certs. See the httpjson.go plugin for an example.

@mattyjones
Copy link
Contributor Author

@sparrc Thanks for the tip, refactored it and we are light and bright.

@mattyjones mattyjones changed the title [WIP] Add support for self-signed certs to RabbitMQ input plugin Add support for self-signed certs to RabbitMQ input plugin Jul 18, 2016
@mattyjones
Copy link
Contributor Author

@sparrc This is complete from my point of view, if you guys have further feedback let me know. If I need anything else I will open up additional PR's to keep things clean.

@sparrc
Copy link
Contributor

sparrc commented Jul 19, 2016

thanks @mattyjones!

@sparrc sparrc merged commit 3757104 into influxdata:master Jul 19, 2016
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.

2 participants