You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by vn...@apache.org on 2018/02/01 18:32:48 UTC

[05/10] guacamole-client git commit: GUACAMOLE-96: Document semantics of voluntary attribute storage and guaranteed sanitization.

GUACAMOLE-96: Document semantics of voluntary attribute storage and guaranteed sanitization.


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

Branch: refs/heads/master
Commit: 79936c4c419e602a824376a933661590e593a9c9
Parents: 7725565
Author: Michael Jumper <mj...@apache.org>
Authored: Sun Oct 29 13:09:45 2017 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Wed Jan 31 15:26:16 2018 -0800

----------------------------------------------------------------------
 .../java/org/apache/guacamole/net/auth/Connection.java | 13 +++++++++++--
 .../org/apache/guacamole/net/auth/ConnectionGroup.java | 13 +++++++++++--
 .../org/apache/guacamole/net/auth/SharingProfile.java  | 11 ++++++++++-
 .../main/java/org/apache/guacamole/net/auth/User.java  | 13 +++++++++++--
 4 files changed, 43 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/79936c4c/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Connection.java
----------------------------------------------------------------------
diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Connection.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Connection.java
index 85fd168..313d89e 100644
--- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Connection.java
+++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Connection.java
@@ -95,8 +95,17 @@ public interface Connection extends Identifiable, Connectable {
 
     /**
      * Sets the given attributes. If an attribute within the map is not
-     * supported, it will simply be dropped. Any attributes not within the
-     * given map will be left untouched.
+     * supported, it will simply be dropped. Any attributes not within the given
+     * map will be left untouched. Attributes which are not declared within
+     * getConnectionAttributes() of the associated UserContext MUST NOT be
+     * submitted, but other extensions may manipulate the declared attributes
+     * through decorate() and redecorate().
+     *
+     * Implementations may optionally allow storage of unsupported attributes.
+     * Extensions which rely on other extensions to store their attribute
+     * values should verify that such storage is supported by first testing
+     * that the attribute value is retrievable via getAttributes() after being
+     * set.
      *
      * @param attributes
      *     A map of all attribute identifiers to their corresponding values.

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/79936c4c/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/ConnectionGroup.java
----------------------------------------------------------------------
diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/ConnectionGroup.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/ConnectionGroup.java
index 8e34e41..04b494a 100644
--- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/ConnectionGroup.java
+++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/ConnectionGroup.java
@@ -137,8 +137,17 @@ public interface ConnectionGroup extends Identifiable, Connectable {
 
     /**
      * Sets the given attributes. If an attribute within the map is not
-     * supported, it will simply be dropped. Any attributes not within the
-     * given map will be left untouched.
+     * supported, it will simply be dropped. Any attributes not within the given
+     * map will be left untouched. Attributes which are not declared within
+     * getConnectionGroupAttributes() of the associated UserContext MUST NOT be
+     * submitted, but other extensions may manipulate the declared attributes
+     * through decorate() and redecorate().
+     *
+     * Implementations may optionally allow storage of unsupported attributes.
+     * Extensions which rely on other extensions to store their attribute
+     * values should verify that such storage is supported by first testing
+     * that the attribute value is retrievable via getAttributes() after being
+     * set.
      *
      * @param attributes
      *     A map of all attribute identifiers to their corresponding values.

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/79936c4c/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/SharingProfile.java
----------------------------------------------------------------------
diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/SharingProfile.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/SharingProfile.java
index f9ec34c..3b4ec65 100644
--- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/SharingProfile.java
+++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/SharingProfile.java
@@ -107,7 +107,16 @@ public interface SharingProfile extends Identifiable {
     /**
      * Sets the given attributes. If an attribute within the map is not
      * supported, it will simply be dropped. Any attributes not within the
-     * given map will be left untouched.
+     * given map will be left untouched. Attributes which are not declared
+     * within getSharingProfileAttributes() of the associated UserContext MUST
+     * NOT be submitted, but other extensions may manipulate the declared
+     * attributes through decorate() and redecorate().
+     *
+     * Implementations may optionally allow storage of unsupported attributes.
+     * Extensions which rely on other extensions to store their attribute
+     * values should verify that such storage is supported by first testing
+     * that the attribute value is retrievable via getAttributes() after being
+     * set.
      *
      * @param attributes
      *     A map of all attribute identifiers to their corresponding values.

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/79936c4c/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
----------------------------------------------------------------------
diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
index f7bd61c..49e1f99 100644
--- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
+++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
@@ -94,8 +94,17 @@ public interface User extends Identifiable {
 
     /**
      * Sets the given attributes. If an attribute within the map is not
-     * supported, it will simply be dropped. Any attributes not within the
-     * given map will be left untouched.
+     * supported, it will simply be dropped. Any attributes not within the given
+     * map will be left untouched. Attributes which are not declared within
+     * getUserAttributes() of the associated UserContext MUST NOT be submitted,
+     * but other extensions may manipulate the declared attributes through
+     * decorate() and redecorate().
+     * 
+     * Implementations may optionally allow storage of unsupported attributes.
+     * Extensions which rely on other extensions to store their attribute
+     * values should verify that such storage is supported by first testing
+     * that the attribute value is retrievable via getAttributes() after being
+     * set.
      *
      * @param attributes
      *     A map of all attribute identifiers to their corresponding values.