Skip to content

MINOR: system tests - avoid 'sasl.enabled.mechanisms' in listener overrides#7018

Merged
rajinisivaram merged 2 commits intoapache:trunkfrom
brianbushree:listener-sasl
Jul 3, 2019
Merged

MINOR: system tests - avoid 'sasl.enabled.mechanisms' in listener overrides#7018
rajinisivaram merged 2 commits intoapache:trunkfrom
brianbushree:listener-sasl

Conversation

@brianbushree
Copy link
Copy Markdown
Contributor

named listener config sasl.enabled.mechanisms should not be prefixed with sasl mechanism

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@ijuma ijuma requested a review from rajinisivaram July 1, 2019 07:05

{% for k, v in listener_security_config.client_listener_overrides.iteritems() %}
{% if k.startswith('sasl.') %}
{% if k.startswith('sasl.') and k != 'sasl.enabled.mechanisms' %}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It may be better to check the list of configs that actually get prefixed with mechanism. I think only a small subset of SASL configs are actually prefixed with mechanism. The config docs for these indicate if they are mechanism-prefixed.

Copy link
Copy Markdown
Contributor Author

@brianbushree brianbushree Jul 1, 2019

Choose a reason for hiding this comment

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

docs say this:
prefixed with listener.<name>.:

  • connections.max.reauth.ms
  • all ssl... configs

prefixed with listener.<name>.<sasl-mechanism>.:

  • connections.max.reauth.ms
  • sasl.jaas.config
  • sasl.login.callback.handler.class
  • sasl.login.class
  • sasl.server.callback.handler.class

also from the docs it seems to imply that sasl.enabled.mechanisms should instead be at the global-level, not per listener... does that sound correct? @rajinisivaram

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have tried running with the global sasl.enabled.mechanisms instead of per-listener and it seems to not work for me...

maybe we need to update the kafka docs?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All listener configs can be prefixed with listener prefix (listener.name.{name}.). So docs probably dont explicitly say this. Only a few SASL configs can be prefixed with mechanism. I think the docs do explicitly state this and the five you listed above look correct. All listener-prefixed configs can also be at global level, but listener-prefixed ones have precedence. So you can't override listener configs with global configs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've added a check that looks for each of these 5 configs specifically.

@brianbushree
Copy link
Copy Markdown
Contributor Author

I just kicked off a branch builder job to ensure tests aren't broken with this

Copy link
Copy Markdown
Contributor

@rajinisivaram rajinisivaram left a comment

Choose a reason for hiding this comment

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

@brianbushree Thanks for the PR, LGTM

@rajinisivaram
Copy link
Copy Markdown
Contributor

rajinisivaram commented Jul 3, 2019

Checked the system test results. The only failures were the 12 ConnectDistributed tests, which were fixed under #7023. Merging to trunk.

@rajinisivaram rajinisivaram merged commit 5287036 into apache:trunk Jul 3, 2019
rajinisivaram pushed a commit to confluentinc/kafka that referenced this pull request Jul 3, 2019
…rrides (apache#7018)

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
@brianbushree
Copy link
Copy Markdown
Contributor Author

thanks @rajinisivaram !

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