You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2016/07/25 22:27:59 UTC

[1/4] incubator-guacamole-client git commit: GUACAMOLE-5: Throw clean "resource not found" if the active connection of a tunnel cannot be determined.

Repository: incubator-guacamole-client
Updated Branches:
  refs/heads/master b0eef60e1 -> fafcbf0dd


GUACAMOLE-5: Throw clean "resource not found" if the active connection of a tunnel cannot be determined.

Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/a5af6c00
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/a5af6c00
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/a5af6c00

Branch: refs/heads/master
Commit: a5af6c00d249ffc7d5c50414541545e53cad3f4c
Parents: b0eef60
Author: Michael Jumper <mj...@apache.org>
Authored: Mon Jul 25 14:10:54 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Mon Jul 25 14:34:54 2016 -0700

----------------------------------------------------------------------
 .../org/apache/guacamole/rest/tunnel/TunnelResource.java    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a5af6c00/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java
----------------------------------------------------------------------
diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java
index 6583a07..b498527 100644
--- a/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java
+++ b/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java
@@ -30,6 +30,7 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.MediaType;
 import org.apache.guacamole.GuacamoleException;
+import org.apache.guacamole.GuacamoleResourceNotFoundException;
 import org.apache.guacamole.net.auth.ActiveConnection;
 import org.apache.guacamole.net.auth.UserContext;
 import org.apache.guacamole.rest.activeconnection.APIActiveConnection;
@@ -96,10 +97,14 @@ public class TunnelResource {
         // Pull the UserContext from the tunnel
         UserContext userContext = tunnel.getUserContext();
 
+        // Fail if the active connection cannot be found
+        ActiveConnection activeConnection = tunnel.getActiveConnection();
+        if (activeConnection == null)
+            throw new GuacamoleResourceNotFoundException("No readable active connection for tunnel.");
+
         // Return the associated ActiveConnection as a resource
         return activeConnectionResourceFactory.create(userContext,
-                userContext.getActiveConnectionDirectory(),
-                tunnel.getActiveConnection());
+                userContext.getActiveConnectionDirectory(), activeConnection);
 
     }
 


[2/4] incubator-guacamole-client git commit: GUACAMOLE-5: Include the sensitive information of an active connection if the current user started that active connection.

Posted by jm...@apache.org.
GUACAMOLE-5: Include the sensitive information of an active connection if the current user started that active connection.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/8fad01c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/8fad01c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/8fad01c6

Branch: refs/heads/master
Commit: 8fad01c65c350d10d2bb86dedcf4eb246d82b0c6
Parents: a5af6c0
Author: Michael Jumper <mj...@apache.org>
Authored: Mon Jul 25 14:20:03 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Mon Jul 25 14:44:48 2016 -0700

----------------------------------------------------------------------
 .../auth/jdbc/activeconnection/ActiveConnectionService.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/8fad01c6/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java
index 3d56967..1fc438a 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java
@@ -80,6 +80,7 @@ public class ActiveConnectionService
     public Collection<TrackedActiveConnection> retrieveObjects(AuthenticatedUser user,
             Collection<String> identifiers) throws GuacamoleException {
 
+        String username = user.getIdentifier();
         boolean isAdmin = user.getUser().isAdministrator();
         Set<String> identifierSet = new HashSet<String>(identifiers);
 
@@ -90,10 +91,15 @@ public class ActiveConnectionService
         Collection<TrackedActiveConnection> activeConnections = new ArrayList<TrackedActiveConnection>(identifiers.size());
         for (ActiveConnectionRecord record : records) {
 
+            // Sensitive information should be included if the connection was
+            // started by the current user OR the user is an admin
+            boolean includeSensitiveInformation =
+                    isAdmin || username.equals(record.getUsername());
+
             // Add connection if within requested identifiers
             if (identifierSet.contains(record.getUUID().toString())) {
                 TrackedActiveConnection activeConnection = trackedActiveConnectionProvider.get();
-                activeConnection.init(user, record, isAdmin);
+                activeConnection.init(user, record, includeSensitiveInformation);
                 activeConnections.add(activeConnection);
             }
 


[4/4] incubator-guacamole-client git commit: GUACAMOLE-5: Merge sharing profile fixes for non-admins.

Posted by jm...@apache.org.
GUACAMOLE-5: Merge sharing profile fixes for non-admins.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/fafcbf0d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/fafcbf0d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/fafcbf0d

Branch: refs/heads/master
Commit: fafcbf0ddaf003a0ab0821d4eff719a84b930fe3
Parents: b0eef60 f119b97
Author: James Muehlner <ja...@guac-dev.org>
Authored: Mon Jul 25 15:27:33 2016 -0700
Committer: James Muehlner <ja...@guac-dev.org>
Committed: Mon Jul 25 15:27:33 2016 -0700

----------------------------------------------------------------------
 .../auth/jdbc/activeconnection/ActiveConnectionService.java | 8 +++++++-
 .../auth/jdbc/sharingprofile/SharingProfileMapper.xml       | 2 +-
 .../auth/jdbc/sharingprofile/SharingProfileMapper.xml       | 2 +-
 .../org/apache/guacamole/rest/tunnel/TunnelResource.java    | 9 +++++++--
 4 files changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------



[3/4] incubator-guacamole-client git commit: GUACAMOLE-5: Column "sharing_profile_id" is ambiguous without the table name.

Posted by jm...@apache.org.
GUACAMOLE-5: Column "sharing_profile_id" is ambiguous without the table name.

Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/f119b972
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/f119b972
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/f119b972

Branch: refs/heads/master
Commit: f119b972301cb42f2c17ee7011452c05af0ab9bc
Parents: 8fad01c
Author: Michael Jumper <mj...@apache.org>
Authored: Mon Jul 25 14:25:53 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Mon Jul 25 14:44:48 2016 -0700

----------------------------------------------------------------------
 .../guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml    | 2 +-
 .../guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/f119b972/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml
index 8b8727f..5c76196 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml
@@ -55,7 +55,7 @@
 
     <!-- Select identifiers of all readable sharing profiles associated with a particular connection -->
     <select id="selectReadableIdentifiersWithin" resultType="string">
-        SELECT sharing_profile_id
+        SELECT guacamole_sharing_profile.sharing_profile_id
         FROM guacamole_sharing_profile
         JOIN guacamole_sharing_profile_permission ON guacamole_sharing_profile_permission.sharing_profile_id = guacamole_sharing_profile.sharing_profile_id
         WHERE

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/f119b972/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml
index ca49a99..6720f5d 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/sharingprofile/SharingProfileMapper.xml
@@ -55,7 +55,7 @@
 
     <!-- Select identifiers of all readable sharing profiles associated with a particular connection -->
     <select id="selectReadableIdentifiersWithin" resultType="string">
-        SELECT sharing_profile_id
+        SELECT guacamole_sharing_profile.sharing_profile_id
         FROM guacamole_sharing_profile
         JOIN guacamole_sharing_profile_permission ON guacamole_sharing_profile_permission.sharing_profile_id = guacamole_sharing_profile.sharing_profile_id
         WHERE