Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Mitm manager factory#15

Merged
viacheslav-fomin-main merged 4 commits into
verygoodsecurity:vgs-editionfrom
viacheslav-fomin-main:feature/mitm-manager-factory
Jun 8, 2017
Merged

Mitm manager factory#15
viacheslav-fomin-main merged 4 commits into
verygoodsecurity:vgs-editionfrom
viacheslav-fomin-main:feature/mitm-manager-factory

Conversation

@viacheslav-fomin-main
Copy link
Copy Markdown
Collaborator

@viacheslav-fomin-main viacheslav-fomin-main commented Jun 8, 2017

Follow up to: https://github.com/verygoodsecurity/vault/pull/1380

Introduces mitm manager factory which can create a different mitm manager based on channel attributes.

* @return concrete instance of {@link MitmManager}
*/
MitmManager getInstance(Channel channel);
}
Copy link
Copy Markdown
Collaborator Author

@viacheslav-fomin-main viacheslav-fomin-main Jun 8, 2017

Choose a reason for hiding this comment

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

here is how we can check tenant preferences: channel.attr(ProxyHttpFiltersAdapter.preferences).get().getTrustAllServers()

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I do not really like exposing the whole channel here but there is no easy way to get all the attributes at once from the channel

@@ -556,7 +556,7 @@ private void initializeConnectionFlow() {
serverConnection.HTTPCONNECTWithChainedProxy);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Tenant related attributes are stored in client to proxy connection channel

.withPort(0)
.withProxyAuthenticator(this)
.withManInTheMiddle(new SelfSignedMitmManager())
.withManInTheMiddle(new MitmManagerFactory() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can we do SelfSignedMitmManagerFactory here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

sure, will fix, thanks!

@viacheslav-fomin-main viacheslav-fomin-main merged commit 800aa8f into verygoodsecurity:vgs-edition Jun 8, 2017
@osklyarenko osklyarenko added this to the Enhancements to HTTPS proxy milestone Jun 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants