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

TLS support added #653

Merged
merged 7 commits into from
Nov 14, 2016
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,11 @@ static Map<String, String> parseOptions(Node parent) {
// Skip over other node types
}
}
optionsMap.put(node.getLocalName(), nodeValue);
String localName = node.getLocalName();
if (localName.contains("tls")) {
localName = localName.replace("tls", "ssl");
}
optionsMap.put(localName, nodeValue);
}
}
return optionsMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ private Map<String, DefaultSchemeContext> resolveSchemes(Collection<? extends Se
private SchemeConfig supplySchemeConfig(String schemeName) {
SchemeConfig schemeConfig = schemeConfigsByName.get(schemeName);
if (schemeConfig == null) {
if (schemeName.contains("tls")) {
schemeName = schemeName.replace("tls", "ssl");
}
schemeConfig = findSchemeConfig(schemeName);
if (schemeConfig == null) {
throw new IllegalArgumentException("Missing scheme \"" + schemeName + "\"");
Expand Down Expand Up @@ -742,6 +745,12 @@ private Collection<String> resolveURIs(String[] acceptURIs) throws URISyntaxExce
Collection<String> urisWithPort = new HashSet<>();
for (String uri : acceptURIs) {
String resolvedURI = resolveURI(getCanonicalURI(uri, true));
if (resolvedURI.contains("tls://")) {
resolvedURI = resolvedURI.replace("tls://", "ssl://");
if (resolvedURI.endsWith("/")) {
resolvedURI = resolvedURI.substring(0, resolvedURI.length() - 1);
}
}
urisWithPort.add(resolvedURI);
}
return urisWithPort;
Expand Down
73 changes: 73 additions & 0 deletions server/src/main/xsd/gateway-config-201511.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,14 @@
</documentation>
</annotation>
</element>
<element name="tls.ciphers" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
<documentation>A comma-separated list of
SSL/TLS ciphersuite names to be used for this
connection.
</documentation>
</annotation>
</element>
<element name="ssl.protocols" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
<documentation>A comma-separated list of
Expand All @@ -1206,6 +1214,16 @@
</documentation>
</annotation>
</element>
<element name="tls.protocols" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
<documentation>A comma-separated list of
SSL/TLS protocol names to be used for this
connection. The protocols names are SSLv2Hello, SSLv3, TLSv1, TLSv1.1,
TLSv1.2. If not specified explicitly, SSLv3 protocol is not
enabled by default (as it is known to have vulnerabilities).
</documentation>
</annotation>
</element>
<element name="ssl.encryption" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
Expand All @@ -1215,6 +1233,15 @@
</restriction>
</simpleType>
</element>
<element name="tls.encryption" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
<enumeration value="enabled"></enumeration>
<enumeration value="disabled"></enumeration>
<whiteSpace value="collapse"></whiteSpace>
</restriction>
</simpleType>
</element>
<element name="ssl.verify-client" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
Expand All @@ -1225,6 +1252,16 @@
</restriction>
</simpleType>
</element>
<element name="tls.verify-client" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
<enumeration value="none"></enumeration>
<enumeration value="optional"></enumeration>
<enumeration value="required"></enumeration>
<whiteSpace value="collapse"></whiteSpace>
</restriction>
</simpleType>
</element>
<element name="ws.bind" maxOccurs="1" minOccurs="0" type="gateway:CollapsedString">
<annotation/>
</element>
Expand All @@ -1240,6 +1277,9 @@
<element name="ssl.bind" maxOccurs="1" minOccurs="0" type="gateway:CollapsedString">
<annotation/>
</element>
<element name="tls.bind" maxOccurs="1" minOccurs="0" type="gateway:CollapsedString">
<annotation/>
</element>
<element name="tcp.bind" maxOccurs="1" minOccurs="0" type="gateway:CollapsedString">
<annotation/>
</element>
Expand All @@ -1261,6 +1301,9 @@
<element name="ssl.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
<element name="tls.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
<element name="http.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
Expand All @@ -1284,6 +1327,14 @@
</documentation>
</annotation>
</element>
<element name="tls.ciphers" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
<documentation>A comma-separated list of
SSL/TLS ciphersuite names to be used for this
connection.
</documentation>
</annotation>
</element>
<element name="ssl.protocols" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
<documentation>A comma-separated list of
Expand All @@ -1294,6 +1345,16 @@
</documentation>
</annotation>
</element>
<element name="tls.protocols" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
<documentation>A comma-separated list of
SSL/TLS protocol names to be used for this
connection. The protocols names are SSLv2Hello, SSLv3, TLSv1, TLSv1.1,
TLSv1.2. If not specified explicitly, SSLv3 protocol is not
enabled by default (as it is known to have vulnerabilities).
</documentation>
</annotation>
</element>
<element name="ssl.encryption" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
Expand All @@ -1303,6 +1364,15 @@
</restriction>
</simpleType>
</element>
<element name="tls.encryption" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
<enumeration value="enabled"></enumeration>
<enumeration value="disabled"></enumeration>
<whiteSpace value="collapse"></whiteSpace>
</restriction>
</simpleType>
</element>
<element name="tcp.bind" maxOccurs="1" minOccurs="0" type="gateway:CollapsedString">
<annotation/>
</element>
Expand All @@ -1318,6 +1388,9 @@
<element name="ssl.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
<element name="tls.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
<element name="http.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,14 @@
connection.
</documentation>
</annotation>
</element>
<element name="tls.ciphers" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
<documentation>A comma-separated list of
SSL/TLS ciphersuite names to be used for this
connection.
</documentation>
</annotation>
</element>
<element name="ssl.protocols" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
Expand All @@ -1206,6 +1214,16 @@
</documentation>
</annotation>
</element>
<element name="tls.protocols" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
<documentation>A comma-separated list of
SSL/TLS protocol names to be used for this
connection. The protocols names are SSLv2Hello, SSLv3, TLSv1, TLSv1.1,
TLSv1.2. If not specified explicitly, SSLv3 protocol is not
enabled by default (as it is known to have vulnerabilities).
</documentation>
</annotation>
</element>
<element name="ssl.encryption" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
Expand All @@ -1215,6 +1233,15 @@
</restriction>
</simpleType>
</element>
<element name="tls.encryption" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
<enumeration value="enabled"></enumeration>
<enumeration value="disabled"></enumeration>
<whiteSpace value="collapse"></whiteSpace>
</restriction>
</simpleType>
</element>
<element name="ssl.verify-client" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
Expand All @@ -1225,6 +1252,16 @@
</restriction>
</simpleType>
</element>
<element name="tls.verify-client" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
<enumeration value="none"></enumeration>
<enumeration value="optional"></enumeration>
<enumeration value="required"></enumeration>
<whiteSpace value="collapse"></whiteSpace>
</restriction>
</simpleType>
</element>
<element name="ws.bind" maxOccurs="1" minOccurs="0" type="gateway:CollapsedString">
<annotation/>
</element>
Expand All @@ -1240,6 +1277,9 @@
<element name="ssl.bind" maxOccurs="1" minOccurs="0" type="gateway:CollapsedString">
<annotation/>
</element>
<element name="tls.bind" maxOccurs="1" minOccurs="0" type="gateway:CollapsedString">
<annotation/>
</element>
<element name="tcp.bind" maxOccurs="1" minOccurs="0" type="gateway:CollapsedString">
<annotation/>
</element>
Expand All @@ -1261,6 +1301,9 @@
<element name="ssl.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
<element name="tls.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
<element name="http.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
Expand All @@ -1284,6 +1327,14 @@
</documentation>
</annotation>
</element>
<element name="tls.ciphers" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
<documentation>A comma-separated list of
SSL/TLS ciphersuite names to be used for this
connection.
</documentation>
</annotation>
</element>
<element name="ssl.protocols" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
<documentation>A comma-separated list of
Expand All @@ -1294,6 +1345,16 @@
</documentation>
</annotation>
</element>
<element name="tls.protocols" maxOccurs="1" minOccurs="0" type="gateway:CSVType">
<annotation>
<documentation>A comma-separated list of
SSL/TLS protocol names to be used for this
connection. The protocols names are SSLv2Hello, SSLv3, TLSv1, TLSv1.1,
TLSv1.2. If not specified explicitly, SSLv3 protocol is not
enabled by default (as it is known to have vulnerabilities).
</documentation>
</annotation>
</element>
<element name="ssl.encryption" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
Expand All @@ -1303,6 +1364,15 @@
</restriction>
</simpleType>
</element>
<element name="tls.encryption" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="string">
<enumeration value="enabled"></enumeration>
<enumeration value="disabled"></enumeration>
<whiteSpace value="collapse"></whiteSpace>
</restriction>
</simpleType>
</element>
<element name="tcp.bind" maxOccurs="1" minOccurs="0" type="gateway:CollapsedString">
<annotation/>
</element>
Expand All @@ -1318,6 +1388,9 @@
<element name="ssl.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
<element name="tls.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
<element name="http.transport" maxOccurs="1" minOccurs="0" type="anyURI">
<annotation/>
</element>
Expand Down
Loading