Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

set security on acceptor on start

  • Loading branch information...
commit ee9676bd9f00c3c484828bafdee7218aeaf2081d 1 parent 55f6e60
@andytaylor andytaylor authored
View
8 hornetq-server/src/main/java/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
@@ -104,6 +104,8 @@
private final Map<ProtocolType, ProtocolManager> protocolMap = new ConcurrentHashMap<ProtocolType, ProtocolManager>();
+ private HornetQPrincipal defaultInvmSecurityPrincipal;
+
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
@@ -228,6 +230,11 @@ public ClassLoader run()
threadPool,
scheduledThreadPool);
+ if(defaultInvmSecurityPrincipal != null && acceptor.isUnsecurable())
+ {
+ acceptor.setDefaultHornetQPrincipal(defaultInvmSecurityPrincipal);
+ }
+
acceptors.add(acceptor);
if (managementService != null)
@@ -258,6 +265,7 @@ public ClassLoader run()
public synchronized void allowInvmSecurityOverride(HornetQPrincipal principal)
{
+ defaultInvmSecurityPrincipal = principal;
for (Acceptor acceptor : acceptors)
{
if(acceptor.isUnsecurable())

0 comments on commit ee9676b

Please sign in to comment.
Something went wrong with that request. Please try again.