Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[AS7-1387] First move SSL enablement into core OptionMap generation b…

…ased on realm definition.
  • Loading branch information...
commit 686bbe8c997426b86a6bd6b956871d5495d8adda 1 parent e490ccb
@darranl darranl authored bstansberry committed
View
3  remoting/src/main/java/org/jboss/as/remoting/EndpointService.java
@@ -33,7 +33,6 @@
import org.jboss.remoting3.Remoting;
import org.jboss.remoting3.remote.RemoteConnectionProviderFactory;
import org.xnio.OptionMap;
-import org.xnio.Options;
/**
* An MSC service for Remoting endpoints.
@@ -69,7 +68,7 @@ public synchronized void start(final StartContext context) throws StartException
boolean ok = false;
endpoint = Remoting.createEndpoint(endpointName, optionMap);
try {
- endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(), OptionMap.create(Options.SSL_ENABLED, Boolean.FALSE));
+ endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(), OptionMap.EMPTY);
ok = true;
} finally {
if (! ok) {
View
15 remoting/src/main/java/org/jboss/as/remoting/RealmAuthenticationProvider.java
@@ -25,6 +25,7 @@
import static org.xnio.Options.SASL_POLICY_NOANONYMOUS;
import static org.xnio.Options.SASL_POLICY_NOPLAINTEXT;
import static org.xnio.Options.SASL_PROPERTIES;
+import static org.xnio.Options.SSL_ENABLED;
import java.io.IOException;
import java.util.HashSet;
@@ -117,6 +118,8 @@ OptionMap getSaslOptionMap() {
builder.set(SASL_MECHANISMS, Sequence.of(mechanisms));
builder.set(SASL_PROPERTIES, Sequence.of(properties));
+ builder.set(SSL_ENABLED, isEnableSSL());
+
return builder.getMap();
}
@@ -209,6 +212,18 @@ private boolean handled(Callback[] callbacks) {
};
}
+ /**
+ * Indicates if SSL should be enabled based on the associated security realm.
+ *
+ * If enabled this RealmAuthenticationProvider will also need to supply a XnioSSL instance to
+ * wrap the SSLConext.
+ *
+ * @return true if an SSL identity has been defined for the associated security realm.
+ */
+ private boolean isEnableSSL() {
+ return false;
+ }
+
private boolean digestMd5Supported() {
if (realm == null) {
return false;
Please sign in to comment.
Something went wrong with that request. Please try again.