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 api_key in xpack monitoring and management #11864

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

colinsurprenant
Copy link
Contributor

@colinsurprenant colinsurprenant commented May 4, 2020

Add support for api_key authentication in xpack monitoring and management.
Relates to #11788

TODO

  • cleanups
  • missing specs
  • docs

@colinsurprenant colinsurprenant changed the title add support for api_key in xpack monitoring and management [WIP] add support for api_key in xpack monitoring and management May 4, 2020
@colinsurprenant colinsurprenant force-pushed the xpack_api_key branch 4 times, most recently from 544b073 to dd8f9cb Compare May 26, 2020 20:32
@colinsurprenant colinsurprenant marked this pull request as ready for review May 26, 2020 20:37
@elasticsearch-bot elasticsearch-bot self-assigned this May 26, 2020
@yaauie yaauie assigned yaauie and unassigned elasticsearch-bot May 26, 2020
Copy link
Member

@yaauie yaauie left a comment

Choose a reason for hiding this comment

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

Good work getting this plumbed all the way through. There certainly are layers, and figuring out where they meet and overlap is no trivial task.

I've left a few notes and nitpicks, mostly in the way of readability, but also a couple where I'm not 100% sure we are supporting all of the api_key use-cases (e.g., with cloud_id).

x-pack/lib/helpers/elasticsearch_options.rb Outdated Show resolved Hide resolved
x-pack/lib/helpers/elasticsearch_options.rb Outdated Show resolved Hide resolved
x-pack/lib/helpers/elasticsearch_options.rb Show resolved Hide resolved
x-pack/lib/helpers/elasticsearch_options.rb Outdated Show resolved Hide resolved
x-pack/lib/helpers/elasticsearch_options.rb Outdated Show resolved Hide resolved
x-pack/lib/monitoring/internal_pipeline_source.rb Outdated Show resolved Hide resolved
x-pack/lib/helpers/elasticsearch_options.rb Outdated Show resolved Hide resolved
x-pack/lib/helpers/elasticsearch_options.rb Outdated Show resolved Hide resolved
x-pack/lib/monitoring/monitoring.rb Show resolved Hide resolved
@colinsurprenant
Copy link
Contributor Author

@yaauie thanks for the excellent review - I pushed changes related to most of your comments.
For the api_key + cloud_id this was a good catch. I actually added more specs around the authentication validation and also some specific around the implicit/explicit username cases. I think we are now well covered for all the permutations.

@colinsurprenant colinsurprenant changed the title [WIP] add support for api_key in xpack monitoring and management add support for api_key in xpack monitoring and management May 28, 2020
@yaauie
Copy link
Member

yaauie commented Jun 1, 2020

LGTM.

@colinsurprenant
Copy link
Contributor Author

merged in master and 7.x (for 7.9) via #11953

@karenzone
Copy link
Contributor

@colinsurprenant @yaauie This one slipped by me, and there is more docs work to be done. Please tag me for review anytime there are docs changes in a PR (like this one) or when more docs might be needed. Thanks!

@karenzone - Note to self: Expand security docs to include monitoring and management

colinsurprenant added a commit to colinsurprenant/logstash that referenced this pull request Jul 13, 2020
fixes a regression introduced with the api_key support for xpack monitoring and management in elastic#11864 which disabled the possibility to not use any authentication by relying on the default options and only enabling monitoring for example. It now ignores the default username option when no password is explicitly set.
elasticsearch-bot pushed a commit that referenced this pull request Jul 13, 2020
fixes a regression introduced with the api_key support for xpack monitoring and management in #11864 which disabled the possibility to not use any authentication by relying on the default options and only enabling monitoring for example. It now ignores the default username option when no password is explicitly set.
elasticsearch-bot pushed a commit that referenced this pull request Jul 13, 2020
fixes a regression introduced with the api_key support for xpack monitoring and management in #11864 which disabled the possibility to not use any authentication by relying on the default options and only enabling monitoring for example. It now ignores the default username option when no password is explicitly set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants