mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUAC-1132: Socket service is now really tunnel service.
This commit is contained in:
@@ -40,7 +40,7 @@ import org.glyptodon.guacamole.auth.jdbc.permission.SystemPermissionMapper;
|
||||
import org.glyptodon.guacamole.auth.jdbc.user.UserMapper;
|
||||
import org.glyptodon.guacamole.auth.jdbc.connectiongroup.ConnectionGroupService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.connection.ConnectionService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.GuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.GuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.security.PasswordEncryptionService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.security.SHA256PasswordEncryptionService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.security.SaltService;
|
||||
@@ -80,7 +80,7 @@ public class JDBCAuthenticationProviderModule extends MyBatisModule {
|
||||
* The service class to use to provide GuacamoleSockets for each
|
||||
* connection.
|
||||
*/
|
||||
private final Class<? extends GuacamoleSocketService> socketServiceClass;
|
||||
private final Class<? extends GuacamoleTunnelService> tunnelServiceClass;
|
||||
|
||||
/**
|
||||
* Creates a new JDBC authentication provider module that configures the
|
||||
@@ -90,13 +90,13 @@ public class JDBCAuthenticationProviderModule extends MyBatisModule {
|
||||
* @param environment
|
||||
* The environment to use to configure injected classes.
|
||||
*
|
||||
* @param socketServiceClass
|
||||
* @param tunnelServiceClass
|
||||
* The socket service to use to provide sockets for connections.
|
||||
*/
|
||||
public JDBCAuthenticationProviderModule(Environment environment,
|
||||
Class<? extends GuacamoleSocketService> socketServiceClass) {
|
||||
Class<? extends GuacamoleTunnelService> tunnelServiceClass) {
|
||||
this.environment = environment;
|
||||
this.socketServiceClass = socketServiceClass;
|
||||
this.tunnelServiceClass = tunnelServiceClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -147,7 +147,7 @@ public class JDBCAuthenticationProviderModule extends MyBatisModule {
|
||||
bind(UserService.class);
|
||||
|
||||
// Bind provided socket service
|
||||
bind(GuacamoleSocketService.class).to(socketServiceClass);
|
||||
bind(GuacamoleTunnelService.class).to(tunnelServiceClass);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -33,7 +33,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.glyptodon.guacamole.auth.jdbc.user.AuthenticatedUser;
|
||||
import org.glyptodon.guacamole.auth.jdbc.base.DirectoryObjectMapper;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.GuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.GuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.GuacamoleClientException;
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.GuacamoleSecurityException;
|
||||
@@ -91,7 +91,7 @@ public class ConnectionService extends GroupedDirectoryObjectService<ModeledConn
|
||||
* Service for creating and tracking sockets.
|
||||
*/
|
||||
@Inject
|
||||
private GuacamoleSocketService socketService;
|
||||
private GuacamoleTunnelService tunnelService;
|
||||
|
||||
@Override
|
||||
protected DirectoryObjectMapper<ConnectionModel> getObjectMapper() {
|
||||
@@ -371,7 +371,7 @@ public class ConnectionService extends GroupedDirectoryObjectService<ModeledConn
|
||||
List<ConnectionRecordModel> models = connectionRecordMapper.select(identifier);
|
||||
|
||||
// Get currently-active connections
|
||||
List<ConnectionRecord> records = new ArrayList<ConnectionRecord>(socketService.getActiveConnections(connection));
|
||||
List<ConnectionRecord> records = new ArrayList<ConnectionRecord>(tunnelService.getActiveConnections(connection));
|
||||
Collections.reverse(records);
|
||||
|
||||
// Add past connections from model objects
|
||||
@@ -415,7 +415,7 @@ public class ConnectionService extends GroupedDirectoryObjectService<ModeledConn
|
||||
|
||||
// Connect only if READ permission is granted
|
||||
if (hasObjectPermission(user, connection.getIdentifier(), ObjectPermission.Type.READ))
|
||||
return socketService.getGuacamoleTunnel(user, connection, info);
|
||||
return tunnelService.getGuacamoleTunnel(user, connection, info);
|
||||
|
||||
// The user does not have permission to connect
|
||||
throw new GuacamoleSecurityException("Permission denied.");
|
||||
|
@@ -25,7 +25,7 @@ package org.glyptodon.guacamole.auth.jdbc.connection;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import java.util.List;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.GuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.GuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.auth.jdbc.base.GroupedDirectoryObject;
|
||||
import org.glyptodon.guacamole.net.GuacamoleTunnel;
|
||||
@@ -54,7 +54,7 @@ public class ModeledConnection extends GroupedDirectoryObject<ConnectionModel>
|
||||
* Service for creating and tracking sockets.
|
||||
*/
|
||||
@Inject
|
||||
private GuacamoleSocketService socketService;
|
||||
private GuacamoleTunnelService tunnelService;
|
||||
|
||||
/**
|
||||
* Provider for lazy-loaded, permission-controlled configurations.
|
||||
@@ -120,7 +120,7 @@ public class ModeledConnection extends GroupedDirectoryObject<ConnectionModel>
|
||||
|
||||
@Override
|
||||
public int getActiveConnections() {
|
||||
return socketService.getActiveConnections(this).size();
|
||||
return tunnelService.getActiveConnections(this).size();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ import com.google.inject.Provider;
|
||||
import java.util.Set;
|
||||
import org.glyptodon.guacamole.auth.jdbc.user.AuthenticatedUser;
|
||||
import org.glyptodon.guacamole.auth.jdbc.base.DirectoryObjectMapper;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.GuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.GuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.GuacamoleClientException;
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.GuacamoleSecurityException;
|
||||
@@ -74,7 +74,7 @@ public class ConnectionGroupService extends GroupedDirectoryObjectService<Modele
|
||||
* Service for creating and tracking sockets.
|
||||
*/
|
||||
@Inject
|
||||
private GuacamoleSocketService socketService;
|
||||
private GuacamoleTunnelService tunnelService;
|
||||
|
||||
@Override
|
||||
protected DirectoryObjectMapper<ConnectionGroupModel> getObjectMapper() {
|
||||
@@ -247,7 +247,7 @@ public class ConnectionGroupService extends GroupedDirectoryObjectService<Modele
|
||||
|
||||
// Connect only if READ permission is granted
|
||||
if (hasObjectPermission(user, connectionGroup.getIdentifier(), ObjectPermission.Type.READ))
|
||||
return socketService.getGuacamoleTunnel(user, connectionGroup, info);
|
||||
return tunnelService.getGuacamoleTunnel(user, connectionGroup, info);
|
||||
|
||||
// The user does not have permission to connect
|
||||
throw new GuacamoleSecurityException("Permission denied.");
|
||||
|
@@ -25,7 +25,7 @@ package org.glyptodon.guacamole.auth.jdbc.connectiongroup;
|
||||
import com.google.inject.Inject;
|
||||
import java.util.Set;
|
||||
import org.glyptodon.guacamole.auth.jdbc.connection.ConnectionService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.GuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.GuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.auth.jdbc.base.GroupedDirectoryObject;
|
||||
import org.glyptodon.guacamole.net.GuacamoleTunnel;
|
||||
@@ -57,7 +57,7 @@ public class ModeledConnectionGroup extends GroupedDirectoryObject<ConnectionGro
|
||||
* Service for creating and tracking sockets.
|
||||
*/
|
||||
@Inject
|
||||
private GuacamoleSocketService socketService;
|
||||
private GuacamoleTunnelService tunnelService;
|
||||
|
||||
/**
|
||||
* Creates a new, empty ModeledConnectionGroup.
|
||||
@@ -83,7 +83,7 @@ public class ModeledConnectionGroup extends GroupedDirectoryObject<ConnectionGro
|
||||
|
||||
@Override
|
||||
public int getActiveConnections() {
|
||||
return socketService.getActiveConnections(this).size();
|
||||
return tunnelService.getActiveConnections(this).size();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.auth.jdbc.socket;
|
||||
package org.glyptodon.guacamole.auth.jdbc.tunnel;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
@@ -60,13 +60,13 @@ import org.mybatis.guice.transactional.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* Base implementation of the GuacamoleSocketService, handling retrieval of
|
||||
* Base implementation of the GuacamoleTunnelService, handling retrieval of
|
||||
* connection parameters, load balancing, and connection usage counts. The
|
||||
* implementation of concurrency rules is up to policy-specific subclasses.
|
||||
*
|
||||
* @author Michael Jumper
|
||||
*/
|
||||
public abstract class AbstractGuacamoleSocketService implements GuacamoleSocketService {
|
||||
public abstract class AbstractGuacamoleTunnelService implements GuacamoleTunnelService {
|
||||
|
||||
/**
|
||||
* The environment of the Guacamole server.
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.auth.jdbc.socket;
|
||||
package org.glyptodon.guacamole.auth.jdbc.tunnel;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.auth.jdbc.socket;
|
||||
package org.glyptodon.guacamole.auth.jdbc.tunnel;
|
||||
|
||||
import java.util.Date;
|
||||
import org.glyptodon.guacamole.auth.jdbc.connection.ModeledConnection;
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.auth.jdbc.socket;
|
||||
package org.glyptodon.guacamole.auth.jdbc.tunnel;
|
||||
|
||||
import com.google.inject.Singleton;
|
||||
import java.util.Collections;
|
||||
@@ -35,7 +35,7 @@ import org.glyptodon.guacamole.auth.jdbc.connectiongroup.ModeledConnectionGroup;
|
||||
|
||||
|
||||
/**
|
||||
* GuacamoleSocketService implementation which allows only one user per
|
||||
* GuacamoleTunnelService implementation which allows only one user per
|
||||
* connection at any time, but does not disallow concurrent use of connection
|
||||
* groups. If a user attempts to use a connection group multiple times, they
|
||||
* will receive different underlying connections each time until the group is
|
||||
@@ -44,8 +44,8 @@ import org.glyptodon.guacamole.auth.jdbc.connectiongroup.ModeledConnectionGroup;
|
||||
* @author Michael Jumper
|
||||
*/
|
||||
@Singleton
|
||||
public class BalancedGuacamoleSocketService
|
||||
extends AbstractGuacamoleSocketService {
|
||||
public class BalancedGuacamoleTunnelService
|
||||
extends AbstractGuacamoleTunnelService {
|
||||
|
||||
/**
|
||||
* The set of all active connection identifiers.
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.auth.jdbc.socket;
|
||||
package org.glyptodon.guacamole.auth.jdbc.tunnel;
|
||||
|
||||
import java.util.Collection;
|
||||
import org.glyptodon.guacamole.auth.jdbc.user.AuthenticatedUser;
|
||||
@@ -40,7 +40,7 @@ import org.glyptodon.guacamole.protocol.GuacamoleClientInformation;
|
||||
*
|
||||
* @author Michael Jumper
|
||||
*/
|
||||
public interface GuacamoleSocketService {
|
||||
public interface GuacamoleTunnelService {
|
||||
|
||||
/**
|
||||
* Returns a connection containing connection records representing all
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.auth.jdbc.socket;
|
||||
package org.glyptodon.guacamole.auth.jdbc.tunnel;
|
||||
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.net.InetGuacamoleSocket;
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.auth.jdbc.socket;
|
||||
package org.glyptodon.guacamole.auth.jdbc.tunnel;
|
||||
|
||||
import com.google.inject.Singleton;
|
||||
import java.util.Arrays;
|
||||
@@ -38,15 +38,15 @@ import org.glyptodon.guacamole.auth.jdbc.connectiongroup.ModeledConnectionGroup;
|
||||
|
||||
|
||||
/**
|
||||
* GuacamoleSocketService implementation which restricts concurrency only on a
|
||||
* GuacamoleTunnelService implementation which restricts concurrency only on a
|
||||
* per-user basis. Each connection or group may be used concurrently any number
|
||||
* of times, but each concurrent use must be associated with a different user.
|
||||
*
|
||||
* @author Michael Jumper
|
||||
*/
|
||||
@Singleton
|
||||
public class MultiseatGuacamoleSocketService
|
||||
extends AbstractGuacamoleSocketService {
|
||||
public class MultiseatGuacamoleTunnelService
|
||||
extends AbstractGuacamoleTunnelService {
|
||||
|
||||
/**
|
||||
* The set of all active user/connection pairs.
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.auth.jdbc.socket;
|
||||
package org.glyptodon.guacamole.auth.jdbc.tunnel;
|
||||
|
||||
/**
|
||||
* A unique pairing of user and connection or connection group.
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.auth.jdbc.socket;
|
||||
package org.glyptodon.guacamole.auth.jdbc.tunnel;
|
||||
|
||||
import com.google.inject.Singleton;
|
||||
import java.util.Collections;
|
||||
@@ -36,7 +36,7 @@ import org.glyptodon.guacamole.auth.jdbc.connectiongroup.ModeledConnectionGroup;
|
||||
|
||||
|
||||
/**
|
||||
* GuacamoleSocketService implementation which allows exactly one use
|
||||
* GuacamoleTunnelService implementation which allows exactly one use
|
||||
* of any connection at any time. Concurrent usage of connections is not
|
||||
* allowed, and concurrent usage of connection groups is allowed only between
|
||||
* different users.
|
||||
@@ -44,8 +44,8 @@ import org.glyptodon.guacamole.auth.jdbc.connectiongroup.ModeledConnectionGroup;
|
||||
* @author Michael Jumper
|
||||
*/
|
||||
@Singleton
|
||||
public class SingleSeatGuacamoleSocketService
|
||||
extends AbstractGuacamoleSocketService {
|
||||
public class SingleSeatGuacamoleTunnelService
|
||||
extends AbstractGuacamoleTunnelService {
|
||||
|
||||
/**
|
||||
* The set of all active connection identifiers.
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.auth.jdbc.socket;
|
||||
package org.glyptodon.guacamole.auth.jdbc.tunnel;
|
||||
|
||||
import com.google.inject.Singleton;
|
||||
import java.util.List;
|
||||
@@ -31,14 +31,14 @@ import org.glyptodon.guacamole.auth.jdbc.connectiongroup.ModeledConnectionGroup;
|
||||
|
||||
|
||||
/**
|
||||
* GuacamoleSocketService implementation which imposes no restrictions
|
||||
* GuacamoleTunnelService implementation which imposes no restrictions
|
||||
* whatsoever on the number of concurrent or duplicate connections.
|
||||
*
|
||||
* @author Michael Jumper
|
||||
*/
|
||||
@Singleton
|
||||
public class UnrestrictedGuacamoleSocketService
|
||||
extends AbstractGuacamoleSocketService {
|
||||
public class UnrestrictedGuacamoleTunnelService
|
||||
extends AbstractGuacamoleTunnelService {
|
||||
|
||||
@Override
|
||||
protected ModeledConnection acquire(AuthenticatedUser user,
|
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Classes related to obtaining/configuring Guacamole sockets, and restricting
|
||||
* access to those sockets.
|
||||
* Classes related to obtaining/configuring Guacamole tunnels, and restricting
|
||||
* access to those tunnels.
|
||||
*/
|
||||
package org.glyptodon.guacamole.auth.jdbc.socket;
|
||||
package org.glyptodon.guacamole.auth.jdbc.tunnel;
|
@@ -32,7 +32,7 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.auth.jdbc.base.RestrictedObject;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.GuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.GuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.net.auth.Connection;
|
||||
import org.glyptodon.guacamole.net.auth.ConnectionGroup;
|
||||
import org.glyptodon.guacamole.net.auth.ConnectionRecord;
|
||||
@@ -53,7 +53,7 @@ public class UserContext extends RestrictedObject
|
||||
* Service for creating and tracking sockets.
|
||||
*/
|
||||
@Inject
|
||||
private GuacamoleSocketService socketService;
|
||||
private GuacamoleTunnelService tunnelService;
|
||||
|
||||
/**
|
||||
* User directory restricted by the permissions of the user associated
|
||||
@@ -127,7 +127,7 @@ public class UserContext extends RestrictedObject
|
||||
@Override
|
||||
public Collection<ConnectionRecord> getActiveConnections()
|
||||
throws GuacamoleException {
|
||||
return socketService.getActiveConnections(getCurrentUser());
|
||||
return tunnelService.getActiveConnections(getCurrentUser());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -29,11 +29,11 @@ import org.glyptodon.guacamole.net.auth.AuthenticationProvider;
|
||||
import org.glyptodon.guacamole.net.auth.Credentials;
|
||||
import org.glyptodon.guacamole.net.auth.UserContext;
|
||||
import org.glyptodon.guacamole.auth.jdbc.JDBCAuthenticationProviderModule;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.GuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.MultiseatGuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.BalancedGuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.SingleSeatGuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.UnrestrictedGuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.GuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.MultiseatGuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.BalancedGuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.SingleSeatGuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.UnrestrictedGuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.user.UserContextService;
|
||||
import org.glyptodon.guacamole.environment.Environment;
|
||||
import org.glyptodon.guacamole.environment.LocalEnvironment;
|
||||
@@ -69,7 +69,7 @@ public class MySQLAuthenticationProvider implements AuthenticationProvider {
|
||||
* @throws GuacamoleException
|
||||
* If an error occurs while reading the configuration options.
|
||||
*/
|
||||
private Class<? extends GuacamoleSocketService>
|
||||
private Class<? extends GuacamoleTunnelService>
|
||||
getSocketServiceClass(Environment environment)
|
||||
throws GuacamoleException {
|
||||
|
||||
@@ -81,11 +81,11 @@ public class MySQLAuthenticationProvider implements AuthenticationProvider {
|
||||
|
||||
// Connections may not be used concurrently
|
||||
if (disallowDuplicate)
|
||||
return SingleSeatGuacamoleSocketService.class;
|
||||
return SingleSeatGuacamoleTunnelService.class;
|
||||
|
||||
// Connections are reserved for a single user when in use
|
||||
else
|
||||
return BalancedGuacamoleSocketService.class;
|
||||
return BalancedGuacamoleTunnelService.class;
|
||||
|
||||
}
|
||||
|
||||
@@ -93,11 +93,11 @@ public class MySQLAuthenticationProvider implements AuthenticationProvider {
|
||||
|
||||
// Connections may be used concurrently, but only once per user
|
||||
if (disallowDuplicate)
|
||||
return MultiseatGuacamoleSocketService.class;
|
||||
return MultiseatGuacamoleTunnelService.class;
|
||||
|
||||
// Connection use is not restricted
|
||||
else
|
||||
return UnrestrictedGuacamoleSocketService.class;
|
||||
return UnrestrictedGuacamoleTunnelService.class;
|
||||
|
||||
}
|
||||
|
||||
|
@@ -29,11 +29,11 @@ import org.glyptodon.guacamole.net.auth.AuthenticationProvider;
|
||||
import org.glyptodon.guacamole.net.auth.Credentials;
|
||||
import org.glyptodon.guacamole.net.auth.UserContext;
|
||||
import org.glyptodon.guacamole.auth.jdbc.JDBCAuthenticationProviderModule;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.BalancedGuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.GuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.MultiseatGuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.SingleSeatGuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.socket.UnrestrictedGuacamoleSocketService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.BalancedGuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.GuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.MultiseatGuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.SingleSeatGuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.tunnel.UnrestrictedGuacamoleTunnelService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.user.UserContextService;
|
||||
import org.glyptodon.guacamole.environment.Environment;
|
||||
import org.glyptodon.guacamole.environment.LocalEnvironment;
|
||||
@@ -68,7 +68,7 @@ public class PostgreSQLAuthenticationProvider implements AuthenticationProvider
|
||||
* @throws GuacamoleException
|
||||
* If an error occurs while reading the configuration options.
|
||||
*/
|
||||
private Class<? extends GuacamoleSocketService>
|
||||
private Class<? extends GuacamoleTunnelService>
|
||||
getSocketServiceClass(Environment environment)
|
||||
throws GuacamoleException {
|
||||
|
||||
@@ -80,11 +80,11 @@ public class PostgreSQLAuthenticationProvider implements AuthenticationProvider
|
||||
|
||||
// Connections may not be used concurrently
|
||||
if (disallowDuplicate)
|
||||
return SingleSeatGuacamoleSocketService.class;
|
||||
return SingleSeatGuacamoleTunnelService.class;
|
||||
|
||||
// Connections are reserved for a single user when in use
|
||||
else
|
||||
return BalancedGuacamoleSocketService.class;
|
||||
return BalancedGuacamoleTunnelService.class;
|
||||
|
||||
}
|
||||
|
||||
@@ -92,11 +92,11 @@ public class PostgreSQLAuthenticationProvider implements AuthenticationProvider
|
||||
|
||||
// Connections may be used concurrently, but only once per user
|
||||
if (disallowDuplicate)
|
||||
return MultiseatGuacamoleSocketService.class;
|
||||
return MultiseatGuacamoleTunnelService.class;
|
||||
|
||||
// Connection use is not restricted
|
||||
else
|
||||
return UnrestrictedGuacamoleSocketService.class;
|
||||
return UnrestrictedGuacamoleTunnelService.class;
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user