Skip to content

Add back in the option to conf_remap the verify_server settings.#4663

Merged
shinrich merged 1 commit intoapache:masterfrom
shinrich:make-verify-server-settings-overridable
Dec 18, 2018
Merged

Add back in the option to conf_remap the verify_server settings.#4663
shinrich merged 1 commit intoapache:masterfrom
shinrich:make-verify-server-settings-overridable

Conversation

@shinrich
Copy link
Copy Markdown
Member

In PR #4414 I made changes to clean up the verify_server* actions. As part of that PR I moved all the overridable options to ssl_server_name. When I brought those changes back to our environment, Dave Carlin pointed out that we needed access to the path to determine whether we could enforce server verification yet. In theory it could be done via the ssl_server_name file, but it was much more natural to be done via the remap rules.

However, in other cases, making exceptions for one or two origins, the ssl_server_name option makes much more sense.

This PR adds back in the logic to conf_remap override the verify_server* actions. If action is overridden in both locations, the value in ssl_server_name will win.

As part of the PR, I added a test to exercise the conf_remap option.

@shinrich shinrich added this to the 9.0.0 milestone Nov 29, 2018
@shinrich shinrich self-assigned this Nov 29, 2018
@shinrich shinrich force-pushed the make-verify-server-settings-overridable branch from a1d7787 to 7143d53 Compare November 29, 2018 20:20

You can override this global setting on a per domain basis in the ssl_servername.yaml file using the :ref:`verify_server_properties attribute<override-verify-server-properties>`.

You can also override via the conf_remap plugin, but the changes in ssl_server_name.yaml will take precedence.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't a transaction override be the highest precedence?

Copy link
Copy Markdown
Member Author

@shinrich shinrich Dec 3, 2018

Choose a reason for hiding this comment

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

It is kind of arbitrary. You really shouldn't be using both features together. So are long as we are deterministic and documented it shouldn't matter. Keeping the per-transaction as the higher precedence would complicate the implementation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hrrmmm. A bit inconsistent with standard practice, we may want to fix that later.

Comment thread proxy/http/HttpSM.cc Outdated
if (txn_conf->ssl_client_verify_server) {
verifyServer = txn_conf->ssl_client_verify_server;
} else {
REC_EstablishStaticConfigByte(verifyServer, "proxy.config.ssl.client.verify.server");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is done potentially on every upstream connection? That seems somewhat risky.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For performance concerns? Or reload concerns? We could move it into the HttpConfig object I suppose.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Alan clarified that I was using a call that read the value and set a callback. Changed the call to just read the value. No callback setting.

@shinrich shinrich force-pushed the make-verify-server-settings-overridable branch 2 times, most recently from 12d877b to cb1937f Compare December 6, 2018 16:28
@shinrich shinrich force-pushed the make-verify-server-settings-overridable branch from cb1937f to a7a3a94 Compare December 6, 2018 22:06
@shinrich
Copy link
Copy Markdown
Member Author

shinrich commented Dec 6, 2018

Pushed changes to allow the per-transaction override version to take precedence.

Also removed verify.server (the original version) from being overridable.

@shinrich shinrich merged commit 083c525 into apache:master Dec 18, 2018
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