From 387f65590c8d9bb4408bf2ee62e98cd81831dbc1 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Fri, 30 Aug 2024 16:35:44 -0400 Subject: [PATCH 1/3] GUACAMOLE-577: guacConfigProxyHostname should be single-valued. --- extensions/guacamole-auth-ldap/schema/guacConfigGroup.ldif | 1 + extensions/guacamole-auth-ldap/schema/guacConfigGroup.schema | 1 + 2 files changed, 2 insertions(+) diff --git a/extensions/guacamole-auth-ldap/schema/guacConfigGroup.ldif b/extensions/guacamole-auth-ldap/schema/guacConfigGroup.ldif index 36622e280..f445bc8a5 100644 --- a/extensions/guacamole-auth-ldap/schema/guacConfigGroup.ldif +++ b/extensions/guacamole-auth-ldap/schema/guacConfigGroup.ldif @@ -26,6 +26,7 @@ olcAttributeTypes: ( 1.3.6.1.4.1.38971.1.1.1 NAME 'guacConfigProtocol' olcAttributeTypes: ( 1.3.6.1.4.1.38971.1.1.2 NAME 'guacConfigParameter' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) olcAttributeTypes: ( 1.3.6.1.4.1.38971.1.1.3 NAME 'guacConfigProxyHostname' + SINGLE-VALUE SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) olcAttributeTypes: ( 1.3.6.1.4.1.38971.1.1.4 NAME 'guacConfigProxyPort' SINGLE-VALUE diff --git a/extensions/guacamole-auth-ldap/schema/guacConfigGroup.schema b/extensions/guacamole-auth-ldap/schema/guacConfigGroup.schema index fb7ec433e..d54d90a3e 100644 --- a/extensions/guacamole-auth-ldap/schema/guacConfigGroup.schema +++ b/extensions/guacamole-auth-ldap/schema/guacConfigGroup.schema @@ -24,6 +24,7 @@ attributetype ( 1.3.6.1.4.1.38971.1.1.2 NAME 'guacConfigParameter' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) attributetype ( 1.3.6.1.4.1.38971.1.1.3 NAME 'guacConfigProxyHostname' + SINGLE-VALUE SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) attributetype ( 1.3.6.1.4.1.38971.1.1.4 NAME 'guacConfigProxyPort' From 1cc677a0e9deb05bcd3f46c1b4b77b84339f5c7c Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Fri, 30 Aug 2024 16:43:11 -0400 Subject: [PATCH 2/3] GUACAMOLE-577: Update comment for proxy encryption method in LDAP code. --- .../guacamole/auth/ldap/connection/ConnectionService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java index 629b10131..50626ca3b 100644 --- a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java +++ b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java @@ -87,7 +87,7 @@ public class ConnectionService { public static final String LDAP_ATTRIBUTE_PROXY_PORT = "guacConfigProxyPort"; /** - * The name of the LDAP attribute that stores guacd proxy hostname. + * The name of the LDAP attribute that stores guacd proxy encryption method. */ public static final String LDAP_ATTRIBUTE_PROXY_ENCRYPTION = "guacConfigProxyEncryption"; From 3840b09dfb0b52466ca3bed275f5f3607c77c32e Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Fri, 30 Aug 2024 16:57:43 -0400 Subject: [PATCH 3/3] GUACAMOLE-61: Strings for token names should be static. --- .../AbstractGuacamoleTunnelService.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java index d9323f4b4..236d18485 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java @@ -80,57 +80,57 @@ public abstract class AbstractGuacamoleTunnelService implements GuacamoleTunnelS /** * Logger for this class. */ - private final Logger logger = LoggerFactory.getLogger(AbstractGuacamoleTunnelService.class); + private static final Logger logger = LoggerFactory.getLogger(AbstractGuacamoleTunnelService.class); /** * The prefix that will be used to generate JDBC tokens. */ - private final String JDBC_TOKEN_PREFIX = "JDBC_"; + private static final String JDBC_TOKEN_PREFIX = "JDBC_"; /** * The token that contains the date the connection was started. */ - private final String JDBC_DATE_TOKEN = JDBC_TOKEN_PREFIX + "STARTDATE"; + private static final String JDBC_DATE_TOKEN = JDBC_TOKEN_PREFIX + "STARTDATE"; /** * The format of the date in the date token. */ - private final String JDBC_DATE_TOKEN_FORMAT = "yyyyMMdd"; + private static final String JDBC_DATE_TOKEN_FORMAT = "yyyyMMdd"; /** * The token that contains the start time of the connection. */ - private final String JDBC_TIME_TOKEN = JDBC_TOKEN_PREFIX + "STARTTIME"; + private static final String JDBC_TIME_TOKEN = JDBC_TOKEN_PREFIX + "STARTTIME"; /** * The format of the time in the time token. */ - private final String JDBC_TIME_TOKEN_FORMAT = "HHmmss"; + private static final String JDBC_TIME_TOKEN_FORMAT = "HHmmss"; /** * The token that contains the connection name. */ - private final String JDBC_CONNECTION_NAME_TOKEN = JDBC_TOKEN_PREFIX + "CONNECTION_NAME"; + private static final String JDBC_CONNECTION_NAME_TOKEN = JDBC_TOKEN_PREFIX + "CONNECTION_NAME"; /** * The token that contains the connection identifier. */ - private final String JDBC_CONNECTION_ID_TOKEN = JDBC_TOKEN_PREFIX + "CONNECTION_ID"; + private static final String JDBC_CONNECTION_ID_TOKEN = JDBC_TOKEN_PREFIX + "CONNECTION_ID"; /** * The token that contains the hostname configured in the connection parameters. */ - private final String JDBC_CONNECTION_HOSTNAME_TOKEN = JDBC_TOKEN_PREFIX + "HOSTNAME"; + private static final String JDBC_CONNECTION_HOSTNAME_TOKEN = JDBC_TOKEN_PREFIX + "HOSTNAME"; /** * The name of the parameter containing the hostname in the configuration. */ - private final String JDBC_CONNECTION_HOSTNAME_TOKEN_PARAMETER = "hostname"; + private static final String JDBC_CONNECTION_HOSTNAME_TOKEN_PARAMETER = "hostname"; /** * The token containing the protocol configured in the connection. */ - private final String JDBC_CONNECTION_PROTOCOL_TOKEN = JDBC_TOKEN_PREFIX + "PROTOCOL"; + private static final String JDBC_CONNECTION_PROTOCOL_TOKEN = JDBC_TOKEN_PREFIX + "PROTOCOL"; /** * Mapper for accessing connections.