Skip to content

Conversation

@michaeljmarshall
Copy link
Member

@michaeljmarshall michaeljmarshall commented Mar 1, 2023

Motivation

When we merged #15818 in order to make the broker's client configurable, we did not add an explicit config for hostname verification. This PR adds that config to the broker and the websocket proxy. I chose the name tlsHostnameVerificationEnabled because that is what is already used in the proxy. It diverges from the function worker's config of tlsEnableHostnameVerification.

Before this PR, you would have enabled hostname verification by configuring brokerClient_tlsHostnameVerificationEnable=true in the broker and WS proxy configs. (Note that the variable name is slightly different because the ClientConfiguration does not have a d at the end of its name.

The remaining follow up work will be to update the ClusterData objects to configure hostname verification there to make it easier to configure hostname verification for remote clusters.

Modifications

  • Add tlsHostnameVerificationEnabled to the broker.conf and the proxy.conf
  • Update all of the relevant locations that were previously only relying on brokerClient_tlsHostnameVerificationEnable

Verifying this change

I added a single test to ensure that the WebSocketProxyConfiguration properly converts to the ServiceConfiguration object.

Otherwise, I verified that anywhere we are using "brokerClient_", this PR also adds the right configuration.

Does this pull request potentially affect one of the following parts:

This PR introduces a "new" configuration key, but not a new concept. All underlying behaviors are unchanged.

Documentation

  • doc-not-needed

Docs are automatically updated by these changes.

@michaeljmarshall michaeljmarshall self-assigned this Mar 1, 2023
@michaeljmarshall michaeljmarshall changed the title [improve] Add Broker, WS Proxy conf to simplify hostname verification [improve] Simplify enabling Broker, WS Proxy hostname verification Mar 1, 2023
Copy link
Member

@lhotari lhotari 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 @michaeljmarshall

@michaeljmarshall michaeljmarshall merged commit 6621fd3 into apache:master Mar 1, 2023
@michaeljmarshall michaeljmarshall deleted the add-named-hostname-verification-config branch March 1, 2023 17:45
michaeljmarshall added a commit that referenced this pull request Mar 1, 2023
…19674)

When we merged #15818 in order to make the broker's client configurable, we did not add an explicit config for hostname verification. This PR adds that config to the broker and the websocket proxy. I chose the name `tlsHostnameVerificationEnabled` because that is what is already used in the proxy. It diverges from the function worker's config of `tlsEnableHostnameVerification`.

Before this PR, you would have enabled hostname verification by configuring `brokerClient_tlsHostnameVerificationEnable=true` in the broker and WS proxy configs. (Note that the variable name is slightly different because the `ClientConfiguration` does not have a `d` at the end of its name.

The remaining follow up work will be to update the `ClusterData` objects to configure hostname verification there to make it easier to configure hostname verification for remote clusters.

* Add `tlsHostnameVerificationEnabled` to the `broker.conf` and the `proxy.conf`
* Update all of the relevant locations that were previously only relying on `brokerClient_tlsHostnameVerificationEnable`

I added a single test to ensure that the `WebSocketProxyConfiguration` properly converts to the `ServiceConfiguration` object.

Otherwise, I verified that anywhere we are using `"brokerClient_"`, this PR also adds the right configuration.

This PR introduces a "new" configuration key, but not a new concept. All underlying behaviors are unchanged.

- [x] `doc-not-needed`

Docs are automatically updated by these changes.

(cherry picked from commit 6621fd3)
michaeljmarshall added a commit that referenced this pull request Mar 1, 2023
…19674)

When we merged #15818 in order to make the broker's client configurable, we did not add an explicit config for hostname verification. This PR adds that config to the broker and the websocket proxy. I chose the name `tlsHostnameVerificationEnabled` because that is what is already used in the proxy. It diverges from the function worker's config of `tlsEnableHostnameVerification`.

Before this PR, you would have enabled hostname verification by configuring `brokerClient_tlsHostnameVerificationEnable=true` in the broker and WS proxy configs. (Note that the variable name is slightly different because the `ClientConfiguration` does not have a `d` at the end of its name.

The remaining follow up work will be to update the `ClusterData` objects to configure hostname verification there to make it easier to configure hostname verification for remote clusters.

* Add `tlsHostnameVerificationEnabled` to the `broker.conf` and the `proxy.conf`
* Update all of the relevant locations that were previously only relying on `brokerClient_tlsHostnameVerificationEnable`

I added a single test to ensure that the `WebSocketProxyConfiguration` properly converts to the `ServiceConfiguration` object.

Otherwise, I verified that anywhere we are using `"brokerClient_"`, this PR also adds the right configuration.

This PR introduces a "new" configuration key, but not a new concept. All underlying behaviors are unchanged.

- [x] `doc-not-needed`

Docs are automatically updated by these changes.

(cherry picked from commit 6621fd3)
(cherry picked from commit b8083b0)
michaeljmarshall added a commit that referenced this pull request Mar 1, 2023
…19674)

When we merged #15818 in order to make the broker's client configurable, we did not add an explicit config for hostname verification. This PR adds that config to the broker and the websocket proxy. I chose the name `tlsHostnameVerificationEnabled` because that is what is already used in the proxy. It diverges from the function worker's config of `tlsEnableHostnameVerification`.

