-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fixes #5689 - Jetty ssl keystorePath doesn't work with absolute path. #5867
Conversation
Introduced new properties jetty.sslContext.keyStoreAbsolutePath and jetty.sslContext.trustStoreAbsolutePath to default to ${jetty.base}/etc/keystore. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer no having a new parameter. I've suggested an alternative that might be workable.... but if not, then I'll approve this PR as is.
<Set name="TrustStorePath"> | ||
<Property name="jetty.sslContext.trustStoreAbsolutePath"> | ||
<Default> | ||
<Property name="jetty.base" default="." />/<Property name="jetty.sslContext.trustStorePath" deprecated="jetty.truststore" default="etc/keystore"/> | ||
</Default> | ||
</Property> | ||
</Set> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than introduce a new property to resolve the absolute vs relative issue, might it not be better to introduce a static helper method:
<Set name="TrustStorePath"> | |
<Property name="jetty.sslContext.trustStoreAbsolutePath"> | |
<Default> | |
<Property name="jetty.base" default="." />/<Property name="jetty.sslContext.trustStorePath" deprecated="jetty.truststore" default="etc/keystore"/> | |
</Default> | |
</Property> | |
</Set> | |
<Set name="TrustStorePath"> | |
<Call class="org.eclipse.jetty.xml.XmlConfiguration" name="addPaths"> | |
<Arg><Property name="jetty.base" default="." /></Arg> | |
<Arg><Property name="jetty.sslContext.trustStorePath" deprecated="jetty.truststore" default="etc/keystore"/></Arg> | |
</Call> | |
</Set> |
Perhaps even URIUtil.addPaths can be used? Hmmm but then I guess we get caught up in portability issues and working out if C:some\path
is relative or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because existing users might have / and we remove // this approach is best for backwards compatibility
Introduced new properties jetty.sslContext.keyStoreAbsolutePath
and jetty.sslContext.trustStoreAbsolutePath to default to
${jetty.base}/etc/keystore.
Signed-off-by: Simone Bordet simone.bordet@gmail.com