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

endpointIdentificationAlgorithm enabled by default #3454

Closed
jborgland opened this issue Mar 12, 2019 · 4 comments
Closed

endpointIdentificationAlgorithm enabled by default #3454

jborgland opened this issue Mar 12, 2019 · 4 comments

Comments

@jborgland
Copy link

With commit e4d7860 the default value for endpointIdentificationAlgorithm was changed from null to HTTPS to "avoid warnings." The refererenced warnings were introduced as part of the same issue (#3049 ).

The result of this change is that a lot of (most?) client certificates will be rejected with the message No subject alternative names matching IP address <ip> found.

Section 3.2 of RFC 2818 states that Typically, the server has no external knowledge of what the client's identity ought to be and so checks (other than that the client has a certificate chain rooted in an appropriate CA) are not possible. so the new default value seems like a bad one (and so does the warning).

@joakime
Copy link
Contributor

joakime commented Mar 12, 2019

endpointIdentificationAlgorithm is for clients themselves to use to validate the certificates of the server against the hostname you used to connect.
The classes in jetty that use this would be, jetty's HttpClient, Http2Client, WebSocketClient, and javax.websocket ClientContainer.
Since SslContextFactory is a generic holder for all things SSL/TLS, both client and server, we do not know its intended use up front, your server defined one could be shared with ProxyServlet, websockets, clients, etc..

Have you just tried setting endpointIdentificationAlgorithm to null again in your configuration?

The No subject alternative names matching IP address <ip> found is typically a server side function and seems to indicate a SNI issue.
I feel that your analysis is pointing at the wrong part of the code.
The SNI code, on the other hand, has undergone some changes in regards to how it validates. (See: #2886, #2896, #3282)

@sbordet
Copy link
Contributor

sbordet commented Mar 12, 2019

@jborgland endpointIdentificationAlgorithm=HTTPS was made to make the default usage of SslContextFactory for clients more secure by default.

Because you are using client certificates you are probably customizing already your server-side SslContextFactory so now you have to set endpointIdentificationAlgorithm=null and ignore the warning (which is emitted on a special logger that you can configure to not emit warnings).

Unfortunately there was no easy way to make both the client and the client certificate case on server side happy.
Since the latter is more rare, we have decided for the current status of things.

@joakime an alternative could be to have a SslContextFactory.Client and SslContextFactory.Server with slightly different default configurations and extra checks about the warnings (e.g. if instanceof Server then dont_warn_about_EIA).

@jborgland
Copy link
Author

@joakime

The No subject alternative names matching IP address found is typically a server side function and seems to indicate a SNI issue.

My point exactly - the new default value essentially enabled functionality that shouldn't be enabled in this context.

@sbordet
Yes, I do create my own SslContextFactory instance and I've already updated my code to set the value to null (and that resolved the issue). Although I understand the reason for the change I'm not convinced it was a good choice - with Jetty being a servlet container I would expect that the most common use of the SslContextFactory would be for the server role. I noticed that someone else on the jetty-users list had run into the same issue a few weeks back (without a resolution in the mailing list at least).

Creating two separate ones sound like a reasonable way of solving the problem.

@joakime
Copy link
Contributor

joakime commented Apr 15, 2019

Closing in favor of the work being done in Issue #3464

@joakime joakime closed this as completed Apr 15, 2019
dtreskunov pushed a commit to dtreskunov/easyssl that referenced this issue Apr 24, 2019
Jetty 9.4.15 started doing additional checks on client certificates.
This bit of code reverts to the old behavior.

See jetty/jetty.project#3454

Fixes #6
kofemann added a commit to kofemann/dcache that referenced this issue May 7, 2019
Motivation:
jetty version 9.4.15+ enforce HTTPS protocol and reject any other
schemas by default.

(see jetty/jetty.project#3454)

Modification:
unset endpointIdentificationAlgorithm as recommended to allow srm usage.

Result:
srm works again!

Acked-by:
Target: master, 5.1, 5.0, 4.2, 4.1, 4.0, 3.2
Require-book: no
Require-notes: no
kofemann added a commit to kofemann/dcache that referenced this issue May 8, 2019
…y.Server

Motivation:
jetty version 9.4.15+ enforce HTTPS protocol and reject any other
schemas by default.

(see jetty/jetty.project#3454)

To allow 'srm://' the SslContextFactory must reset explicit protocol
enforcement, or subclass SslContextFactory.Server, which does it by
default.

Modification:
make CanlContextFactory subclass of jetty.ssl.SslContextFactory.Server
to remove protocol enforcement and get rid of deprecated jetty API.

Result:
srm works again!

Acked-by:
Target: master, 5.1, 5.0, 4.2, 4.1, 4.0, 3.2
Require-book: no
Require-notes: no
kofemann added a commit to dCache/dcache that referenced this issue May 8, 2019
…y.Server

Motivation:
jetty version 9.4.15+ enforce HTTPS protocol and reject any other
schemas by default.

(see jetty/jetty.project#3454)

To allow 'srm://' the SslContextFactory must reset explicit protocol
enforcement, or subclass SslContextFactory.Server, which does it by
default.

Modification:
make CanlContextFactory subclass of jetty.ssl.SslContextFactory.Server
to remove protocol enforcement and get rid of deprecated jetty API.

Result:
srm works again!

Acked-by: Paul Millar
Target: master, 5.1, 5.0, 4.2, 4.1, 4.0, 3.2
Require-book: no
Require-notes: no
kofemann added a commit to kofemann/dcache that referenced this issue May 8, 2019
…y.Server

Motivation:
jetty version 9.4.15+ enforce HTTPS protocol and reject any other
schemas by default.

(see jetty/jetty.project#3454)

To allow 'srm://' the SslContextFactory must reset explicit protocol
enforcement, or subclass SslContextFactory.Server, which does it by
default.

Modification:
make CanlContextFactory subclass of jetty.ssl.SslContextFactory.Server
to remove protocol enforcement and get rid of deprecated jetty API.

Result:
srm works again!

Acked-by: Paul Millar
Target: master, 5.1, 5.0, 4.2, 4.1, 4.0, 3.2
Require-book: no
Require-notes: no
(cherry picked from commit 8ad4ca3)
Signed-off-by: Tigran Mkrtchyan <[email protected]>
kofemann added a commit to kofemann/dcache that referenced this issue May 8, 2019
…y.Server

Motivation:
jetty version 9.4.15+ enforce HTTPS protocol and reject any other
schemas by default.

(see jetty/jetty.project#3454)

To allow 'srm://' the SslContextFactory must reset explicit protocol
enforcement, or subclass SslContextFactory.Server, which does it by
default.

Modification:
make CanlContextFactory subclass of jetty.ssl.SslContextFactory.Server
to remove protocol enforcement and get rid of deprecated jetty API.

Result:
srm works again!

Acked-by: Paul Millar
Target: master, 5.1, 5.0, 4.2, 4.1, 4.0, 3.2
Require-book: no
Require-notes: no
(cherry picked from commit 8ad4ca3)
Signed-off-by: Tigran Mkrtchyan <[email protected]>
kofemann added a commit to kofemann/dcache that referenced this issue May 8, 2019
…y.Server

Motivation:
jetty version 9.4.15+ enforce HTTPS protocol and reject any other
schemas by default.

(see jetty/jetty.project#3454)

To allow 'srm://' the SslContextFactory must reset explicit protocol
enforcement, or subclass SslContextFactory.Server, which does it by
default.

Modification:
make CanlContextFactory subclass of jetty.ssl.SslContextFactory.Server
to remove protocol enforcement and get rid of deprecated jetty API.

Result:
srm works again!

Acked-by: Paul Millar
Target: master, 5.1, 5.0, 4.2, 4.1, 4.0, 3.2
Require-book: no
Require-notes: no
(cherry picked from commit 8ad4ca3)
Signed-off-by: Tigran Mkrtchyan <[email protected]>
kofemann added a commit to kofemann/dcache that referenced this issue May 8, 2019
…y.Server

Motivation:
jetty version 9.4.15+ enforce HTTPS protocol and reject any other
schemas by default.

(see jetty/jetty.project#3454)

To allow 'srm://' the SslContextFactory must reset explicit protocol
enforcement, or subclass SslContextFactory.Server, which does it by
default.

Modification:
make CanlContextFactory subclass of jetty.ssl.SslContextFactory.Server
to remove protocol enforcement and get rid of deprecated jetty API.

Result:
srm works again!

Acked-by: Paul Millar
Target: master, 5.1, 5.0, 4.2, 4.1, 4.0, 3.2
Require-book: no
Require-notes: no
(cherry picked from commit 8ad4ca3)
Signed-off-by: Tigran Mkrtchyan <[email protected]>
kofemann added a commit to kofemann/dcache that referenced this issue May 8, 2019
…y.Server

Motivation:
jetty version 9.4.15+ enforce HTTPS protocol and reject any other
schemas by default.

(see jetty/jetty.project#3454)

To allow 'srm://' the SslContextFactory must reset explicit protocol
enforcement, or subclass SslContextFactory.Server, which does it by
default.

Modification:
make CanlContextFactory subclass of jetty.ssl.SslContextFactory.Server
to remove protocol enforcement and get rid of deprecated jetty API.

Result:
srm works again!

Acked-by: Paul Millar
Target: master, 5.1, 5.0, 4.2, 4.1, 4.0, 3.2
Require-book: no
Require-notes: no
(cherry picked from commit 8ad4ca3)
Signed-off-by: Tigran Mkrtchyan <[email protected]>
kofemann added a commit to kofemann/dcache that referenced this issue May 8, 2019
…y.Server

Motivation:
jetty version 9.4.15+ enforce HTTPS protocol and reject any other
schemas by default.

(see jetty/jetty.project#3454)

To allow 'srm://' the SslContextFactory must reset explicit protocol
enforcement, or subclass SslContextFactory.Server, which does it by
default.

Modification:
make CanlContextFactory subclass of jetty.ssl.SslContextFactory.Server
to remove protocol enforcement and get rid of deprecated jetty API.

Result:
srm works again!

Acked-by: Paul Millar
Target: master, 5.1, 5.0, 4.2, 4.1, 4.0, 3.2
Require-book: no
Require-notes: no
(cherry picked from commit 8ad4ca3)
Signed-off-by: Tigran Mkrtchyan <[email protected]>
vitam-prg pushed a commit to ProgrammeVitam/vitam that referenced this issue May 24, 2019
ketan added a commit to gocd/gocd that referenced this issue Aug 1, 2019
vitam-prg pushed a commit to ProgrammeVitam/vitam that referenced this issue Sep 5, 2019
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

No branches or pull requests

3 participants