Before this PR, you would have enabled hostname verification by configuring `brokerClient_tlsHostnameVerificationEnable=true` in the broker and WS proxy configs. (Note that the variable name is slightly different because the `ClientConfiguration` does not have a `d` at the end of its name.

The remaining follow up work will be to update the `ClusterData` objects to configure hostname verification there to make it easier to configure hostname verification for remote clusters.

* Add `tlsHostnameVerificationEnabled` to the `broker.conf` and the `proxy.conf`
* Update all of the relevant locations that were previously only relying on `brokerClient_tlsHostnameVerificationEnable`

I added a single test to ensure that the `WebSocketProxyConfiguration` properly converts to the `ServiceConfiguration` object.

Otherwise, I verified that anywhere we are using `"brokerClient_"`, this PR also adds the right configuration.

This PR introduces a "new" configuration key, but not a new concept. All underlying behaviors are unchanged.

- [x] `doc-not-needed`

Docs are automatically updated by these changes.

(cherry picked from commit 6621fd3)
(cherry picked from commit b8083b0)
(cherry picked from commit a3a242c)
michaeljmarshall added a commit that referenced this pull request Mar 1, 2023
…19674)

When we merged #15818 in order to make the broker's client configurable, we did not add an explicit config for hostname verification. This PR adds that config to the broker and the websocket proxy. I chose the name `tlsHostnameVerificationEnabled` because that is what is already used in the proxy. It diverges from the function worker's config of `tlsEnableHostnameVerification`.

Before this PR, you would have enabled hostname verification by configuring `brokerClient_tlsHostnameVerificationEnable=true` in the broker and WS proxy configs. (Note that the variable name is slightly different because the `ClientConfiguration` does not have a `d` at the end of its name.

The remaining follow up work will be to update the `ClusterData` objects to configure hostname verification there to make it easier to configure hostname verification for remote clusters.

* Add `tlsHostnameVerificationEnabled` to the `broker.conf` and the `proxy.conf`
* Update all of the relevant locations that were previously only relying on `brokerClient_tlsHostnameVerificationEnable`

I added a single test to ensure that the `WebSocketProxyConfiguration` properly converts to the `ServiceConfiguration` object.

Otherwise, I verified that anywhere we are using `"brokerClient_"`, this PR also adds the right configuration.

This PR introduces a "new" configuration key, but not a new concept. All underlying behaviors are unchanged.

- [x] `doc-not-needed`

Docs are automatically updated by these changes.

(cherry picked from commit 6621fd3)
(cherry picked from commit b8083b0)
(cherry picked from commit a3a242c)
(cherry picked from commit c84c3b7)
Annavar-satish pushed a commit to pandio-com/pulsar that referenced this pull request Mar 6, 2023
…pache#19674)

When we merged apache#15818 in order to make the broker's client configurable, we did not add an explicit config for hostname verification. This PR adds that config to the broker and the websocket proxy. I chose the name `tlsHostnameVerificationEnabled` because that is what is already used in the proxy. It diverges from the function worker's config of `tlsEnableHostnameVerification`.

Before this PR, you would have enabled hostname verification by configuring `brokerClient_tlsHostnameVerificationEnable=true` in the broker and WS proxy configs. (Note that the variable name is slightly different because the `ClientConfiguration` does not have a `d` at the end of its name.

The remaining follow up work will be to update the `ClusterData` objects to configure hostname verification there to make it easier to configure hostname verification for remote clusters.

* Add `tlsHostnameVerificationEnabled` to the `broker.conf` and the `proxy.conf`
* Update all of the relevant locations that were previously only relying on `brokerClient_tlsHostnameVerificationEnable`

I added a single test to ensure that the `WebSocketProxyConfiguration` properly converts to the `ServiceConfiguration` object.

Otherwise, I verified that anywhere we are using `"brokerClient_"`, this PR also adds the right configuration.

This PR introduces a "new" configuration key, but not a new concept. All underlying behaviors are unchanged.

- [x] `doc-not-needed`

Docs are automatically updated by these changes.

(cherry picked from commit 6621fd3)
(cherry picked from commit b8083b0)
(cherry picked from commit a3a242c)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Mar 9, 2023
…pache#19674)

When we merged apache#15818 in order to make the broker's client configurable, we did not add an explicit config for hostname verification. This PR adds that config to the broker and the websocket proxy. I chose the name `tlsHostnameVerificationEnabled` because that is what is already used in the proxy. It diverges from the function worker's config of `tlsEnableHostnameVerification`.

Before this PR, you would have enabled hostname verification by configuring `brokerClient_tlsHostnameVerificationEnable=true` in the broker and WS proxy configs. (Note that the variable name is slightly different because the `ClientConfiguration` does not have a `d` at the end of its name.

The remaining follow up work will be to update the `ClusterData` objects to configure hostname verification there to make it easier to configure hostname verification for remote clusters.

* Add `tlsHostnameVerificationEnabled` to the `broker.conf` and the `proxy.conf`
* Update all of the relevant locations that were previously only relying on `brokerClient_tlsHostnameVerificationEnable`

I added a single test to ensure that the `WebSocketProxyConfiguration` properly converts to the `ServiceConfiguration` object.

Otherwise, I verified that anywhere we are using `"brokerClient_"`, this PR also adds the right configuration.

This PR introduces a "new" configuration key, but not a new concept. All underlying behaviors are unchanged.

- [x] `doc-not-needed`

Docs are automatically updated by these changes.

(cherry picked from commit 6621fd3)
(cherry picked from commit b8083b0)
(cherry picked from commit a3a242c)
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.

3 participants