mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
GUACAMOLE-102: Initial addition of connection weight to JDBC authentication extension
This commit is contained in:
committed by
Nick Couchman
parent
91920d0b2d
commit
025f77d1c4
@@ -81,6 +81,17 @@ public abstract class JDBCEnvironment extends LocalEnvironment {
|
|||||||
* If an error occurs while retrieving the property.
|
* If an error occurs while retrieving the property.
|
||||||
*/
|
*/
|
||||||
public abstract int getDefaultMaxConnections() throws GuacamoleException;
|
public abstract int getDefaultMaxConnections() throws GuacamoleException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the connection weight for the purpose of WRR calculation
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The weight of the connection.
|
||||||
|
*
|
||||||
|
* @throws GuacamoleException
|
||||||
|
* If an error occurs while retrieving the property.
|
||||||
|
*/
|
||||||
|
public abstract int getConnectionWeight() throws GuacamoleException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the default maximum number of concurrent connections to allow to
|
* Returns the default maximum number of concurrent connections to allow to
|
||||||
|
@@ -54,6 +54,13 @@ public class ConnectionModel extends ChildObjectModel {
|
|||||||
*/
|
*/
|
||||||
private Integer maxConnectionsPerUser;
|
private Integer maxConnectionsPerUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The weight of the connection for the purposes of calculating
|
||||||
|
* WRR algorithm. null indicates nothing has been set, -1 indicates
|
||||||
|
* the system is unavailable.
|
||||||
|
*/
|
||||||
|
private Integer connectionWeight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The identifiers of all readable sharing profiles associated with this
|
* The identifiers of all readable sharing profiles associated with this
|
||||||
* connection.
|
* connection.
|
||||||
@@ -164,6 +171,29 @@ public class ConnectionModel extends ChildObjectModel {
|
|||||||
return maxConnectionsPerUser;
|
return maxConnectionsPerUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the connection weight.
|
||||||
|
*
|
||||||
|
* @param connectionWeight
|
||||||
|
* The weight of the connection. null is acceptable, -1 indicates the
|
||||||
|
* connection should not be used.
|
||||||
|
*/
|
||||||
|
public void setConnectionWeight(Integer connectionWeight) {
|
||||||
|
this.connectionWeight = connectionWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the connection weight used in calculating the
|
||||||
|
* WRR algorithm.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The connection weight. Null indicates no weight has been set,
|
||||||
|
* -1 indicates that the system is unavailable.
|
||||||
|
*/
|
||||||
|
public Integer getConnectionWeight() {
|
||||||
|
return connectionWeight;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the maximum number of connections that can be established to this
|
* Sets the maximum number of connections that can be established to this
|
||||||
* connection concurrently by any one user.
|
* connection concurrently by any one user.
|
||||||
|
@@ -116,6 +116,11 @@ public class ModeledConnection extends ModeledChildDirectoryObject<ConnectionMod
|
|||||||
*/
|
*/
|
||||||
public static final String MAX_CONNECTIONS_PER_USER_NAME = "max-connections-per-user";
|
public static final String MAX_CONNECTIONS_PER_USER_NAME = "max-connections-per-user";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The connection weight for the WRR algorithm.
|
||||||
|
*/
|
||||||
|
public static final String CONNECTION_WEIGHT = "connection-weight";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All attributes related to restricting user accounts, within a logical
|
* All attributes related to restricting user accounts, within a logical
|
||||||
* form.
|
* form.
|
||||||
@@ -265,6 +270,9 @@ public class ModeledConnection extends ModeledChildDirectoryObject<ConnectionMod
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set connection weight
|
||||||
|
attributes.put(CONNECTION_WEIGHT, NumericField.format(getModel().getConnectionWeight()));
|
||||||
|
|
||||||
return attributes;
|
return attributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -310,6 +318,13 @@ public class ModeledConnection extends ModeledChildDirectoryObject<ConnectionMod
|
|||||||
else
|
else
|
||||||
getModel().setProxyEncryptionMethod(null);
|
getModel().setProxyEncryptionMethod(null);
|
||||||
|
|
||||||
|
// Translate connection weight attribute
|
||||||
|
try { getModel().setConnectionWeight(NumericField.parse(attributes.get(CONNECTION_WEIGHT))); }
|
||||||
|
catch (NumberFormatException e) {
|
||||||
|
logger.warn("Not setting the connection weight: {}", e.getMessage());
|
||||||
|
logger.debug("Unable to parse numeric attribute.", e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -394,6 +409,25 @@ public class ModeledConnection extends ModeledChildDirectoryObject<ConnectionMod
|
|||||||
encryptionMethod != null ? encryptionMethod : defaultConfig.getEncryptionMethod()
|
encryptionMethod != null ? encryptionMethod : defaultConfig.getEncryptionMethod()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the weight of the connection, or the default.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The weight of the connection.
|
||||||
|
*
|
||||||
|
* @throws GuacamoleException
|
||||||
|
* If an error occurs while parsing the concurrency limit properties
|
||||||
|
* specified within guacamole.properties.
|
||||||
|
*/
|
||||||
|
public int getConnectionWeight() throws GuacamoleException {
|
||||||
|
|
||||||
|
// Pull default from environment if weight is unset
|
||||||
|
Integer value = getModel().getConnectionWeight();
|
||||||
|
if (value == null)
|
||||||
|
return environment.getDefaultConnectionWeight();
|
||||||
|
|
||||||
|
// Otherwise use defined value
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,8 @@ import org.apache.guacamole.GuacamoleResourceConflictException;
|
|||||||
import org.apache.guacamole.auth.jdbc.JDBCEnvironment;
|
import org.apache.guacamole.auth.jdbc.JDBCEnvironment;
|
||||||
import org.apache.guacamole.auth.jdbc.connectiongroup.ModeledConnectionGroup;
|
import org.apache.guacamole.auth.jdbc.connectiongroup.ModeledConnectionGroup;
|
||||||
import org.apache.guacamole.auth.jdbc.user.RemoteAuthenticatedUser;
|
import org.apache.guacamole.auth.jdbc.user.RemoteAuthenticatedUser;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,6 +46,11 @@ import org.apache.guacamole.auth.jdbc.user.RemoteAuthenticatedUser;
|
|||||||
public class RestrictedGuacamoleTunnelService
|
public class RestrictedGuacamoleTunnelService
|
||||||
extends AbstractGuacamoleTunnelService {
|
extends AbstractGuacamoleTunnelService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logger for this class.
|
||||||
|
*/
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(RestrictedGuacamoleTunnelService.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The environment of the Guacamole server.
|
* The environment of the Guacamole server.
|
||||||
*/
|
*/
|
||||||
@@ -166,20 +173,24 @@ public class RestrictedGuacamoleTunnelService
|
|||||||
protected ModeledConnection acquire(RemoteAuthenticatedUser user,
|
protected ModeledConnection acquire(RemoteAuthenticatedUser user,
|
||||||
List<ModeledConnection> connections) throws GuacamoleException {
|
List<ModeledConnection> connections) throws GuacamoleException {
|
||||||
|
|
||||||
|
logger.trace("Attempting to acquire a connection...");
|
||||||
// Do not acquire connection unless within overall limits
|
// Do not acquire connection unless within overall limits
|
||||||
if (!tryIncrement(totalActiveConnections, environment.getAbsoluteMaxConnections()))
|
if (!tryIncrement(totalActiveConnections, environment.getAbsoluteMaxConnections()))
|
||||||
throw new GuacamoleResourceConflictException("Cannot connect. Overall maximum connections reached.");
|
throw new GuacamoleResourceConflictException("Cannot connect. Overall maximum connections reached.");
|
||||||
|
|
||||||
// Get username
|
// Get username
|
||||||
String username = user.getIdentifier();
|
String username = user.getIdentifier();
|
||||||
|
logger.trace("Username is: {}", username);
|
||||||
|
|
||||||
|
logger.trace("Sorting {} connections.", connections.size());
|
||||||
// Sort connections in ascending order of usage
|
// Sort connections in ascending order of usage
|
||||||
ModeledConnection[] sortedConnections = connections.toArray(new ModeledConnection[connections.size()]);
|
ModeledConnection[] sortedConnections = connections.toArray(new ModeledConnection[connections.size()]);
|
||||||
Arrays.sort(sortedConnections, new Comparator<ModeledConnection>() {
|
Arrays.sort(sortedConnections, new Comparator<ModeledConnection>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compare(ModeledConnection a, ModeledConnection b) {
|
public int compare(ModeledConnection a, ModeledConnection b) {
|
||||||
|
|
||||||
|
logger.trace("Comparing {} to {}.", a.getName(), b.getName());
|
||||||
return getActiveConnections(a).size()
|
return getActiveConnections(a).size()
|
||||||
- getActiveConnections(b).size();
|
- getActiveConnections(b).size();
|
||||||
|
|
||||||
@@ -194,15 +205,18 @@ public class RestrictedGuacamoleTunnelService
|
|||||||
for (ModeledConnection connection : sortedConnections) {
|
for (ModeledConnection connection : sortedConnections) {
|
||||||
|
|
||||||
// Attempt to aquire connection according to per-user limits
|
// Attempt to aquire connection according to per-user limits
|
||||||
|
logger.trace("Trying to grab a seat on this train: {}", connection.getName());
|
||||||
Seat seat = new Seat(username, connection.getIdentifier());
|
Seat seat = new Seat(username, connection.getIdentifier());
|
||||||
if (tryAdd(activeSeats, seat,
|
if (tryAdd(activeSeats, seat,
|
||||||
connection.getMaxConnectionsPerUser())) {
|
connection.getMaxConnectionsPerUser())) {
|
||||||
|
|
||||||
|
logger.trace("Got a seat, trying to get the connection...");
|
||||||
// Attempt to aquire connection according to overall limits
|
// Attempt to aquire connection according to overall limits
|
||||||
if (tryAdd(activeConnections, connection.getIdentifier(),
|
if (tryAdd(activeConnections, connection.getIdentifier(),
|
||||||
connection.getMaxConnections()))
|
connection.getMaxConnections()))
|
||||||
return connection;
|
return connection;
|
||||||
|
|
||||||
|
logger.trace("Uh-oh, failed to get the connection...");
|
||||||
// Acquire failed - retry with next connection
|
// Acquire failed - retry with next connection
|
||||||
activeSeats.remove(seat);
|
activeSeats.remove(seat);
|
||||||
|
|
||||||
@@ -213,6 +227,7 @@ public class RestrictedGuacamoleTunnelService
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.trace("Well, we failed to get a seat at all...");
|
||||||
// Acquire failed
|
// Acquire failed
|
||||||
totalActiveConnections.decrementAndGet();
|
totalActiveConnections.decrementAndGet();
|
||||||
|
|
||||||
|
@@ -34,7 +34,6 @@ CREATE TABLE `guacamole_connection_group` (
|
|||||||
`max_connections_per_user` int(11),
|
`max_connections_per_user` int(11),
|
||||||
`enable_session_affinity` boolean NOT NULL DEFAULT 0,
|
`enable_session_affinity` boolean NOT NULL DEFAULT 0,
|
||||||
|
|
||||||
|
|
||||||
PRIMARY KEY (`connection_group_id`),
|
PRIMARY KEY (`connection_group_id`),
|
||||||
UNIQUE KEY `connection_group_name_parent` (`connection_group_name`, `parent_id`),
|
UNIQUE KEY `connection_group_name_parent` (`connection_group_name`, `parent_id`),
|
||||||
|
|
||||||
@@ -65,6 +64,10 @@ CREATE TABLE `guacamole_connection` (
|
|||||||
-- Concurrency limits
|
-- Concurrency limits
|
||||||
`max_connections` int(11),
|
`max_connections` int(11),
|
||||||
`max_connections_per_user` int(11),
|
`max_connections_per_user` int(11),
|
||||||
|
|
||||||
|
-- Connection weight
|
||||||
|
`connection_weight` int(11),
|
||||||
|
|
||||||
|
|
||||||
PRIMARY KEY (`connection_id`),
|
PRIMARY KEY (`connection_id`),
|
||||||
UNIQUE KEY `connection_name_parent` (`connection_name`, `parent_id`),
|
UNIQUE KEY `connection_name_parent` (`connection_name`, `parent_id`),
|
||||||
|
@@ -0,0 +1,25 @@
|
|||||||
|
--
|
||||||
|
-- Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
-- or more contributor license agreements. See the NOTICE file
|
||||||
|
-- distributed with this work for additional information
|
||||||
|
-- regarding copyright ownership. The ASF licenses this file
|
||||||
|
-- to you under the Apache License, Version 2.0 (the
|
||||||
|
-- "License"); you may not use this file except in compliance
|
||||||
|
-- with the License. You may obtain a copy of the License at
|
||||||
|
--
|
||||||
|
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
--
|
||||||
|
-- Unless required by applicable law or agreed to in writing,
|
||||||
|
-- software distributed under the License is distributed on an
|
||||||
|
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
-- KIND, either express or implied. See the License for the
|
||||||
|
-- specific language governing permissions and limitations
|
||||||
|
-- under the License.
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Add per-user password set date
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE guacamole_connection
|
||||||
|
ADD COLUMN connection_weight int(11);
|
@@ -87,6 +87,11 @@ public class MySQLEnvironment extends JDBCEnvironment {
|
|||||||
*/
|
*/
|
||||||
private int DEFAULT_MAX_CONNECTIONS = 0;
|
private int DEFAULT_MAX_CONNECTIONS = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default value for the connection weight for a connection in
|
||||||
|
* a balancing group.
|
||||||
|
private int DEFAULT_CONNECTION_WEIGHT = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default value for the default maximum number of connections to be
|
* The default value for the default maximum number of connections to be
|
||||||
* allowed to any one connection group. Note that, as long as the legacy
|
* allowed to any one connection group. Note that, as long as the legacy
|
||||||
@@ -194,6 +199,14 @@ public class MySQLEnvironment extends JDBCEnvironment {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDefaultConnectionWeight() throws GuacamoleException {
|
||||||
|
return getProperty(
|
||||||
|
MySQLGuacamoleProperties.MYSQL_DEFAULT_CONNECTION_WEIGHT,
|
||||||
|
DEFAULT_CONNECTION_WEIGHT
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getDefaultMaxGroupConnections() throws GuacamoleException {
|
public int getDefaultMaxGroupConnections() throws GuacamoleException {
|
||||||
return getProperty(
|
return getProperty(
|
||||||
|
@@ -174,6 +174,18 @@ public class MySQLGuacamoleProperties {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The connection weight for connections in balancing groups.
|
||||||
|
*/
|
||||||
|
public static final IntegerGuacamoleProperty
|
||||||
|
MYSQL_DEFAULT_CONNECTION_WEIGHT =
|
||||||
|
new IntegerGuacamoleProperty() {
|
||||||
|
|
||||||
|
@Overide
|
||||||
|
public String getName() { return "mysql-default-connection-weight"; }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum number of concurrent connections to allow to any one
|
* The maximum number of concurrent connections to allow to any one
|
||||||
* connection group by an individual user. Zero denotes
|
* connection group by an individual user. Zero denotes
|
||||||
|
@@ -87,6 +87,11 @@ public class PostgreSQLEnvironment extends JDBCEnvironment {
|
|||||||
*/
|
*/
|
||||||
private int DEFAULT_MAX_CONNECTIONS = 0;
|
private int DEFAULT_MAX_CONNECTIONS = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default value for the connection weight for a connection in
|
||||||
|
* a balancing group.
|
||||||
|
private int DEFAULT_CONNECTION_WEIGHT = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default value for the default maximum number of connections to be
|
* The default value for the default maximum number of connections to be
|
||||||
* allowed to any one connection group. Note that, as long as the legacy
|
* allowed to any one connection group. Note that, as long as the legacy
|
||||||
@@ -194,6 +199,14 @@ public class PostgreSQLEnvironment extends JDBCEnvironment {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDefaultConnectionWeight() throws GuacamoleException {
|
||||||
|
return getProperty(
|
||||||
|
PostgreSQLGuacamoleProperties.POSTGRESQL_DEFAULT_CONNECTION_WEIGHT,
|
||||||
|
DEFAULT_CONNECTION_WEIGHT
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getDefaultMaxGroupConnections() throws GuacamoleException {
|
public int getDefaultMaxGroupConnections() throws GuacamoleException {
|
||||||
return getProperty(
|
return getProperty(
|
||||||
|
@@ -157,6 +157,15 @@ public class PostgreSQLGuacamoleProperties {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static final IntegerGuacamoleProperty
|
||||||
|
POSTGRESQL_DEFAULT_CONNECTION_WEIGHT =
|
||||||
|
new IntegerGuacamoleProperty() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() { return "postgresql-default-connection-weight"; }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum number of concurrent connections to allow to any one
|
* The maximum number of concurrent connections to allow to any one
|
||||||
* connection group. Zero denotes unlimited.
|
* connection group. Zero denotes unlimited.
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
<result column="proxy_port" property="proxyPort" jdbcType="INTEGER"/>
|
<result column="proxy_port" property="proxyPort" jdbcType="INTEGER"/>
|
||||||
<result column="proxy_encryption_method" property="proxyEncryptionMethod" jdbcType="VARCHAR"
|
<result column="proxy_encryption_method" property="proxyEncryptionMethod" jdbcType="VARCHAR"
|
||||||
javaType="org.apache.guacamole.net.auth.GuacamoleProxyConfiguration$EncryptionMethod"/>
|
javaType="org.apache.guacamole.net.auth.GuacamoleProxyConfiguration$EncryptionMethod"/>
|
||||||
|
<result column="connection_weight" property="connectionWeight" jdbcType="INTEGER"/>
|
||||||
|
|
||||||
<!-- Associated sharing profiles -->
|
<!-- Associated sharing profiles -->
|
||||||
<collection property="sharingProfileIdentifiers" resultSet="sharingProfiles" ofType="java.lang.String"
|
<collection property="sharingProfileIdentifiers" resultSet="sharingProfiles" ofType="java.lang.String"
|
||||||
@@ -95,7 +96,8 @@
|
|||||||
max_connections_per_user,
|
max_connections_per_user,
|
||||||
proxy_hostname,
|
proxy_hostname,
|
||||||
proxy_port,
|
proxy_port,
|
||||||
proxy_encryption_method
|
proxy_encryption_method,
|
||||||
|
connection_weight
|
||||||
FROM guacamole_connection
|
FROM guacamole_connection
|
||||||
WHERE connection_id IN
|
WHERE connection_id IN
|
||||||
<foreach collection="identifiers" item="identifier"
|
<foreach collection="identifiers" item="identifier"
|
||||||
@@ -126,7 +128,8 @@
|
|||||||
max_connections_per_user,
|
max_connections_per_user,
|
||||||
proxy_hostname,
|
proxy_hostname,
|
||||||
proxy_port,
|
proxy_port,
|
||||||
proxy_encryption_method
|
proxy_encryption_method,
|
||||||
|
connection_weight
|
||||||
FROM guacamole_connection
|
FROM guacamole_connection
|
||||||
JOIN guacamole_connection_permission ON guacamole_connection_permission.connection_id = guacamole_connection.connection_id
|
JOIN guacamole_connection_permission ON guacamole_connection_permission.connection_id = guacamole_connection.connection_id
|
||||||
WHERE guacamole_connection.connection_id IN
|
WHERE guacamole_connection.connection_id IN
|
||||||
@@ -162,7 +165,8 @@
|
|||||||
max_connections_per_user,
|
max_connections_per_user,
|
||||||
proxy_hostname,
|
proxy_hostname,
|
||||||
proxy_port,
|
proxy_port,
|
||||||
proxy_encryption_method
|
proxy_encryption_method,
|
||||||
|
connection_weight
|
||||||
FROM guacamole_connection
|
FROM guacamole_connection
|
||||||
WHERE
|
WHERE
|
||||||
<if test="parentIdentifier != null">parent_id = #{parentIdentifier,jdbcType=INTEGER}::integer</if>
|
<if test="parentIdentifier != null">parent_id = #{parentIdentifier,jdbcType=INTEGER}::integer</if>
|
||||||
@@ -189,7 +193,8 @@
|
|||||||
max_connections_per_user,
|
max_connections_per_user,
|
||||||
proxy_hostname,
|
proxy_hostname,
|
||||||
proxy_port,
|
proxy_port,
|
||||||
proxy_encryption_method
|
proxy_encryption_method,
|
||||||
|
connection_weight
|
||||||
)
|
)
|
||||||
VALUES (
|
VALUES (
|
||||||
#{object.name,jdbcType=VARCHAR},
|
#{object.name,jdbcType=VARCHAR},
|
||||||
@@ -199,7 +204,8 @@
|
|||||||
#{object.maxConnectionsPerUser,jdbcType=INTEGER},
|
#{object.maxConnectionsPerUser,jdbcType=INTEGER},
|
||||||
#{object.proxyHostname,jdbcType=VARCHAR},
|
#{object.proxyHostname,jdbcType=VARCHAR},
|
||||||
#{object.proxyPort,jdbcType=INTEGER},
|
#{object.proxyPort,jdbcType=INTEGER},
|
||||||
#{object.proxyEncryptionMethod,jdbcType=VARCHAR}::guacamole_proxy_encryption_method
|
#{object.proxyEncryptionMethod,jdbcType=VARCHAR}::guacamole_proxy_encryption_method,
|
||||||
|
#{object.connectionWeight,jdbcType=INTEGER}
|
||||||
)
|
)
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
@@ -214,7 +220,8 @@
|
|||||||
max_connections_per_user = #{object.maxConnectionsPerUser,jdbcType=INTEGER},
|
max_connections_per_user = #{object.maxConnectionsPerUser,jdbcType=INTEGER},
|
||||||
proxy_hostname = #{object.proxyHostname,jdbcType=VARCHAR},
|
proxy_hostname = #{object.proxyHostname,jdbcType=VARCHAR},
|
||||||
proxy_port = #{object.proxyPort,jdbcType=INTEGER},
|
proxy_port = #{object.proxyPort,jdbcType=INTEGER},
|
||||||
proxy_encryption_method = #{object.proxyEncryptionMethod,jdbcType=VARCHAR}::guacamole_proxy_encryption_method
|
proxy_encryption_method = #{object.proxyEncryptionMethod,jdbcType=VARCHAR}::guacamole_proxy_encryption_method,
|
||||||
|
connection_weight = #{object.connectionWeight,jdbcType=INTEGER}
|
||||||
WHERE connection_id = #{object.objectID,jdbcType=INTEGER}::integer
|
WHERE connection_id = #{object.objectID,jdbcType=INTEGER}::integer
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user