You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2018/01/30 23:44:13 UTC

[01/50] guacamole-client git commit: GUACAMOLE-197: Fix imports and remove unnecessary try/catch statement.

Repository: guacamole-client
Updated Branches:
  refs/heads/master eaeaeb10c -> 64ba8a852


GUACAMOLE-197: Fix imports and remove unnecessary try/catch statement.


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

Branch: refs/heads/master
Commit: dd48486f12a00454cb6b08f045d345aae7835456
Parents: 9de1b73
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Mar 21 17:12:54 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:09 2018 -0500

----------------------------------------------------------------------
 .../guacamole/auth/radius/AuthenticationProviderService.java | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/dd48486f/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index f1741e1..e64d11d 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -35,6 +35,7 @@ import org.apache.guacamole.net.auth.credentials.GuacamoleInsufficientCredential
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import net.jradius.dictionary.Attr_State;
+import net.jradius.dictionary.Attr_ReplyMessage;
 import net.jradius.exception.UnknownAttributeException;
 import net.jradius.packet.RadiusPacket;
 import net.jradius.packet.AccessAccept;
@@ -140,7 +141,6 @@ public class AuthenticationProviderService {
             // We create a new form/field with the challenge message.
             else if (radPack instanceof AccessChallenge) {
 
-                try {
                     // Try to get the state attribute - if it's not there, we have a problem
                     RadiusAttribute stateAttr = radPack.findAttribute(Attr_State.TYPE);
                     if (stateAttr == null) {
@@ -164,12 +164,6 @@ public class AuthenticationProviderService {
                     Field radiusStateField = new RadiusStateField(radiusState);
                     CredentialsInfo expectedCredentials = new CredentialsInfo(Arrays.asList(radiusResponseField,radiusStateField));
                     throw new GuacamoleInsufficientCredentialsException("LOGIN.INFO_RADIUS_ADDL_REQUIRED", expectedCredentials);
-                }
-                catch (UnknownAttributeException e) {
-                    logger.error("Error in talks with RADIUS server.");
-                    logger.debug("RADIUS challenged by didn't provide right attributes.");
-                    throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
-                }
             }
 
             // If we receive AccessAccept, authentication has succeeded


[25/50] guacamole-client git commit: GUACAMOLE-197: Add override for module shutdown() method.

Posted by mj...@apache.org.
GUACAMOLE-197: Add override for module shutdown() method.


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

Branch: refs/heads/master
Commit: f84e3b88c6e6e91b9142f86352eec865c139747e
Parents: 67df52a
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Oct 10 20:35:51 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../guacamole/auth/radius/RadiusAuthenticationProvider.java     | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/f84e3b88/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
index 499f3c1..f222740 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
@@ -69,6 +69,11 @@ public class RadiusAuthenticationProvider implements AuthenticationProvider {
     }
 
     @Override
+    public void shutdown() {
+        // Do nothing
+    }
+
+    @Override
     public AuthenticatedUser authenticateUser(Credentials credentials) throws GuacamoleException {
 
         AuthenticationProviderService authProviderService = injector.getInstance(AuthenticationProviderService.class);


[24/50] guacamole-client git commit: GUACAMOLE-197: Bump version to 0.9.14 and remove incubating stuff.

Posted by mj...@apache.org.
GUACAMOLE-197: Bump version to 0.9.14 and remove incubating stuff.


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

Branch: refs/heads/master
Commit: adc574f890f736bede0ced125ce8a627d7d55a54
Parents: 45f9815
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Jan 1 17:29:55 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 extensions/guacamole-auth-radius/pom.xml                      | 6 +++---
 extensions/guacamole-auth-radius/src/licenses/DISCLAIMER      | 7 -------
 .../src/main/resources/guac-manifest.json                     | 2 +-
 3 files changed, 4 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/adc574f8/extensions/guacamole-auth-radius/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/pom.xml b/extensions/guacamole-auth-radius/pom.xml
index 69d171d..f1c26f1 100644
--- a/extensions/guacamole-auth-radius/pom.xml
+++ b/extensions/guacamole-auth-radius/pom.xml
@@ -26,7 +26,7 @@
     <groupId>org.apache.guacamole</groupId>
     <artifactId>guacamole-auth-radius</artifactId>
     <packaging>jar</packaging>
-    <version>0.9.13-incubating</version>
+    <version>0.9.14</version>
     <name>guacamole-auth-radius</name>
     <url>http://guacamole.incubator.apache.org/</url>
 
@@ -190,7 +190,7 @@
         <dependency>
             <groupId>org.apache.guacamole</groupId>
             <artifactId>guacamole-common</artifactId>
-            <version>0.9.10-incubating</version>
+            <version>0.9.14</version>
             <scope>provided</scope>
         </dependency>
 
@@ -198,7 +198,7 @@
         <dependency>
             <groupId>org.apache.guacamole</groupId>
             <artifactId>guacamole-ext</artifactId>
-            <version>0.9.13-incubating</version>
+            <version>0.9.14</version>
             <scope>provided</scope>
         </dependency>
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/adc574f8/extensions/guacamole-auth-radius/src/licenses/DISCLAIMER
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/licenses/DISCLAIMER b/extensions/guacamole-auth-radius/src/licenses/DISCLAIMER
deleted file mode 100644
index 1a9c3be..0000000
--- a/extensions/guacamole-auth-radius/src/licenses/DISCLAIMER
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Guacamole is an effort undergoing incubation at The Apache Software
-Foundation (ASF). Incubation is required of all newly accepted projects until a
-further review indicates that the infrastructure, communications, and decision
-making process have stabilized in a manner consistent with other successful ASF
-projects. While incubation status is not necessarily a reflection of the
-completeness or stability of the code, it does indicate that the project has
-yet to be fully endorsed by the ASF.

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/adc574f8/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
index f8c0111..4f4bca0 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
@@ -1,6 +1,6 @@
 {
 
-    "guacamoleVersion" : "0.9.13-incubating",
+    "guacamoleVersion" : "0.9.14",
 
     "name"      : "RADIUS Authentication Backend",
     "namespace" : "radius",


[38/50] guacamole-client git commit: GUACAMOLE-197: Fix build issue introduced by moving variable context.

Posted by mj...@apache.org.
GUACAMOLE-197: Fix build issue introduced by moving variable context.


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

Branch: refs/heads/master
Commit: 67df52ab0b08afc0b182f3505a5d41a5cfdb65d5
Parents: 60ddc82
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Jul 17 13:33:42 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../apache/guacamole/auth/radius/RadiusConnectionService.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/67df52ab/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index fa9a0b6..345a03d 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -128,12 +128,11 @@ public class RadiusConnectionService {
 
             // Pull TLS configuration parameters from guacamole.properties
             LocalEnvironment guacEnv = new LocalEnvironment();
-            String guacHome = guacEnv.getGuacamoleHome();
+            File guacHome = guacEnv.getGuacamoleHome();
             String caFile = confService.getRadiusCAFile();
             String caPassword = confService.getRadiusCAPassword();
             String keyFile = confService.getRadiusKeyFile();
             String keyPassword = confService.getRadiusKeyPassword();
-            String innerProtocol = confService.getRadiusEAPTTLSInnerProtocol();
 
             if (caFile != null) {
                 ((EAPTLSAuthenticator)radAuth).setCaFile((new File(guacHome, caFile)).toString());
@@ -152,6 +151,7 @@ public class RadiusConnectionService {
 
         // If we're using EAP-TTLS, we need to define tunneled protocol
         if (radAuth instanceof EAPTTLSAuthenticator) {
+            String innerProtocol = confService.getRadiusEAPTTLSInnerProtocol();
             if (innerProtocol == null)
                 throw new GuacamoleException("Trying to use EAP-TTLS, but no inner protocol specified.");
 


[08/50] guacamole-client git commit: GUACAMOLE-197: Bump version to 0.9.13-incubating and fix issues after rebase.

Posted by mj...@apache.org.
GUACAMOLE-197: Bump version to 0.9.13-incubating and fix issues after rebase.


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

Branch: refs/heads/master
Commit: 77cb98c30f4181537b9b06a42ff2b65f3f4f4531
Parents: f4a6cf8
Author: Nick Couchman <vn...@apache.org>
Authored: Fri Jul 14 16:44:20 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 extensions/guacamole-auth-radius/pom.xml                        | 4 ++--
 .../guacamole/auth/radius/RadiusAuthenticationProvider.java     | 5 +++++
 .../guacamole-auth-radius/src/main/resources/guac-manifest.json | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/77cb98c3/extensions/guacamole-auth-radius/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/pom.xml b/extensions/guacamole-auth-radius/pom.xml
index 921087d..69d171d 100644
--- a/extensions/guacamole-auth-radius/pom.xml
+++ b/extensions/guacamole-auth-radius/pom.xml
@@ -26,7 +26,7 @@
     <groupId>org.apache.guacamole</groupId>
     <artifactId>guacamole-auth-radius</artifactId>
     <packaging>jar</packaging>
-    <version>0.9.11-incubating</version>
+    <version>0.9.13-incubating</version>
     <name>guacamole-auth-radius</name>
     <url>http://guacamole.incubator.apache.org/</url>
 
@@ -198,7 +198,7 @@
         <dependency>
             <groupId>org.apache.guacamole</groupId>
             <artifactId>guacamole-ext</artifactId>
-            <version>0.9.11-incubating</version>
+            <version>0.9.13-incubating</version>
             <scope>provided</scope>
         </dependency>
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/77cb98c3/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
index c4af1c3..499f3c1 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
@@ -64,6 +64,11 @@ public class RadiusAuthenticationProvider implements AuthenticationProvider {
     }
 
     @Override
+    public Object getResource() throws GuacamoleException {
+        return null;
+    }
+
+    @Override
     public AuthenticatedUser authenticateUser(Credentials credentials) throws GuacamoleException {
 
         AuthenticationProviderService authProviderService = injector.getInstance(AuthenticationProviderService.class);

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/77cb98c3/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
index a829564..f8c0111 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
@@ -1,6 +1,6 @@
 {
 
-    "guacamoleVersion" : "0.9.11-incubating",
+    "guacamoleVersion" : "0.9.13-incubating",
 
     "name"      : "RADIUS Authentication Backend",
     "namespace" : "radius",


[45/50] guacamole-client git commit: GUACAMOLE-197: Clean up HTML and translations, remove unnecessary CSS files.

Posted by mj...@apache.org.
GUACAMOLE-197: Clean up HTML and translations, remove unnecessary CSS files.


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

Branch: refs/heads/master
Commit: b0284ec7104de603132230e8d642043e3fee6de0
Parents: ab90606
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Jan 15 15:16:02 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:12 2018 -0500

----------------------------------------------------------------------
 extensions/guacamole-auth-radius/pom.xml        | 12 ------
 .../src/main/resources/guac-manifest.json       |  4 --
 .../src/main/resources/styles/radius.css        | 39 --------------------
 .../resources/templates/radiusStateField.html   |  2 +-
 .../src/main/resources/translations/en.json     |  2 -
 5 files changed, 1 insertion(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b0284ec7/extensions/guacamole-auth-radius/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/pom.xml b/extensions/guacamole-auth-radius/pom.xml
index 9d27a10..d46e0b1 100644
--- a/extensions/guacamole-auth-radius/pom.xml
+++ b/extensions/guacamole-auth-radius/pom.xml
@@ -88,18 +88,6 @@
                             <webappSourceDir>${basedir}/src/main/resources</webappSourceDir>
                             <webappTargetDir>${project.build.directory}/classes</webappTargetDir>
 
-                            <cssSourceDir>/</cssSourceDir>
-                            <cssTargetDir>/</cssTargetDir>
-                            <cssFinalFile>radius.css</cssFinalFile>
-
-                            <cssSourceFiles>
-                                <cssSourceFile>license.txt</cssSourceFile>
-                            </cssSourceFiles>
-
-                            <cssSourceIncludes>
-                                <cssSourceInclude>**/*.css</cssSourceInclude>
-                            </cssSourceIncludes>
-
                             <jsSourceDir>/</jsSourceDir>
                             <jsTargetDir>/</jsTargetDir>
                             <jsFinalFile>radius.js</jsFinalFile>

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b0284ec7/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
index 4f4bca0..be6e2a2 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
@@ -17,10 +17,6 @@
         "radius.min.js"
     ],
 
-    "css" : [
-        "radius.min.css"
-    ],
-
     "resources" : {
         "templates/radiusChallengeResponseField.html" : "text/html"
     }

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b0284ec7/extensions/guacamole-auth-radius/src/main/resources/styles/radius.css
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/styles/radius.css b/extensions/guacamole-auth-radius/src/main/resources/styles/radius.css
deleted file mode 100644
index 92cb48a..0000000
--- a/extensions/guacamole-auth-radius/src/main/resources/styles/radius.css
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.
- */
-
-
-.radius-challenge-response-field-container {
-    height: 100%;
-    width: 100%;
-    position: fixed;
-    left: 0;
-    top: 0;
-    display: table;
-    background: white;
-}
-
-.radius-challenge-response-field {
-    width: 100%;
-    display: table-cell;
-    vertical-align: middle;
-}
-
-.radius-challenge-response-field input[type="submit"] {
-    display: none !important;
-}

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b0284ec7/extensions/guacamole-auth-radius/src/main/resources/templates/radiusStateField.html
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/templates/radiusStateField.html b/extensions/guacamole-auth-radius/src/main/resources/templates/radiusStateField.html
index be8067c..bfd9c4f 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/templates/radiusStateField.html
+++ b/extensions/guacamole-auth-radius/src/main/resources/templates/radiusStateField.html
@@ -1 +1 @@
-<input type=hidden ng-model="model" />
+<input type="hidden" ng-model="model" />

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b0284ec7/extensions/guacamole-auth-radius/src/main/resources/translations/en.json
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/translations/en.json b/extensions/guacamole-auth-radius/src/main/resources/translations/en.json
index 2459b8b..c068a70 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/translations/en.json
+++ b/extensions/guacamole-auth-radius/src/main/resources/translations/en.json
@@ -7,8 +7,6 @@
     "LOGIN" : {
         "FIELD_HEADER_GUAC_RADIUS_CHALLENGE_RESPONSE" : "",
         "FIELD_HEADER_GUAC_RADIUS_STATE"              : "",
-        "INFO_RADIUS_RESPONSE_INCORRECT"              : "RADIUS response incorrect.",
-        "INFO_RADIUS_AUTH_REQUIRED"                   : "Please authenticate with RADIUS to continue.",
         "INFO_RADIUS_ADDL_REQUIRED"                   : "Please supply additional credentials"
     }
 


[17/50] guacamole-client git commit: GUACAMOLE-197: Remove the .tar.gz bundling bits from the source tree, since we won't be distributing binaries.

Posted by mj...@apache.org.
GUACAMOLE-197: Remove the .tar.gz bundling bits from the source tree, since we won't be distributing binaries.


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

Branch: refs/heads/master
Commit: fd84e761b104040ed4f8eb7b3a6afff67050c5ca
Parents: ba837cb
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 10:30:38 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 extensions/guacamole-auth-radius/pom.xml        | 22 --------
 .../src/main/assembly/dist.xml                  | 53 --------------------
 2 files changed, 75 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/fd84e761/extensions/guacamole-auth-radius/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/pom.xml b/extensions/guacamole-auth-radius/pom.xml
index bc373db..921087d 100644
--- a/extensions/guacamole-auth-radius/pom.xml
+++ b/extensions/guacamole-auth-radius/pom.xml
@@ -133,28 +133,6 @@
             </plugin>
 
 
-            <!-- Assembly plugin - for easy distribution -->
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.5.3</version>
-                <configuration>
-                    <finalName>${project.artifactId}-${project.version}</finalName>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <descriptors>
-                        <descriptor>src/main/assembly/dist.xml</descriptor>
-                    </descriptors>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-dist-archive</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
             <!-- Copy dependencies prior to packaging -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/fd84e761/extensions/guacamole-auth-radius/src/main/assembly/dist.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/assembly/dist.xml b/extensions/guacamole-auth-radius/src/main/assembly/dist.xml
deleted file mode 100644
index b89fd53..0000000
--- a/extensions/guacamole-auth-radius/src/main/assembly/dist.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<assembly
-    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
-    
-    <id>dist</id>
-    <baseDirectory>${project.artifactId}-${project.version}</baseDirectory>
-
-    <!-- Output tar.gz -->
-    <formats>
-        <format>tar.gz</format>
-    </formats>
-
-    <!-- Include licenses and extension .jar -->
-    <fileSets>
-
-        <!-- Include licenses -->
-        <fileSet>
-            <outputDirectory></outputDirectory>
-            <directory>src/licenses</directory>
-        </fileSet>
-
-        <!-- Include extension .jar -->
-        <fileSet>
-            <directory>target</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>*.jar</include>
-            </includes>
-        </fileSet>
-
-    </fileSets>
-
-</assembly>


[34/50] guacamole-client git commit: GUACAMOLE-197: Remove unneeded iframe reference.

Posted by mj...@apache.org.
GUACAMOLE-197: Remove unneeded iframe reference.


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

Branch: refs/heads/master
Commit: 9a98400ce235917be371bff1eb8cacdbfb4a2010
Parents: 52e9b66
Author: Nick Couchman <vn...@apache.org>
Authored: Sat Jul 15 17:26:10 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../guacamole-auth-radius/src/main/resources/styles/radius.css   | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9a98400c/extensions/guacamole-auth-radius/src/main/resources/styles/radius.css
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/styles/radius.css b/extensions/guacamole-auth-radius/src/main/resources/styles/radius.css
index 00d7988..92cb48a 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/styles/radius.css
+++ b/extensions/guacamole-auth-radius/src/main/resources/styles/radius.css
@@ -37,7 +37,3 @@
 .radius-challenge-response-field input[type="submit"] {
     display: none !important;
 }
-
-.radius-challenge-response-field.loading iframe {
-    opacity: 0;
-}


[22/50] guacamole-client git commit: GUACAMOLE-197: Remove unnecessary null default values, as that is already the default.

Posted by mj...@apache.org.
GUACAMOLE-197: Remove unnecessary null default values, as that is already the default.


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

Branch: refs/heads/master
Commit: d773614a79dd64027fe50aca94d9fd9083163bc2
Parents: 9986959
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 09:46:14 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../auth/radius/ConfigurationService.java         | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/d773614a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
index 58ee3c6..0cfe26b 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
@@ -103,8 +103,7 @@ public class ConfigurationService {
      */
     public String getRadiusSharedSecret() throws GuacamoleException {
         return environment.getProperty(
-            RadiusGuacamoleProperties.RADIUS_SHARED_SECRET,
-            null
+            RadiusGuacamoleProperties.RADIUS_SHARED_SECRET
         );
     }
 
@@ -121,8 +120,7 @@ public class ConfigurationService {
      */
     public String getRadiusAuthProtocol() throws GuacamoleException {
         return environment.getProperty(
-            RadiusGuacamoleProperties.RADIUS_AUTH_PROTOCOL,
-            null
+            RadiusGuacamoleProperties.RADIUS_AUTH_PROTOCOL
         );
     }
 
@@ -175,8 +173,7 @@ public class ConfigurationService {
      */
     public String getRadiusCAFile() throws GuacamoleException {
         return environment.getProperty(
-            RadiusGuacamoleProperties.RADIUS_CA_FILE,
-            null 
+            RadiusGuacamoleProperties.RADIUS_CA_FILE
         );
     }
 
@@ -211,8 +208,7 @@ public class ConfigurationService {
      */
     public String getRadiusCAPassword() throws GuacamoleException {
         return environment.getProperty(
-            RadiusGuacamoleProperties.RADIUS_CA_PASSWORD,
-            null
+            RadiusGuacamoleProperties.RADIUS_CA_PASSWORD
         );
     }
 
@@ -247,8 +243,7 @@ public class ConfigurationService {
      */
     public String getRadiusKeyPassword() throws GuacamoleException {
         return environment.getProperty(
-            RadiusGuacamoleProperties.RADIUS_KEY_PASSWORD,
-            null
+            RadiusGuacamoleProperties.RADIUS_KEY_PASSWORD
         );
     }
 
@@ -306,8 +301,7 @@ public class ConfigurationService {
      */
     public String getRadiusEAPTTLSInnerProtocol() throws GuacamoleException {
         return environment.getProperty(
-            RadiusGuacamoleProperties.RADIUS_EAP_TTLS_INNER_PROTOCOL,
-            null
+            RadiusGuacamoleProperties.RADIUS_EAP_TTLS_INNER_PROTOCOL
         );
     }
 


[49/50] guacamole-client git commit: GUACAMOLE-197: Add/fix fields in guac manifest.

Posted by mj...@apache.org.
GUACAMOLE-197: Add/fix fields in guac manifest.


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

Branch: refs/heads/master
Commit: dcb9e46e4382395ea37638a7dcd23b73639117f0
Parents: 789da68
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Jan 30 18:33:59 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Tue Jan 30 18:33:59 2018 -0500

----------------------------------------------------------------------
 .../guacamole-auth-radius/src/main/resources/guac-manifest.json   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/dcb9e46e/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
index be6e2a2..f85ab1f 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
@@ -18,7 +18,8 @@
     ],
 
     "resources" : {
-        "templates/radiusChallengeResponseField.html" : "text/html"
+        "templates/radiusResponseField.html" : "text/html",
+        "templates/radiusStateField.html"    : "text/html"
     }
 
 }


[13/50] guacamole-client git commit: GUACAMOLE-197: Clean up logic for retrieving radius state.

Posted by mj...@apache.org.
GUACAMOLE-197: Clean up logic for retrieving radius state.


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

Branch: refs/heads/master
Commit: 564b9687a21ec61f5527078713538c83d63fe9b8
Parents: 6402cec
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 09:15:39 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../guacamole/auth/radius/AuthenticationProviderService.java    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/564b9687/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index d9de261..bb2e203 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -109,7 +109,6 @@ public class AuthenticationProviderService {
 
         // Try to get parameters to see if this is a post-challenge attempt
         String challengeResponse = request.getParameter(RadiusChallengeResponseField.PARAMETER_NAME);
-        String radiusState = request.getParameter(RadiusStateField.PARAMETER_NAME);
 
         // We do not have a challenge response, so we proceed normally
         if (challengeResponse == null || challengeResponse.isEmpty()) {
@@ -159,7 +158,7 @@ public class AuthenticationProviderService {
 
                 // We have the required attributes - convert to strings and then generate the additional login box/field
                 String replyMsg = replyAttr.toString();
-                radiusState = new String(stateAttr.getValue().getBytes());
+                String radiusState = new String(stateAttr.getValue().getBytes());
                 Field radiusResponseField = new RadiusChallengeResponseField(replyMsg);
                 Field radiusStateField = new RadiusStateField(radiusState);
                 CredentialsInfo expectedCredentials = new CredentialsInfo(Arrays.asList(radiusResponseField,radiusStateField));
@@ -193,7 +192,7 @@ public class AuthenticationProviderService {
             // Initialize Radius Packet and try to authenticate
             try {
                 radPack = radiusService.authenticate(credentials.getUsername(),
-                                                     radiusState,
+                                                     request.getParameter(RadiusStateField.PARAMETER_NAME),
                                                      challengeResponse);
             }
             catch (GuacamoleException e) {


[10/50] guacamole-client git commit: GUACAMOLE-197: Fix comments to remove return value for void function.

Posted by mj...@apache.org.
GUACAMOLE-197: Fix comments to remove return value for void function.


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

Branch: refs/heads/master
Commit: 8d83ba2d8b4003b419e90df1bc39a5d8399da9f5
Parents: ecfa918
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 09:25:31 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../apache/guacamole/auth/radius/RadiusConnectionService.java  | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/8d83ba2d/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index d9a7c2d..e8a30ff 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -71,13 +71,9 @@ public class RadiusConnectionService {
      * Creates a new instance of RadiusConnection, configured with parameters
      * from guacamole.properties.
      *
-     * @return
-     *     A new RadiusConnection instance which has already been configured 
-     *     with parameters from guacamole.properties.
-     *
      * @throws GuacamoleException
      *     If an error occurs while parsing guacamole.properties, or if the
-     *     requested encryption method is actually not implemented (a bug).
+     *     configuration of RadiusClient fails.
      */
     private void createRadiusConnection() {
 


[36/50] guacamole-client git commit: GUACAMOLE-197: Consistency for RADIUS vs. radius vs. Radius.

Posted by mj...@apache.org.
GUACAMOLE-197: Consistency for RADIUS vs. radius vs. Radius.


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

Branch: refs/heads/master
Commit: 52e9b6605d87a554d36918d151768971bb6ef57f
Parents: 6acf032
Author: Nick Couchman <vn...@apache.org>
Authored: Sat Jul 15 17:24:09 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../apache/guacamole/auth/radius/RadiusGuacamoleProperties.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/52e9b660/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
index 15f4da2..5df6a46 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
@@ -88,7 +88,7 @@ public class RadiusGuacamoleProperties {
     };
 
     /**
-     * The number of retries when attempting a radius packet transaction.
+     * The number of retries when attempting a RADIUS packet transaction.
      */
     public static final IntegerGuacamoleProperty RADIUS_RETRIES = new IntegerGuacamoleProperty() {
 
@@ -98,7 +98,7 @@ public class RadiusGuacamoleProperties {
     };
 
     /**
-     * The network timeout when attempting a radius packet transaction.
+     * The network timeout when attempting a RADIUS packet transaction.
      */
     public static final IntegerGuacamoleProperty RADIUS_TIMEOUT = new IntegerGuacamoleProperty() {
 


[18/50] guacamole-client git commit: GUACAMOLE-197: FIx style issues.

Posted by mj...@apache.org.
GUACAMOLE-197: FIx style issues.


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

Branch: refs/heads/master
Commit: 99869592aef98d2fa423fde9db3abd2c74e75f21
Parents: a49dfee
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 09:44:54 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../org/apache/guacamole/auth/radius/RadiusConnectionService.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/99869592/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index 64a0257..3b37199 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -208,7 +208,7 @@ public class RadiusConnectionService {
             throws GuacamoleException {
 
         // Create the connection and load the attribute dictionary
-	createRadiusConnection();
+        createRadiusConnection();
         AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");
 
         // If the client is null, we return null - something has gone wrong


[07/50] guacamole-client git commit: GUACAMOLE-197: Fix indentation after removing try/catch block.

Posted by mj...@apache.org.
GUACAMOLE-197: Fix indentation after removing try/catch block.


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

Branch: refs/heads/master
Commit: 3a5c43b94e95e4a66e33c3e2435f714ee3c112c6
Parents: dd48486
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Mar 21 17:14:15 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../radius/AuthenticationProviderService.java   | 47 ++++++++++----------
 1 file changed, 24 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/3a5c43b9/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index e64d11d..d9de261 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -141,29 +141,30 @@ public class AuthenticationProviderService {
             // We create a new form/field with the challenge message.
             else if (radPack instanceof AccessChallenge) {
 
-                    // Try to get the state attribute - if it's not there, we have a problem
-                    RadiusAttribute stateAttr = radPack.findAttribute(Attr_State.TYPE);
-                    if (stateAttr == null) {
-                        logger.error("Something went wrong, state attribute not present.");
-                        logger.debug("State Attribute turned up null, which shouldn't happen in AccessChallenge.");
-                        throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
-                    }
-
-                    // We need to get the reply message so we know what to ask the user
-                    RadiusAttribute replyAttr = radPack.findAttribute(Attr_ReplyMessage.TYPE);
-                    if (replyAttr == null) {
-                        logger.error("No reply message received from the server.");
-                        logger.debug("Expecting a Attr_ReplyMessage attribute on this packet, and did not get one.");
-                        throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
-                    }
-
-                    // We have the required attributes - convert to strings and then generate the additional login box/field
-                    String replyMsg = replyAttr.toString();
-                    radiusState = new String(stateAttr.getValue().getBytes());
-                    Field radiusResponseField = new RadiusChallengeResponseField(replyMsg);
-                    Field radiusStateField = new RadiusStateField(radiusState);
-                    CredentialsInfo expectedCredentials = new CredentialsInfo(Arrays.asList(radiusResponseField,radiusStateField));
-                    throw new GuacamoleInsufficientCredentialsException("LOGIN.INFO_RADIUS_ADDL_REQUIRED", expectedCredentials);
+                // Try to get the state attribute - if it's not there, we have a problem
+                RadiusAttribute stateAttr = radPack.findAttribute(Attr_State.TYPE);
+                if (stateAttr == null) {
+                    logger.error("Something went wrong, state attribute not present.");
+                    logger.debug("State Attribute turned up null, which shouldn't happen in AccessChallenge.");
+                    throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
+                }
+
+                // We need to get the reply message so we know what to ask the user
+                RadiusAttribute replyAttr = radPack.findAttribute(Attr_ReplyMessage.TYPE);
+                if (replyAttr == null) {
+                    logger.error("No reply message received from the server.");
+                    logger.debug("Expecting a Attr_ReplyMessage attribute on this packet, and did not get one.");
+                    throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
+                }
+
+                // We have the required attributes - convert to strings and then generate the additional login box/field
+                String replyMsg = replyAttr.toString();
+                radiusState = new String(stateAttr.getValue().getBytes());
+                Field radiusResponseField = new RadiusChallengeResponseField(replyMsg);
+                Field radiusStateField = new RadiusStateField(radiusState);
+                CredentialsInfo expectedCredentials = new CredentialsInfo(Arrays.asList(radiusResponseField,radiusStateField));
+                throw new GuacamoleInsufficientCredentialsException("LOGIN.INFO_RADIUS_ADDL_REQUIRED", expectedCredentials);
+
             }
 
             // If we receive AccessAccept, authentication has succeeded


[11/50] guacamole-client git commit: GUACAMOLE-197: Fix pom.xml build to exclude signatures for BouncyCastle.

Posted by mj...@apache.org.
GUACAMOLE-197: Fix pom.xml build to exclude signatures for BouncyCastle.


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

Branch: refs/heads/master
Commit: 6402cecd539f3f15c055feb1907f9a4065d4702b
Parents: 773f2da
Author: Nick Couchman <ni...@yahoo.com>
Authored: Mon Apr 10 14:05:08 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 extensions/guacamole-auth-radius/pom.xml | 36 +--------------------------
 1 file changed, 1 insertion(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/6402cecd/extensions/guacamole-auth-radius/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/pom.xml b/extensions/guacamole-auth-radius/pom.xml
index b45b921..bc373db 100644
--- a/extensions/guacamole-auth-radius/pom.xml
+++ b/extensions/guacamole-auth-radius/pom.xml
@@ -170,46 +170,12 @@
                         <configuration>
                             <includeScope>runtime</includeScope>
                             <outputDirectory>${project.build.directory}/classes</outputDirectory>
+                            <excludes>META-INF/*.SF,META-INF/*.DSA</excludes>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
 
-            <!--<plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <version>3.0.0</version>
-                <configuration>
-                    <createDependencyReducedPom>true</createDependencyReducedPom>
-                    <filters>
-                        <filter>
-                            <artifact>*:*</artifact>
-                            <excludes>
-                                <exclude>META-INF/*.SF</exclude>
-                                <exclude>META-INF/*.DSA</exclude>
-                                <exclude>META-INF/*.RSA</exclude>
-                            </excludes>
-                        </filter>
-                    </filters>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>org.apache.guacamole.auth.radius.RadiusAuthenticationProvider</mainClass>
-                                </transformer>
-                            </transformers>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>-->
-
             <!-- Verify format using Apache RAT -->
             <plugin>
                 <groupId>org.apache.rat</groupId>


[21/50] guacamole-client git commit: GUACAMOLE-197: Remove unnecessary null/empty checks in setupRadiusAuthenticator, and throw exceptions instead of returning null.

Posted by mj...@apache.org.
GUACAMOLE-197: Remove unnecessary null/empty checks in setupRadiusAuthenticator, and throw exceptions instead of returning null.


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

Branch: refs/heads/master
Commit: ba837cb31bf84331389e500bdf468d39112b76d7
Parents: d773614
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 10:19:00 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../auth/radius/RadiusConnectionService.java    | 39 +++++++-------------
 1 file changed, 13 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ba837cb3/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index 3b37199..68d7823 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -119,14 +119,11 @@ public class RadiusConnectionService {
             return null;
         }
 
-        String radAuthName;
         String caFile;
         String caPassword;
         String caType;
         String keyFile;
         String keyPassword;
-        String keyType;
-        Boolean trustAll;
         String innerProtocol;
         LocalEnvironment guacEnv;
         String basePath;
@@ -134,52 +131,42 @@ public class RadiusConnectionService {
         // Pull configuration parameters from guacamole.properties
         guacEnv = new LocalEnvironment();
         basePath = guacEnv.getGuacamoleHome().getAbsolutePath() + '/';
-        radAuthName = confService.getRadiusAuthProtocol();
         caFile = confService.getRadiusCAFile();
         caPassword = confService.getRadiusCAPassword();
-        caType = confService.getRadiusCAType();
         keyFile = confService.getRadiusKeyFile();
         keyPassword = confService.getRadiusKeyPassword();
-        keyType = confService.getRadiusKeyType();
-        trustAll = confService.getRadiusTrustAll();
         innerProtocol = confService.getRadiusEAPTTLSInnerProtocol();
             
-        RadiusAuthenticator radAuth = radiusClient.getAuthProtocol(radAuthName);
+        RadiusAuthenticator radAuth = radiusClient.getAuthProtocol(confService.getRadiusAuthProtocol());
         if (radAuth == null)
-            return null;
+            throw new GuacamoleException("Could not get a valid RadiusAuthenticator for specified protocol: " + confService.getRadiusAuthProtocol());
 
         // If we're using any of the TLS protocols, we need to configure them
         if (radAuth instanceof PEAPAuthenticator || 
             radAuth instanceof EAPTLSAuthenticator || 
             radAuth instanceof EAPTTLSAuthenticator) {
 
-            if (caFile != null && !caFile.isEmpty())
+            if (caFile != null) {
                 ((EAPTLSAuthenticator)radAuth).setCaFile(basePath + caFile);
+                ((EAPTLSAuthenticator)radAuth).setCaFileType(confService.getRadiusCAType());
+                if (caPassword != null)
+                    ((EAPTLSAuthenticator)radAuth).setCaPassword(caPassword);
+            }
 
-            if (caType != null && !caType.isEmpty())
-                ((EAPTLSAuthenticator)radAuth).setCaFileType(caType);
-
-            if (caPassword != null && !caPassword.isEmpty())
-                ((EAPTLSAuthenticator)radAuth).setCaPassword(caPassword);
-
-            if (keyFile != null && !keyFile.isEmpty())
-                ((EAPTLSAuthenticator)radAuth).setKeyFile(basePath + keyFile);
-
-            if (keyType != null && !keyType.isEmpty())
-                ((EAPTLSAuthenticator)radAuth).setKeyFileType(keyType);
-
-            if (keyPassword != null && !keyPassword.isEmpty())
+            if (keyPassword != null)
                 ((EAPTLSAuthenticator)radAuth).setKeyPassword(keyPassword);
 
-            ((EAPTLSAuthenticator)radAuth).setTrustAll(trustAll);
+            ((EAPTLSAuthenticator)radAuth).setKeyFile(basePath + keyFile);
+            ((EAPTLSAuthenticator)radAuth).setKeyFileType(confService.getRadiusKeyType());
+            ((EAPTLSAuthenticator)radAuth).setTrustAll(confService.getRadiusTrustAll());
 
         }
 
         // If we're using EAP-TTLS, we need to define tunneled protocol
         if (radAuth instanceof EAPTTLSAuthenticator) {
 
-            if (innerProtocol == null || innerProtocol.isEmpty())
-                return null;
+            if (innerProtocol == null)
+                throw new GuacamoleException("Trying to use EAP-TTLS, but no inner protocol specified.");
 
             ((EAPTTLSAuthenticator)radAuth).setInnerProtocol(innerProtocol);
 


[12/50] guacamole-client git commit: GUACAMOLE-197: Correct comments on controller js files.

Posted by mj...@apache.org.
GUACAMOLE-197: Correct comments on controller js files.


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

Branch: refs/heads/master
Commit: 773f2da9cecb64711f99f4134d5048fde6db34b5
Parents: 3a5c43b
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Mar 21 22:17:55 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../src/main/resources/controllers/radiusResponseController.js | 5 ++---
 .../src/main/resources/controllers/radiusStateController.js    | 6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/773f2da9/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js b/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
index fb16e6a..9e363de 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
+++ b/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
@@ -18,9 +18,8 @@
  */
 
 /**
- * Controller for the "GUAC_RADIUS_CHALLENGE_RESPONSE" field which uses the DuoWeb
- * API to prompt the user for additional credentials, ultimately receiving a
- * signed response from the Duo service.
+ * Controller for the "GUAC_RADIUS_CHALLENGE_RESPONSE" field which
+ * passes the RADIUS server challenge to the user and takes the response.
  */
 angular.module('guacRadius').controller('radiusResponseController', ['$scope', '$element',
         function radiusResponseController($scope, $element) {

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/773f2da9/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusStateController.js
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusStateController.js b/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusStateController.js
index 908aa3b..726f2f5 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusStateController.js
+++ b/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusStateController.js
@@ -18,9 +18,9 @@
  */
 
 /**
- * Controller for the "GUAC_RADIUS_CHALLENGE_RESPONSE" field which uses the DuoWeb
- * API to prompt the user for additional credentials, ultimately receiving a
- * signed response from the Duo service.
+ * Controller for the "GUAC_RADIUS_STATE" field which is used to pass
+ * the RADIUS server state to maintain the session with the RADIUS
+ * server.
  */
 angular.module('guacRadius').controller('radiusStateController', ['$scope', '$element',
         function radiusStateController($scope, $element) {


[35/50] guacamole-client git commit: GUACAMOLE-197: Move RadiusClient object to a return value instead of class-level object; properly clean up RADIUS connections.

Posted by mj...@apache.org.
GUACAMOLE-197: Move RadiusClient object to a return value instead of class-level object; properly clean up RADIUS connections.


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

Branch: refs/heads/master
Commit: 249ea0776b4ac2fe178a03976252c283f9d05334
Parents: fa820cb
Author: Nick Couchman <vn...@apache.org>
Authored: Sun Jul 16 14:40:49 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../radius/AuthenticationProviderService.java   |  6 ----
 .../auth/radius/RadiusConnectionService.java    | 30 +++++++-------------
 2 files changed, 11 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/249ea077/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index 530de15..eafdf83 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -160,9 +160,6 @@ public class AuthenticationProviderService {
                 logger.debug("Error configuring RADIUS server.", e);
                 throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
             }
-            finally {
-                radiusService.disconnect();
-            }
         }
 
         // This is a response to a previous challenge, authenticate with that.
@@ -177,9 +174,6 @@ public class AuthenticationProviderService {
                 logger.debug("Error configuring RADIUS server.", e);
                 throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
             }
-            finally {
-                radiusService.disconnect();
-            }
         }
 
         // No RadiusPacket is returned, we've encountered an error.

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/249ea077/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index 22c8d82..9dd39a3 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -64,11 +64,6 @@ public class RadiusConnectionService {
 
 
     /**
-     * The RADIUS client;
-     */
-    private RadiusClient radiusClient;
-
-    /**
      * Creates a new instance of RadiusClient, configured with parameters
      * from guacamole.properties.
      *
@@ -76,11 +71,11 @@ public class RadiusConnectionService {
      *     If an error occurs while parsing guacamole.properties, or if the
      *     configuration of RadiusClient fails.
      */
-    private void createRadiusConnection() {
+    private RadiusClient createRadiusConnection() {
 
         // Create the RADIUS client with the configuration parameters
         try {
-            radiusClient = new RadiusClient(InetAddress.getByName(confService.getRadiusServer()),
+            return new RadiusClient(InetAddress.getByName(confService.getRadiusServer()),
                                             confService.getRadiusSharedSecret(),
                                             confService.getRadiusAuthPort(),
                                             confService.getRadiusAcctPort(),
@@ -99,6 +94,8 @@ public class RadiusConnectionService {
             logger.debug("Failed to communicate with host.", e);
         }
 
+        return null;
+
     }
 
     /**
@@ -110,7 +107,8 @@ public class RadiusConnectionService {
      *     with parameters from guacamole.properties, or null if
      *     configuration fails.
      */
-    private RadiusAuthenticator setupRadiusAuthenticator() throws GuacamoleException {
+    private RadiusAuthenticator setupRadiusAuthenticator(RadiusClient radiusClient)
+            throws GuacamoleException {
 
         // If we don't have a radiusClient object, yet, don't go any further.
         if (radiusClient == null) {
@@ -196,7 +194,7 @@ public class RadiusConnectionService {
         }
 
         // Create the RADIUS connection and set up the dictionary
-        createRadiusConnection();
+        RadiusClient radiusClient = createRadiusConnection();
         AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");
 
         // Client failed to set up, so we return null
@@ -204,7 +202,7 @@ public class RadiusConnectionService {
             return null;
 
         // Set up the RadiusAuthenticator
-        RadiusAuthenticator radAuth = setupRadiusAuthenticator();
+        RadiusAuthenticator radAuth = setupRadiusAuthenticator(radiusClient);
         if (radAuth == null)
             throw new GuacamoleException("Unknown RADIUS authentication protocol.");
 
@@ -248,6 +246,9 @@ public class RadiusConnectionService {
             logger.debug("Unknown RADIUS algorithm.", e);
             return null;
         }
+        finally {
+            radiusClient.close();
+        }
     }
 
     public RadiusPacket sendChallengeResponse(String username, String response, String state)
@@ -272,13 +273,4 @@ public class RadiusConnectionService {
 
     }
 
-    /**
-     * Disconnects the current RADIUS connection.
-     */
-    public void disconnect() {
-
-        radiusClient.close();
-
-    }
-
 }


[04/50] guacamole-client git commit: GUACAMOLE-197: Add JavaDoc comments for the state field class; remove debug code.

Posted by mj...@apache.org.
GUACAMOLE-197: Add JavaDoc comments for the state field class; remove debug code.


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

Branch: refs/heads/master
Commit: c02e46e70db796c020f6163dc68909567ec50572
Parents: 59e8b8a
Author: Nick Couchman <ni...@yahoo.com>
Authored: Wed Feb 15 12:39:06 2017 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:09 2018 -0500

----------------------------------------------------------------------
 .../guacamole/auth/radius/form/RadiusStateField.java | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/c02e46e7/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
index 97a0e44..51d57fe 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
@@ -24,13 +24,14 @@ import org.codehaus.jackson.annotate.JsonProperty;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * The invisible field that stores the state of the RADIUS
+ * connection.  The state is simply a placeholder that helps
+ * the client and server pick back up the conversation
+ * at the correct spot during challenge/response.
+ */
 public class RadiusStateField extends Field {
-
-    /**
-     * Logger for this class.
-     */
-    private final Logger logger = LoggerFactory.getLogger(RadiusStateField.class);
-
+    
     /**
      * The parameter returned by the RADIUS state.
      */
@@ -51,8 +52,6 @@ public class RadiusStateField extends Field {
      */
     public RadiusStateField(String radiusState) {
         super(PARAMETER_NAME, RADIUS_FIELD_TYPE);
-        logger.debug("Initializing the RADIUS state field: {}", radiusState);
-
         this.radiusState = radiusState;
 
     }


[27/50] guacamole-client git commit: GUACAMOLE-197: Add $injector to AngularJS controllers.

Posted by mj...@apache.org.
GUACAMOLE-197: Add $injector to AngularJS controllers.


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

Branch: refs/heads/master
Commit: 45f9815eed43896061f9ed35e6fca80718142806
Parents: f84e3b8
Author: Nick Couchman <vn...@apache.org>
Authored: Sun Nov 19 17:39:28 2017 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../src/main/resources/controllers/radiusResponseController.js   | 4 ++--
 .../src/main/resources/controllers/radiusStateController.js      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/45f9815e/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js b/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
index 9e363de..ddc7e34 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
+++ b/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
@@ -21,8 +21,8 @@
  * Controller for the "GUAC_RADIUS_CHALLENGE_RESPONSE" field which
  * passes the RADIUS server challenge to the user and takes the response.
  */
-angular.module('guacRadius').controller('radiusResponseController', ['$scope', '$element',
-        function radiusResponseController($scope, $element) {
+angular.module('guacRadius').controller('radiusResponseController', ['$scope', '$injector',
+        function radiusResponseController($scope, $injector) {
 
     // Populate the reply message field
     $scope.radiusPlaceholder = $scope.field.replyMsg;

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/45f9815e/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusStateController.js
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusStateController.js b/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusStateController.js
index 726f2f5..fb956ab 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusStateController.js
+++ b/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusStateController.js
@@ -22,8 +22,8 @@
  * the RADIUS server state to maintain the session with the RADIUS
  * server.
  */
-angular.module('guacRadius').controller('radiusStateController', ['$scope', '$element',
-        function radiusStateController($scope, $element) {
+angular.module('guacRadius').controller('radiusStateController', ['$scope', '$injector',
+        function radiusStateController($scope, $injector) {
 
     // Populate the hidden field for the connection state
     $scope.model = $scope.field.radiusState;


[37/50] guacamole-client git commit: GUACAMOLE-197: Clean up property comments.

Posted by mj...@apache.org.
GUACAMOLE-197: Clean up property comments.


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

Branch: refs/heads/master
Commit: 84276af007d138ec2e108a084ab179119c0ba3f3
Parents: 9a98400
Author: Nick Couchman <vn...@apache.org>
Authored: Sat Jul 15 17:28:58 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../apache/guacamole/auth/radius/RadiusGuacamoleProperties.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/84276af0/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
index 5df6a46..cee7e0e 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
@@ -47,7 +47,7 @@ public class RadiusGuacamoleProperties {
     };
 
     /**
-     * The port on the RADIUS server to connect to when accounting users.
+     * The port on the server to connect to when performing RADIUS accounting.
      */
     public static final IntegerGuacamoleProperty RADIUS_ACCT_PORT = new IntegerGuacamoleProperty() {
 
@@ -68,7 +68,7 @@ public class RadiusGuacamoleProperties {
     };
 
     /**
-     * The shared secret of the RADIUS server to connect to when authenticating users.
+     * The shared secret to use when connecting to the RADIUS server.
      */
     public static final StringGuacamoleProperty RADIUS_SHARED_SECRET = new StringGuacamoleProperty() {
 


[32/50] guacamole-client git commit: GUACAMOLE-197: Tweak to comment

Posted by mj...@apache.org.
GUACAMOLE-197: Tweak to comment


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

Branch: refs/heads/master
Commit: 015cb4aecdbb385f86bf8c9d9d0d0b315b460473
Parents: aa55676
Author: Nick Couchman <vn...@apache.org>
Authored: Fri Jul 14 22:24:11 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../guacamole/auth/radius/AuthenticationProviderService.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/015cb4ae/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index 2c3ace9..ad1ac06 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -195,7 +195,7 @@ public class AuthenticationProviderService {
                 }
             }
 
-            // Something unanticipated happened, so we panic and go back to login.
+            // Something unanticipated happened, so panic and go back to login.
             else {
                 logger.error("Unexpected failure authenticating with RADIUS server.");
                 throw new GuacamoleInvalidCredentialsException("Unknown error trying to authenticate.", CredentialsInfo.USERNAME_PASSWORD);


[41/50] guacamole-client git commit: GUACAMOLE-197: Revert some unnecessary code changes.

Posted by mj...@apache.org.
GUACAMOLE-197: Revert some unnecessary code changes.


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

Branch: refs/heads/master
Commit: 4a57012f9da8631c15a64ebc93a35e569e0995db
Parents: b204a4c
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Jan 16 14:27:34 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:12 2018 -0500

----------------------------------------------------------------------
 guacamole/src/main/webapp/app/login/directives/login.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/4a57012f/guacamole/src/main/webapp/app/login/directives/login.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/login/directives/login.js b/guacamole/src/main/webapp/app/login/directives/login.js
index f918a55..02aa1ac 100644
--- a/guacamole/src/main/webapp/app/login/directives/login.js
+++ b/guacamole/src/main/webapp/app/login/directives/login.js
@@ -172,11 +172,11 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
                     angular.forEach($scope.remainingFields, function clearEnteredValueIfPassword(field) {
 
                         // Remove entered value only if field is a password field
-                        if (field.type === Field.Type.PASSWORD)
+                        if (field.type === Field.Type.PASSWORD && field.name in $scope.enteredValues)
                             $scope.enteredValues[field.name] = '';
 
                         // If field is not username field and not password field, delete it.
-                        else if (field.type !== Field.Type.USERNAME)
+                        else if (field.type !== Field.Type.USERNAME && field.name in $scope.enteredValues)
                             delete $scope.enteredValues[field.name];
 
                     });


[05/50] guacamole-client git commit: GUACAMOLE-197: Use java.io.File for filename operations, rather than relying on platform-specific assumptions.

Posted by mj...@apache.org.
GUACAMOLE-197: Use java.io.File for filename operations, rather than relying on platform-specific assumptions.


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

Branch: refs/heads/master
Commit: cf884f33f93c27ee861d7f00156de4732581f942
Parents: 60b5802
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 13:29:49 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../auth/radius/RadiusConnectionService.java    | 28 +++++++-------------
 1 file changed, 10 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/cf884f33/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index 68d7823..677647a 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -20,6 +20,7 @@
 package org.apache.guacamole.auth.radius;
 
 import com.google.inject.Inject;
+import java.io.File;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.InetAddress;
@@ -119,23 +120,14 @@ public class RadiusConnectionService {
             return null;
         }
 
-        String caFile;
-        String caPassword;
-        String caType;
-        String keyFile;
-        String keyPassword;
-        String innerProtocol;
-        LocalEnvironment guacEnv;
-        String basePath;
-
         // Pull configuration parameters from guacamole.properties
-        guacEnv = new LocalEnvironment();
-        basePath = guacEnv.getGuacamoleHome().getAbsolutePath() + '/';
-        caFile = confService.getRadiusCAFile();
-        caPassword = confService.getRadiusCAPassword();
-        keyFile = confService.getRadiusKeyFile();
-        keyPassword = confService.getRadiusKeyPassword();
-        innerProtocol = confService.getRadiusEAPTTLSInnerProtocol();
+        LocalEnvironment guacEnv = new LocalEnvironment();
+        String guacHome = guacEnv.getGuacamoleHome().getAbsolutePath();
+        String caFile = confService.getRadiusCAFile();
+        String caPassword = confService.getRadiusCAPassword();
+        String keyFile = confService.getRadiusKeyFile();
+        String keyPassword = confService.getRadiusKeyPassword();
+        String innerProtocol = confService.getRadiusEAPTTLSInnerProtocol();
             
         RadiusAuthenticator radAuth = radiusClient.getAuthProtocol(confService.getRadiusAuthProtocol());
         if (radAuth == null)
@@ -147,7 +139,7 @@ public class RadiusConnectionService {
             radAuth instanceof EAPTTLSAuthenticator) {
 
             if (caFile != null) {
-                ((EAPTLSAuthenticator)radAuth).setCaFile(basePath + caFile);
+                ((EAPTLSAuthenticator)radAuth).setCaFile((new File(guacHome, caFile)).toString());
                 ((EAPTLSAuthenticator)radAuth).setCaFileType(confService.getRadiusCAType());
                 if (caPassword != null)
                     ((EAPTLSAuthenticator)radAuth).setCaPassword(caPassword);
@@ -156,7 +148,7 @@ public class RadiusConnectionService {
             if (keyPassword != null)
                 ((EAPTLSAuthenticator)radAuth).setKeyPassword(keyPassword);
 
-            ((EAPTLSAuthenticator)radAuth).setKeyFile(basePath + keyFile);
+            ((EAPTLSAuthenticator)radAuth).setKeyFile((new File(guacHome, keyFile)).toString());
             ((EAPTLSAuthenticator)radAuth).setKeyFileType(confService.getRadiusKeyType());
             ((EAPTLSAuthenticator)radAuth).setTrustAll(confService.getRadiusTrustAll());
 


[30/50] guacamole-client git commit: GUACAMOLE-197: Move some RADIUS code into specific functions; tighten up code, improve efficiency, address some style issues.

Posted by mj...@apache.org.
GUACAMOLE-197: Move some RADIUS code into specific functions; tighten up code, improve efficiency, address some style issues.


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

Branch: refs/heads/master
Commit: e341e48c2a8d81eb73abb84ac23619027a61c303
Parents: 4155756
Author: Nick Couchman <vn...@apache.org>
Authored: Fri Jul 14 21:24:45 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../radius/AuthenticationProviderService.java   | 98 ++++++++++++--------
 .../auth/radius/RadiusConnectionService.java    | 40 ++++----
 2 files changed, 75 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/e341e48c/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index d4f3ed1..fc4a6bf 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -76,6 +76,46 @@ public class AuthenticationProviderService {
     private Provider<AuthenticatedUser> authenticatedUserProvider;
 
     /**
+     * Returns the expected credentials from a RADIUS challenge.
+     *
+     * @param challengePacket
+     *     The AccessChallenge RadiusPacket received from the RADIUS 
+     *     server.
+     *
+     * @return
+     *     A CredentialsInfo object that represents fields that need to
+     *     be presented to the user in order to complete authentication.
+     *     One of these must be the RADIUS state.
+     */
+    private CredentialsInfo getRadiusChallenge(RadiusPacket challengePacket) {
+
+        // Try to get the state attribute - if it's not there, we have a problem
+        RadiusAttribute stateAttr = challengePacket.findAttribute(Attr_State.TYPE);
+        if (stateAttr == null) {
+            logger.error("Something went wrong, state attribute not present.");
+            logger.debug("State Attribute turned up null, which shouldn't happen in AccessChallenge.");
+            return null;
+        }
+
+        // We need to get the reply message so we know what to ask the user
+        RadiusAttribute replyAttr = challengePacket.findAttribute(Attr_ReplyMessage.TYPE);
+        if (replyAttr == null) {
+            logger.error("No reply message received from the server.");
+            logger.debug("Expecting a Attr_ReplyMessage attribute on this packet, and did not get one.");
+            return null;
+        }
+
+        // We have the required attributes - convert to strings and then generate the additional login box/field
+        String replyMsg = replyAttr.toString();
+        String radiusState = new String(stateAttr.getValue().getBytes());
+        Field radiusResponseField = new RadiusChallengeResponseField(replyMsg);
+        Field radiusStateField = new RadiusStateField(radiusState);
+
+        // Return the CredentialsInfo object that has the state and the expected response.
+        return new CredentialsInfo(Arrays.asList(radiusResponseField,radiusStateField));
+    }
+
+    /**
      * Returns an AuthenticatedUser representing the user authenticated by the
      * given credentials.
      *
@@ -93,12 +133,6 @@ public class AuthenticationProviderService {
     public AuthenticatedUser authenticateUser(Credentials credentials)
             throws GuacamoleException {
 
-        // Grab the HTTP Request from the credentials object
-        HttpServletRequest request = credentials.getRequest();
-
-        // Set up RadiusPacket object
-        RadiusPacket radPack;
-
         // Ignore anonymous users
         if (credentials.getUsername() == null || credentials.getUsername().isEmpty())
             return null;
@@ -107,13 +141,19 @@ public class AuthenticationProviderService {
         if (credentials.getPassword() == null || credentials.getPassword().isEmpty())
             return null;
 
+        // Grab the HTTP Request from the credentials object
+        HttpServletRequest request = credentials.getRequest();
+
         // Try to get parameters to see if this is a post-challenge attempt
         String challengeResponse = request.getParameter(RadiusChallengeResponseField.PARAMETER_NAME);
 
-        // We do not have a challenge response, so we proceed normally
+        // RadiusPacket object to store response from server.
+        RadiusPacket radPack;
+
+        // We do not have a challenge response, proceed with username/password authentication.
         if (challengeResponse == null) {
 
-            // Initialize Radius Packet and try to authenticate
+            // Attempt RADIUS authentication with username/password.
             try {
                 radPack = radiusService.authenticate(credentials.getUsername(),
                                                 credentials.getPassword());
@@ -124,7 +164,7 @@ public class AuthenticationProviderService {
                 throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
             }
 
-            // If configure fails, permission to login is denied
+            // If no RadiusPacket is returned, we've encountered an error.
             if (radPack == null) {
                 logger.debug("Nothing in the RADIUS packet.");
                 throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
@@ -133,45 +173,23 @@ public class AuthenticationProviderService {
             // If we get back an AccessReject packet, login is denied.
             else if (radPack instanceof AccessReject) {
                 logger.debug("Login has been rejected by RADIUS server.");
-                throw new GuacamoleInvalidCredentialsException("Permission denied.", CredentialsInfo.USERNAME_PASSWORD);
+                throw new GuacamoleInvalidCredentialsException("Authentication failed.", CredentialsInfo.USERNAME_PASSWORD);
             }
 
             // If we receive an AccessChallenge package, the server needs more information -
             // We create a new form/field with the challenge message.
             else if (radPack instanceof AccessChallenge) {
+                CredentialsInfo expectedCredentials = getRadiusChallenge(radPack);
 
-                // Try to get the state attribute - if it's not there, we have a problem
-                RadiusAttribute stateAttr = radPack.findAttribute(Attr_State.TYPE);
-                if (stateAttr == null) {
-                    logger.error("Something went wrong, state attribute not present.");
-                    logger.debug("State Attribute turned up null, which shouldn't happen in AccessChallenge.");
+                if (expectedCredentials == null)
                     throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
-                }
-
-                // We need to get the reply message so we know what to ask the user
-                RadiusAttribute replyAttr = radPack.findAttribute(Attr_ReplyMessage.TYPE);
-                if (replyAttr == null) {
-                    logger.error("No reply message received from the server.");
-                    logger.debug("Expecting a Attr_ReplyMessage attribute on this packet, and did not get one.");
-                    throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
-                }
 
-                // We have the required attributes - convert to strings and then generate the additional login box/field
-                String replyMsg = replyAttr.toString();
-                String radiusState = new String(stateAttr.getValue().getBytes());
-                Field radiusResponseField = new RadiusChallengeResponseField(replyMsg);
-                Field radiusStateField = new RadiusStateField(radiusState);
-                CredentialsInfo expectedCredentials = new CredentialsInfo(Arrays.asList(radiusResponseField,radiusStateField));
                 throw new GuacamoleInsufficientCredentialsException("LOGIN.INFO_RADIUS_ADDL_REQUIRED", expectedCredentials);
-
             }
 
             // If we receive AccessAccept, authentication has succeeded
             else if (radPack instanceof AccessAccept) {
-
                 try {
-
-                    // Return AuthenticatedUser if bind succeeds
                     AuthenticatedUser authenticatedUser = authenticatedUserProvider.get();
                     authenticatedUser.init(credentials);
                     return authenticatedUser;
@@ -181,9 +199,9 @@ public class AuthenticationProviderService {
                 }
             }
 
-            // Something unanticipated happened, so we panic
+            // Something unanticipated happened, so we panic and go back to login.
             else {
-                logger.error("Unexpected authentication failure talking to RADIUS server.");
+                logger.error("Unexpected failure authenticating with RADIUS server.");
                 throw new GuacamoleInvalidCredentialsException("Unknown error trying to authenticate.", CredentialsInfo.USERNAME_PASSWORD);
             }
         }
@@ -191,7 +209,7 @@ public class AuthenticationProviderService {
         // The user responded to the challenge, send that back to the server
         else {
 
-            // Initialize Radius Packet and try to authenticate
+            // Attempt to authenticate with response to challenge.
             try {
                 radPack = radiusService.authenticate(credentials.getUsername(),
                                                      request.getParameter(RadiusStateField.PARAMETER_NAME),
@@ -200,7 +218,7 @@ public class AuthenticationProviderService {
             catch (GuacamoleException e) {
                 logger.error("Cannot configure RADIUS server: {}", e.getMessage());
                 logger.debug("Error configuring RADIUS server.", e);
-                radPack = null;
+                throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
             }
             finally {
                 radiusService.disconnect();
@@ -216,8 +234,8 @@ public class AuthenticationProviderService {
             // Authentication failed
             else {
                 logger.warn("RADIUS Challenge/Response authentication failed.");
-                logger.debug("Did not receive a RADIUS AccessAccept packet back from server.");
-                throw new GuacamoleInvalidCredentialsException("Failed to authenticate to RADIUS.", CredentialsInfo.USERNAME_PASSWORD);
+                logger.debug("Received something other than AccessAccept packet from the RADIUS server.");
+                throw new GuacamoleInvalidCredentialsException("Authentication failed.", CredentialsInfo.USERNAME_PASSWORD);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/e341e48c/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index 677647a..c3524cd 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -109,7 +109,6 @@ public class RadiusConnectionService {
      *     A new RadiusAuthenticator instance which has been configured
      *     with parameters from guacamole.properties, or null if
      *     configuration fails.
-     *
      */
     private RadiusAuthenticator setupRadiusAuthenticator() throws GuacamoleException {
 
@@ -151,17 +150,14 @@ public class RadiusConnectionService {
             ((EAPTLSAuthenticator)radAuth).setKeyFile((new File(guacHome, keyFile)).toString());
             ((EAPTLSAuthenticator)radAuth).setKeyFileType(confService.getRadiusKeyType());
             ((EAPTLSAuthenticator)radAuth).setTrustAll(confService.getRadiusTrustAll());
-
         }
 
         // If we're using EAP-TTLS, we need to define tunneled protocol
         if (radAuth instanceof EAPTTLSAuthenticator) {
-
             if (innerProtocol == null)
                 throw new GuacamoleException("Trying to use EAP-TTLS, but no inner protocol specified.");
 
             ((EAPTTLSAuthenticator)radAuth).setInnerProtocol(innerProtocol);
-
         }
 
         return radAuth;
@@ -186,14 +182,6 @@ public class RadiusConnectionService {
     public RadiusPacket authenticate(String username, String password) 
             throws GuacamoleException {
 
-        // Create the connection and load the attribute dictionary
-        createRadiusConnection();
-        AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");
-
-        // If the client is null, we return null - something has gone wrong
-        if (radiusClient == null)
-            return null;
-
         // If a username hasn't been provided, stop
         if (username == null || username.isEmpty()) {
             logger.warn("Anonymous access not allowed with RADIUS client.");
@@ -206,6 +194,14 @@ public class RadiusConnectionService {
             return null;
         }
 
+        // Create the connection and load the attribute dictionary
+        createRadiusConnection();
+        AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");
+
+        // If the client is null, we return null - something has gone wrong
+        if (radiusClient == null)
+            return null;
+
         RadiusAuthenticator radAuth = setupRadiusAuthenticator();
 
         if (radAuth == null)
@@ -272,14 +268,6 @@ public class RadiusConnectionService {
     public RadiusPacket authenticate(String username, String state, String response)
             throws GuacamoleException {
 
-        // Create the RADIUS connection and set up the dictionary
-        createRadiusConnection();
-        AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");
-
-        // Client failed to set up, so we return null
-        if (radiusClient == null)
-            return null;
-
         // If a username wasn't passed, we quit
         if (username == null || username.isEmpty()) {
             logger.warn("Anonymous access not allowed with RADIUS client.");
@@ -298,6 +286,14 @@ public class RadiusConnectionService {
             return null;
         }
 
+        // Create the RADIUS connection and set up the dictionary
+        createRadiusConnection();
+        AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");
+
+        // Client failed to set up, so we return null
+        if (radiusClient == null)
+            return null;
+
         // Set up the RadiusAuthenticator
         RadiusAuthenticator radAuth = setupRadiusAuthenticator();
         if (radAuth == null)
@@ -345,9 +341,7 @@ public class RadiusConnectionService {
     }
 
     /**
-     * Disconnects the given RADIUS connection, logging any failure to do so
-     * appropriately.
-     *
+     * Disconnects the current RADIUS connection.
      */
     public void disconnect() {
 


[47/50] guacamole-client git commit: GUACAMOLE-197: Handle all non-username fields identically.

Posted by mj...@apache.org.
GUACAMOLE-197: Handle all non-username fields identically.


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

Branch: refs/heads/master
Commit: 037913ac739097ec82d0a950ee9935883595de36
Parents: 4a57012
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Jan 30 09:50:21 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Tue Jan 30 09:50:21 2018 -0500

----------------------------------------------------------------------
 guacamole/src/main/webapp/app/login/directives/login.js | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/037913ac/guacamole/src/main/webapp/app/login/directives/login.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/login/directives/login.js b/guacamole/src/main/webapp/app/login/directives/login.js
index 02aa1ac..51c366f 100644
--- a/guacamole/src/main/webapp/app/login/directives/login.js
+++ b/guacamole/src/main/webapp/app/login/directives/login.js
@@ -171,12 +171,8 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
                     // Clear all remaining fields that are not username fields
                     angular.forEach($scope.remainingFields, function clearEnteredValueIfPassword(field) {
 
-                        // Remove entered value only if field is a password field
-                        if (field.type === Field.Type.PASSWORD && field.name in $scope.enteredValues)
-                            $scope.enteredValues[field.name] = '';
-
-                        // If field is not username field and not password field, delete it.
-                        else if (field.type !== Field.Type.USERNAME && field.name in $scope.enteredValues)
+                        // If field is not username field, delete it.
+                        if (field.type !== Field.Type.USERNAME && field.name in $scope.enteredValues)
                             delete $scope.enteredValues[field.name];
 
                     });


[48/50] guacamole-client git commit: GUACAMOLE-197: Change RADIUS server to RADIUS hostname.

Posted by mj...@apache.org.
GUACAMOLE-197: Change RADIUS server to RADIUS hostname.


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

Branch: refs/heads/master
Commit: 789da685745ebaf2c54096b17b5d6ddbf06bd7ac
Parents: 037913a
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Jan 30 18:33:13 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Tue Jan 30 18:33:13 2018 -0500

----------------------------------------------------------------------
 .../org/apache/guacamole/auth/radius/ConfigurationService.java | 2 +-
 .../guacamole/auth/radius/RadiusGuacamoleProperties.java       | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/789da685/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
index c903a38..97cc39c 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
@@ -47,7 +47,7 @@ public class ConfigurationService {
      */
     public String getRadiusServer() throws GuacamoleException {
         return environment.getProperty(
-            RadiusGuacamoleProperties.RADIUS_SERVER,
+            RadiusGuacamoleProperties.RADIUS_HOSTNAME,
             "localhost"
         );
     }

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/789da685/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
index 49fa1b6..144d824 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
@@ -58,12 +58,12 @@ public class RadiusGuacamoleProperties {
 
 
     /**
-     * The hostname or ip of the RADIUS server to connect to when authenticating users.
+     * The hostname or IP address of the RADIUS server to connect to when authenticating users.
      */
-    public static final StringGuacamoleProperty RADIUS_SERVER = new StringGuacamoleProperty() {
+    public static final StringGuacamoleProperty RADIUS_HOSTNAME = new StringGuacamoleProperty() {
 
         @Override
-        public String getName() { return "radius-server"; }
+        public String getName() { return "radius-hostname"; }
 
     };
 


[44/50] guacamole-client git commit: GUACAMOLE-197: Remove debugging code.

Posted by mj...@apache.org.
GUACAMOLE-197: Remove debugging code.


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

Branch: refs/heads/master
Commit: b204a4c708c0235db9a1825699e8724a8a9853a8
Parents: b7db93c
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Jan 16 14:26:14 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:12 2018 -0500

----------------------------------------------------------------------
 guacamole/src/main/webapp/app/login/directives/login.js | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b204a4c7/guacamole/src/main/webapp/app/login/directives/login.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/login/directives/login.js b/guacamole/src/main/webapp/app/login/directives/login.js
index 97d1068..f918a55 100644
--- a/guacamole/src/main/webapp/app/login/directives/login.js
+++ b/guacamole/src/main/webapp/app/login/directives/login.js
@@ -66,7 +66,6 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
         var Field = $injector.get('Field');
 
         // Required services
-        var $log                  = $injector.get('$log');
         var $route                = $injector.get('$route');
         var authenticationService = $injector.get('authenticationService');
 


[26/50] guacamole-client git commit: GUACAMOLE-197: Log error if we reach an unexpected place in the RADIUS conversation.

Posted by mj...@apache.org.
GUACAMOLE-197: Log error if we reach an unexpected place in the RADIUS conversation.


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

Branch: refs/heads/master
Commit: 41557566b9b87b7f2acaad00fc54781e83210658
Parents: 77cb98c
Author: Nick Couchman <vn...@apache.org>
Authored: Fri Jul 14 16:53:39 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../guacamole/auth/radius/AuthenticationProviderService.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/41557566/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index da0ae4e..d4f3ed1 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -182,8 +182,10 @@ public class AuthenticationProviderService {
             }
 
             // Something unanticipated happened, so we panic
-            else
+            else {
+                logger.error("Unexpected authentication failure talking to RADIUS server.");
                 throw new GuacamoleInvalidCredentialsException("Unknown error trying to authenticate.", CredentialsInfo.USERNAME_PASSWORD);
+            }
         }
 
         // The user responded to the challenge, send that back to the server


[14/50] guacamole-client git commit: GUACAMOLE-197: Fix issue where wrong error message is logged.

Posted by mj...@apache.org.
GUACAMOLE-197: Fix issue where wrong error message is logged.


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

Branch: refs/heads/master
Commit: ecfa9183b500f40d9f074e9de56f8a53bae1d701
Parents: 8be8626
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 09:23:19 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../guacamole/auth/radius/AuthenticationProviderService.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ecfa9183/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index 2b4f981..da0ae4e 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -121,7 +121,7 @@ public class AuthenticationProviderService {
             catch (GuacamoleException e) {
                 logger.error("Cannot configure RADIUS server: {}", e.getMessage());
                 logger.debug("Error configuring RADIUS server.", e);
-                radPack = null;
+                throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
             }
 
             // If configure fails, permission to login is denied


[40/50] guacamole-client git commit: GUACAMOLE-197: Handle extra login fields when dealing with failed authentication.

Posted by mj...@apache.org.
GUACAMOLE-197: Handle extra login fields when dealing with failed authentication.


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

Branch: refs/heads/master
Commit: b7db93c7296a9f79cfe264d63cc30d1c3adbc7aa
Parents: b0284ec
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Jan 16 14:22:52 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:12 2018 -0500

----------------------------------------------------------------------
 guacamole/src/main/webapp/app/login/directives/login.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b7db93c7/guacamole/src/main/webapp/app/login/directives/login.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/login/directives/login.js b/guacamole/src/main/webapp/app/login/directives/login.js
index cc820b8..97d1068 100644
--- a/guacamole/src/main/webapp/app/login/directives/login.js
+++ b/guacamole/src/main/webapp/app/login/directives/login.js
@@ -66,6 +66,7 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
         var Field = $injector.get('Field');
 
         // Required services
+        var $log                  = $injector.get('$log');
         var $route                = $injector.get('$route');
         var authenticationService = $injector.get('authenticationService');
 
@@ -168,13 +169,17 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
                     else
                         $scope.loginError = error.translatableMessage;
 
-                    // Clear all visible password fields
+                    // Clear all remaining fields that are not username fields
                     angular.forEach($scope.remainingFields, function clearEnteredValueIfPassword(field) {
 
                         // Remove entered value only if field is a password field
-                        if (field.type === Field.Type.PASSWORD && field.name in $scope.enteredValues)
+                        if (field.type === Field.Type.PASSWORD)
                             $scope.enteredValues[field.name] = '';
 
+                        // If field is not username field and not password field, delete it.
+                        else if (field.type !== Field.Type.USERNAME)
+                            delete $scope.enteredValues[field.name];
+
                     });
                 }
 


[02/50] guacamole-client git commit: GUACAMOLE-197: Remove @author tags from Java source files.

Posted by mj...@apache.org.
GUACAMOLE-197: Remove @author tags from Java source files.


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

Branch: refs/heads/master
Commit: 9de1b73ac86553f9b65585244ae47a5e5d7dd2f4
Parents: df91b88
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Feb 28 08:03:45 2017 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:09 2018 -0500

----------------------------------------------------------------------
 .../guacamole/auth/radius/AuthenticationProviderService.java       | 2 --
 .../org/apache/guacamole/auth/radius/ConfigurationService.java     | 2 --
 .../apache/guacamole/auth/radius/RadiusAuthenticationProvider.java | 2 --
 .../guacamole/auth/radius/RadiusAuthenticationProviderModule.java  | 2 --
 .../org/apache/guacamole/auth/radius/RadiusConnectionService.java  | 2 --
 .../apache/guacamole/auth/radius/RadiusGuacamoleProperties.java    | 2 --
 .../org/apache/guacamole/auth/radius/user/AuthenticatedUser.java   | 2 --
 7 files changed, 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9de1b73a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index d1a9e25..f1741e1 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -48,8 +48,6 @@ import net.jradius.packet.attribute.RadiusAttribute;
 /**
  * Service providing convenience functions for the RADIUS AuthenticationProvider
  * implementation.
- *
- * @author Michael Jumper
  */
 public class AuthenticationProviderService {
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9de1b73a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
index a77acae..58ee3c6 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
@@ -27,8 +27,6 @@ import org.apache.guacamole.environment.Environment;
 
 /**
  * Service for retrieving configuration information regarding the RADIUS server.
- *
- * @author Nick Couchman
  */
 public class ConfigurationService {
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9de1b73a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
index 461eb0a..c4af1c3 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProvider.java
@@ -32,8 +32,6 @@ import org.apache.guacamole.net.auth.UserContext;
  * Allows users to be authenticated against an RADIUS server. Each user may have
  * any number of authorized configurations. Authorized configurations may be
  * shared.
- *
- * @author Michael Jumper
  */
 public class RadiusAuthenticationProvider implements AuthenticationProvider {
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9de1b73a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProviderModule.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProviderModule.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProviderModule.java
index af6d02d..37ecb79 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProviderModule.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProviderModule.java
@@ -27,8 +27,6 @@ import org.apache.guacamole.net.auth.AuthenticationProvider;
 
 /**
  * Guice module which configures RADIUS-specific injections.
- *
- * @author Michael Jumper
  */
 public class RadiusAuthenticationProviderModule extends AbstractModule {
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9de1b73a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index 6cca677..d9a7c2d 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -47,8 +47,6 @@ import net.jradius.packet.RadiusResponse;
 
 /**
  * Service for creating and managing connections to RADIUS servers.
- *
- * @author Nick Couchman
  */
 public class RadiusConnectionService {
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9de1b73a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
index 187686b..15f4da2 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
@@ -28,8 +28,6 @@ import org.apache.guacamole.properties.StringGuacamoleProperty;
  * Provides properties required for use of the RADIUS authentication provider.
  * These properties will be read from guacamole.properties when the RADIUS
  * authentication provider is used.
- *
- * @author Nick Couchman
  */
 public class RadiusGuacamoleProperties {
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9de1b73a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/user/AuthenticatedUser.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/user/AuthenticatedUser.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/user/AuthenticatedUser.java
index d4d55b9..a429253 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/user/AuthenticatedUser.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/user/AuthenticatedUser.java
@@ -27,8 +27,6 @@ import org.apache.guacamole.net.auth.Credentials;
 /**
  * An RADIUS-specific implementation of AuthenticatedUser, associating a
  * particular set of credentials with the RADIUS authentication provider.
- *
- * @author Michael Jumper
  */
 public class AuthenticatedUser extends AbstractAuthenticatedUser {
 


[03/50] guacamole-client git commit: GUACAMOLE-197: Update Authorship for RADIUS-specific files

Posted by mj...@apache.org.
GUACAMOLE-197: Update Authorship for RADIUS-specific files


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

Branch: refs/heads/master
Commit: df91b8828a3292a2b7636f67cd9ccc5a02b39e71
Parents: c02e46e
Author: Nick Couchman <ni...@yahoo.com>
Authored: Wed Feb 15 12:44:59 2017 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:09 2018 -0500

----------------------------------------------------------------------
 .../org/apache/guacamole/auth/radius/ConfigurationService.java     | 2 +-
 .../apache/guacamole/auth/radius/RadiusGuacamoleProperties.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/df91b882/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
index 753a10a..a77acae 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
@@ -28,7 +28,7 @@ import org.apache.guacamole.environment.Environment;
 /**
  * Service for retrieving configuration information regarding the RADIUS server.
  *
- * @author Michael Jumper
+ * @author Nick Couchman
  */
 public class ConfigurationService {
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/df91b882/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
index 713a083..187686b 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
@@ -29,7 +29,7 @@ import org.apache.guacamole.properties.StringGuacamoleProperty;
  * These properties will be read from guacamole.properties when the RADIUS
  * authentication provider is used.
  *
- * @author Michael Jumper
+ * @author Nick Couchman
  */
 public class RadiusGuacamoleProperties {
 


[09/50] guacamole-client git commit: GUACAMOLE-197: Move state field to template file for consistency.

Posted by mj...@apache.org.
GUACAMOLE-197: Move state field to template file for consistency.


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

Branch: refs/heads/master
Commit: 60b5802cc70f2513243fc624c39e3870a9481c8f
Parents: fd84e76
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 10:57:45 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../src/main/resources/config/radiusConfig.js                      | 2 +-
 .../src/main/resources/templates/radiusStateField.html             | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/60b5802c/extensions/guacamole-auth-radius/src/main/resources/config/radiusConfig.js
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/config/radiusConfig.js b/extensions/guacamole-auth-radius/src/main/resources/config/radiusConfig.js
index 20ba86c..dab0ffc 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/config/radiusConfig.js
+++ b/extensions/guacamole-auth-radius/src/main/resources/config/radiusConfig.js
@@ -34,7 +34,7 @@ angular.module('guacRadius').config(['formServiceProvider',
     formServiceProvider.registerFieldType('GUAC_RADIUS_STATE', {
         module      : 'guacRadius',
         controller  : 'radiusStateController',
-        template    : '<input class="ng-hide" type=hidden ng-model="model" />'
+        templateUrl : 'app/ext/radius/templates/radiusStateField.html'
     });
 
 }]);

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/60b5802c/extensions/guacamole-auth-radius/src/main/resources/templates/radiusStateField.html
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/templates/radiusStateField.html b/extensions/guacamole-auth-radius/src/main/resources/templates/radiusStateField.html
new file mode 100644
index 0000000..be8067c
--- /dev/null
+++ b/extensions/guacamole-auth-radius/src/main/resources/templates/radiusStateField.html
@@ -0,0 +1 @@
+<input type=hidden ng-model="model" />


[33/50] guacamole-client git commit: GUACAMOLE-197: Collapse authenticate methods together into single method, add minimal method for challenge/response.

Posted by mj...@apache.org.
GUACAMOLE-197: Collapse authenticate methods together into single method, add minimal method for challenge/response.


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

Branch: refs/heads/master
Commit: fa820cb46f5abffd57b73a558db4cbedd7e6b065
Parents: 84276af
Author: Nick Couchman <vn...@apache.org>
Authored: Sun Jul 16 14:25:55 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../radius/AuthenticationProviderService.java   |   8 +-
 .../auth/radius/RadiusConnectionService.java    | 120 ++++---------------
 2 files changed, 30 insertions(+), 98 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/fa820cb4/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index fdb7737..530de15 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -153,7 +153,7 @@ public class AuthenticationProviderService {
 
             try {
                 radPack = radiusService.authenticate(credentials.getUsername(),
-                                                credentials.getPassword());
+                                                credentials.getPassword(), null);
             }
             catch (GuacamoleException e) {
                 logger.error("Cannot configure RADIUS server: {}", e.getMessage());
@@ -168,9 +168,9 @@ public class AuthenticationProviderService {
         // This is a response to a previous challenge, authenticate with that.
         else {
             try {
-                radPack = radiusService.authenticate(credentials.getUsername(),
-                                                     request.getParameter(RadiusStateField.PARAMETER_NAME),
-                                                     challengeResponse);
+                radPack = radiusService.sendChallengeResponse(credentials.getUsername(),
+                                                     challengeResponse,
+                                                     request.getParameter(RadiusStateField.PARAMETER_NAME));
             }
             catch (GuacamoleException e) {
                 logger.error("Cannot configure RADIUS server: {}", e.getMessage());

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/fa820cb4/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index c3524cd..22c8d82 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -165,54 +165,57 @@ public class RadiusConnectionService {
     }
 
     /**
-     * Authenticate to the RADIUS server and return the response from the
-     * server.
+     * Authenticate to the RADIUS server using existing state and a response
      *
      * @param username
-     *     The username for authentication.
-     * @param password
-     *     The password for authentication.
+     *     The username for the authentication
+     * @param state
+     *     The previous state of the RADIUS connection
+     * @param response
+     *     The response to the RADIUS challenge
      *
      * @return
      *     A RadiusPacket with the response of the server.
      *
      * @throws GuacamoleException
-     *     If an error occurs while talking to the server. 
+     *     If an error occurs while talking to the server.
      */
-    public RadiusPacket authenticate(String username, String password) 
+    public RadiusPacket authenticate(String username, String secret, String state)
             throws GuacamoleException {
 
-        // If a username hasn't been provided, stop
+        // If a username wasn't passed, we quit
         if (username == null || username.isEmpty()) {
             logger.warn("Anonymous access not allowed with RADIUS client.");
             return null;
         }
 
-        // If a password hasn't been provided, stop
-        if (password == null || password.isEmpty()) {
-            logger.warn("Password required for RADIUS authentication.");
+        // If secret wasn't passed, we quit
+        if (secret == null || secret.isEmpty()) {
+            logger.warn("Password/secret required for RADIUS authentication.");
             return null;
         }
 
-        // Create the connection and load the attribute dictionary
+        // Create the RADIUS connection and set up the dictionary
         createRadiusConnection();
         AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");
 
-        // If the client is null, we return null - something has gone wrong
+        // Client failed to set up, so we return null
         if (radiusClient == null)
             return null;
 
+        // Set up the RadiusAuthenticator
         RadiusAuthenticator radAuth = setupRadiusAuthenticator();
-
         if (radAuth == null)
             throw new GuacamoleException("Unknown RADIUS authentication protocol.");
 
-        // Set up attributes, create the access request, and send the packet
-        try { 
+        // Add attributes to the connection and send the packet
+        try {
             AttributeList radAttrs = new AttributeList();
             radAttrs.add(new Attr_UserName(username));
-            radAttrs.add(new Attr_UserPassword(password));
-            radAttrs.add(new Attr_CleartextPassword(password));
+            if (state != null && !state.isEmpty())
+                radAttrs.add(new Attr_State(state));
+            radAttrs.add(new Attr_UserPassword(secret));
+            radAttrs.add(new Attr_CleartextPassword(secret));
 
             AccessRequest radAcc = new AccessRequest(radiusClient);
 
@@ -235,13 +238,11 @@ public class RadiusConnectionService {
             }
             return reply;
         }
-
         catch (RadiusException e) {
             logger.error("Unable to complete authentication.", e.getMessage());
             logger.debug("Authentication with RADIUS failed.", e);
             return null;
         }
-
         catch (NoSuchAlgorithmException e) {
             logger.error("No such RADIUS algorithm: {}", e.getMessage());
             logger.debug("Unknown RADIUS algorithm.", e);
@@ -249,95 +250,26 @@ public class RadiusConnectionService {
         }
     }
 
-    /**
-     * Authenticate to the RADIUS server using existing state and a response
-     *
-     * @param username
-     *     The username for the authentication
-     * @param state
-     *     The previous state of the RADIUS connection
-     * @param response
-     *     The response to the RADIUS challenge
-     *
-     * @return
-     *     A RadiusPacket with the response of the server.
-     *
-     * @throws GuacamoleException
-     *     If an error occurs while talking to the server.
-     */
-    public RadiusPacket authenticate(String username, String state, String response)
+    public RadiusPacket sendChallengeResponse(String username, String response, String state)
             throws GuacamoleException {
 
-        // If a username wasn't passed, we quit
         if (username == null || username.isEmpty()) {
-            logger.warn("Anonymous access not allowed with RADIUS client.");
+            logger.error("Challenge/response to RADIUS requires a username.");
             return null;
         }
 
-        // If the state wasn't passed, we quit
         if (state == null || state.isEmpty()) {
-            logger.warn("This method needs a previous RADIUS state to respond to.");
+            logger.error("Challenge/response to RADIUS requires a prior state.");
             return null;
         }
 
-        // If the response wasn't passed, we quit
         if (response == null || response.isEmpty()) {
-            logger.warn("Response required for RADIUS authentication.");
+            logger.error("Challenge/response to RADIUS requires a response.");
             return null;
         }
 
-        // Create the RADIUS connection and set up the dictionary
-        createRadiusConnection();
-        AttributeFactory.loadAttributeDictionary("net.jradius.dictionary.AttributeDictionaryImpl");
-
-        // Client failed to set up, so we return null
-        if (radiusClient == null)
-            return null;
-
-        // Set up the RadiusAuthenticator
-        RadiusAuthenticator radAuth = setupRadiusAuthenticator();
-        if (radAuth == null)
-            throw new GuacamoleException("Unknown RADIUS authentication protocol.");
+        return authenticate(username,response,state);
 
-        // Add attributes to the connection and send the packet
-        try {
-            AttributeList radAttrs = new AttributeList();
-            radAttrs.add(new Attr_UserName(username));
-            radAttrs.add(new Attr_State(state));
-            radAttrs.add(new Attr_UserPassword(response));
-            radAttrs.add(new Attr_CleartextPassword(response));
-
-            AccessRequest radAcc = new AccessRequest(radiusClient);
-
-            // EAP-TTLS tunnels protected attributes inside the TLS layer
-            if (radAuth instanceof EAPTTLSAuthenticator) {
-                radAuth.setUsername(new Attr_UserName(username));
-                ((EAPTTLSAuthenticator)radAuth).setTunneledAttributes(radAttrs);
-            }
-            else
-                radAcc.addAttributes(radAttrs);
-
-            radAuth.setupRequest(radiusClient, radAcc);
-            radAuth.processRequest(radAcc);
-            RadiusResponse reply = radiusClient.sendReceive(radAcc, confService.getRadiusRetries());
-
-            // We receive a Challenge not asking for user input, so silently process the challenge
-            while((reply instanceof AccessChallenge) && (reply.findAttribute(Attr_ReplyMessage.TYPE) == null)) {
-                radAuth.processChallenge(radAcc, reply);
-                reply = radiusClient.sendReceive(radAcc, confService.getRadiusRetries());
-            }
-            return reply;
-        }
-        catch (RadiusException e) {
-            logger.error("Unable to complete authentication.", e.getMessage());
-            logger.debug("Authentication with RADIUS failed.", e);
-            return null;
-        }
-        catch (NoSuchAlgorithmException e) {
-            logger.error("No such RADIUS algorithm: {}", e.getMessage());
-            logger.debug("Unknown RADIUS algorithm.", e);
-            return null;
-        }
     }
 
     /**


[50/50] guacamole-client git commit: GUACAMOLE-197: Merge support for RADIUS authentication.

Posted by mj...@apache.org.
GUACAMOLE-197: Merge support for RADIUS authentication.


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

Branch: refs/heads/master
Commit: 64ba8a8524bd35467ed289ccfdefc41ccda22add
Parents: eaeaeb1 dcb9e46
Author: Michael Jumper <mj...@apache.org>
Authored: Tue Jan 30 15:43:32 2018 -0800
Committer: Michael Jumper <mj...@apache.org>
Committed: Tue Jan 30 15:43:32 2018 -0800

----------------------------------------------------------------------
 extensions/guacamole-auth-radius/.gitignore     |   3 +
 extensions/guacamole-auth-radius/pom.xml        | 236 ++++++++
 .../guacamole-auth-radius/src/licenses/LICENSE  | 257 +++++++++
 .../guacamole-auth-radius/src/licenses/NOTICE   |   5 +
 .../src/licenses/bundled/README                 |   4 +
 .../licenses/bundled/aopalliance-1.0/LICENSE    |   4 +
 .../licenses/bundled/bouncycastle-1.44/LICENSE  |   7 +
 .../src/licenses/bundled/guice-3.0/COPYING      | 202 +++++++
 .../bundled/javax.inject-1/LICENSE-2.0.txt      | 202 +++++++
 .../src/licenses/bundled/jradius-1.1.5/LICENSE  | 545 +++++++++++++++++++
 .../radius/AuthenticationProviderService.java   | 206 +++++++
 .../auth/radius/ConfigurationService.java       | 318 +++++++++++
 .../radius/RadiusAuthenticationProvider.java    | 106 ++++
 .../RadiusAuthenticationProviderModule.java     |  79 +++
 .../auth/radius/RadiusConnectionService.java    | 310 +++++++++++
 .../auth/radius/RadiusGuacamoleProperties.java  | 191 +++++++
 .../form/RadiusChallengeResponseField.java      |  68 +++
 .../auth/radius/form/RadiusStateField.java      |  69 +++
 .../auth/radius/user/AuthenticatedUser.java     |  66 +++
 .../src/main/resources/config/radiusConfig.js   |  40 ++
 .../controllers/radiusResponseController.js     |  30 +
 .../controllers/radiusStateController.js        |  31 ++
 .../src/main/resources/guac-manifest.json       |  25 +
 .../src/main/resources/license.txt              |  18 +
 .../src/main/resources/radiusModule.js          |  29 +
 .../templates/radiusResponseField.html          |   1 +
 .../resources/templates/radiusStateField.html   |   1 +
 .../src/main/resources/translations/en.json     |  13 +
 .../main/webapp/app/login/directives/login.js   |   8 +-
 pom.xml                                         |  10 +
 30 files changed, 3080 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[28/50] guacamole-client git commit: GUACAMOLE-197: Reorganize authenticateUser to remove some duplicate code and make it easier to follow.

Posted by mj...@apache.org.
GUACAMOLE-197: Reorganize authenticateUser to remove some duplicate code and make it easier to follow.


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

Branch: refs/heads/master
Commit: 6acf032247dc9b5c5ba54fd02fbf34d550e98554
Parents: 015cb4a
Author: Nick Couchman <vn...@apache.org>
Authored: Fri Jul 14 22:35:31 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../radius/AuthenticationProviderService.java   | 90 ++++++++------------
 1 file changed, 37 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/6acf0322/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index ad1ac06..fdb7737 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -160,51 +160,13 @@ public class AuthenticationProviderService {
                 logger.debug("Error configuring RADIUS server.", e);
                 throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
             }
-
-            // No RadiusPacket is returned, we've encountered an error.
-            if (radPack == null) {
-                logger.debug("Nothing in the RADIUS packet.");
-                throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
-            }
-
-            // Received AccessReject packet, login is denied.
-            else if (radPack instanceof AccessReject) {
-                logger.debug("Login has been rejected by RADIUS server.");
-                throw new GuacamoleInvalidCredentialsException("Authentication failed.", CredentialsInfo.USERNAME_PASSWORD);
-            }
-
-            // Received AccessChallenge packet, more credentials required to complete authentication
-            else if (radPack instanceof AccessChallenge) {
-                CredentialsInfo expectedCredentials = getRadiusChallenge(radPack);
-
-                if (expectedCredentials == null)
-                    throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
-
-                throw new GuacamoleInsufficientCredentialsException("LOGIN.INFO_RADIUS_ADDL_REQUIRED", expectedCredentials);
-            }
-
-            // Received AccessAccept, authentication has succeeded
-            else if (radPack instanceof AccessAccept) {
-                try {
-                    AuthenticatedUser authenticatedUser = authenticatedUserProvider.get();
-                    authenticatedUser.init(credentials);
-                    return authenticatedUser;
-                }
-                finally {
-                    radiusService.disconnect();
-                }
-            }
-
-            // Something unanticipated happened, so panic and go back to login.
-            else {
-                logger.error("Unexpected failure authenticating with RADIUS server.");
-                throw new GuacamoleInvalidCredentialsException("Unknown error trying to authenticate.", CredentialsInfo.USERNAME_PASSWORD);
+            finally {
+                radiusService.disconnect();
             }
         }
 
-        // This is a response to a challenge, so authenticate with that response
+        // This is a response to a previous challenge, authenticate with that.
         else {
-
             try {
                 radPack = radiusService.authenticate(credentials.getUsername(),
                                                      request.getParameter(RadiusStateField.PARAMETER_NAME),
@@ -218,21 +180,43 @@ public class AuthenticationProviderService {
             finally {
                 radiusService.disconnect();
             }
+        }
 
-            // Received AccessAccept, authentication succeeded.
-            if (radPack instanceof AccessAccept) {
-                AuthenticatedUser authenticatedUser = authenticatedUserProvider.get();
-                authenticatedUser.init(credentials);
-                return authenticatedUser;
-            }
+        // No RadiusPacket is returned, we've encountered an error.
+        if (radPack == null) {
+            logger.debug("Nothing in the RADIUS packet.");
+            throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
+        }
 
-            // Authentication failed.
-            else {
-                logger.warn("RADIUS Challenge/Response authentication failed.");
-                logger.debug("Received something other than AccessAccept packet from the RADIUS server.");
-                throw new GuacamoleInvalidCredentialsException("Authentication failed.", CredentialsInfo.USERNAME_PASSWORD);
-            }
+        // Received AccessReject packet, login is denied.
+        else if (radPack instanceof AccessReject) {
+            logger.debug("Login has been rejected by RADIUS server.");
+            throw new GuacamoleInvalidCredentialsException("Authentication failed.", CredentialsInfo.USERNAME_PASSWORD);
         }
+
+        // Received AccessAccept, authentication has succeeded
+        else if (radPack instanceof AccessAccept) {
+            AuthenticatedUser authenticatedUser = authenticatedUserProvider.get();
+            authenticatedUser.init(credentials);
+            return authenticatedUser;
+        }
+
+        // Received AccessChallenge packet, more credentials required to complete authentication
+        else if (radPack instanceof AccessChallenge) {
+            CredentialsInfo expectedCredentials = getRadiusChallenge(radPack);
+
+            if (expectedCredentials == null)
+                throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
+
+            throw new GuacamoleInsufficientCredentialsException("LOGIN.INFO_RADIUS_ADDL_REQUIRED", expectedCredentials);
+        }
+
+        // Something unanticipated happened, so panic and go back to login.
+        else {
+            logger.error("Unexpected failure authenticating with RADIUS server.");
+            throw new GuacamoleInvalidCredentialsException("Unknown error trying to authenticate.", CredentialsInfo.USERNAME_PASSWORD);
+        }
+
     }
 
 }


[29/50] guacamole-client git commit: GUACAMOLE-197: More style tweaks, update comments, fix typos

Posted by mj...@apache.org.
GUACAMOLE-197: More style tweaks, update comments, fix typos


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

Branch: refs/heads/master
Commit: f0b36ca5b104d7d65cd36f95ac4d2640fba9f07a
Parents: e341e48
Author: Nick Couchman <vn...@apache.org>
Authored: Fri Jul 14 21:52:29 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../radius/AuthenticationProviderService.java   | 23 ++++++++------------
 1 file changed, 9 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/f0b36ca5/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index fc4a6bf..2c3ace9 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -141,19 +141,16 @@ public class AuthenticationProviderService {
         if (credentials.getPassword() == null || credentials.getPassword().isEmpty())
             return null;
 
-        // Grab the HTTP Request from the credentials object
+        // Grab HTTP request object and a response to a challenge.
         HttpServletRequest request = credentials.getRequest();
-
-        // Try to get parameters to see if this is a post-challenge attempt
         String challengeResponse = request.getParameter(RadiusChallengeResponseField.PARAMETER_NAME);
 
         // RadiusPacket object to store response from server.
         RadiusPacket radPack;
 
-        // We do not have a challenge response, proceed with username/password authentication.
+        // No challenge response, proceed with username/password authentication.
         if (challengeResponse == null) {
 
-            // Attempt RADIUS authentication with username/password.
             try {
                 radPack = radiusService.authenticate(credentials.getUsername(),
                                                 credentials.getPassword());
@@ -164,20 +161,19 @@ public class AuthenticationProviderService {
                 throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
             }
 
-            // If no RadiusPacket is returned, we've encountered an error.
+            // No RadiusPacket is returned, we've encountered an error.
             if (radPack == null) {
                 logger.debug("Nothing in the RADIUS packet.");
                 throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
             }
 
-            // If we get back an AccessReject packet, login is denied.
+            // Received AccessReject packet, login is denied.
             else if (radPack instanceof AccessReject) {
                 logger.debug("Login has been rejected by RADIUS server.");
                 throw new GuacamoleInvalidCredentialsException("Authentication failed.", CredentialsInfo.USERNAME_PASSWORD);
             }
 
-            // If we receive an AccessChallenge package, the server needs more information -
-            // We create a new form/field with the challenge message.
+            // Received AccessChallenge packet, more credentials required to complete authentication
             else if (radPack instanceof AccessChallenge) {
                 CredentialsInfo expectedCredentials = getRadiusChallenge(radPack);
 
@@ -187,7 +183,7 @@ public class AuthenticationProviderService {
                 throw new GuacamoleInsufficientCredentialsException("LOGIN.INFO_RADIUS_ADDL_REQUIRED", expectedCredentials);
             }
 
-            // If we receive AccessAccept, authentication has succeeded
+            // Received AccessAccept, authentication has succeeded
             else if (radPack instanceof AccessAccept) {
                 try {
                     AuthenticatedUser authenticatedUser = authenticatedUserProvider.get();
@@ -206,10 +202,9 @@ public class AuthenticationProviderService {
             }
         }
 
-        // The user responded to the challenge, send that back to the server
+        // This is a response to a challenge, so authenticate with that response
         else {
 
-            // Attempt to authenticate with response to challenge.
             try {
                 radPack = radiusService.authenticate(credentials.getUsername(),
                                                      request.getParameter(RadiusStateField.PARAMETER_NAME),
@@ -224,14 +219,14 @@ public class AuthenticationProviderService {
                 radiusService.disconnect();
             }
 
-            // Check the server response, see if we get accepted or not
+            // Received AccessAccept, authentication succeeded.
             if (radPack instanceof AccessAccept) {
                 AuthenticatedUser authenticatedUser = authenticatedUserProvider.get();
                 authenticatedUser.init(credentials);
                 return authenticatedUser;
             }
 
-            // Authentication failed
+            // Authentication failed.
             else {
                 logger.warn("RADIUS Challenge/Response authentication failed.");
                 logger.debug("Received something other than AccessAccept packet from the RADIUS server.");


[39/50] guacamole-client git commit: GUACAMOLE-197: Move variable declarations for TLS into correct context.

Posted by mj...@apache.org.
GUACAMOLE-197: Move variable declarations for TLS into correct context.


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

Branch: refs/heads/master
Commit: 60ddc82aff7d6447dc4708d76dd83860aa1951f0
Parents: 249ea07
Author: Nick Couchman <vn...@apache.org>
Authored: Sun Jul 16 15:32:11 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../auth/radius/RadiusConnectionService.java      | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/60ddc82a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index 9dd39a3..fa9a0b6 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -117,15 +117,6 @@ public class RadiusConnectionService {
             return null;
         }
 
-        // Pull configuration parameters from guacamole.properties
-        LocalEnvironment guacEnv = new LocalEnvironment();
-        String guacHome = guacEnv.getGuacamoleHome().getAbsolutePath();
-        String caFile = confService.getRadiusCAFile();
-        String caPassword = confService.getRadiusCAPassword();
-        String keyFile = confService.getRadiusKeyFile();
-        String keyPassword = confService.getRadiusKeyPassword();
-        String innerProtocol = confService.getRadiusEAPTTLSInnerProtocol();
-            
         RadiusAuthenticator radAuth = radiusClient.getAuthProtocol(confService.getRadiusAuthProtocol());
         if (radAuth == null)
             throw new GuacamoleException("Could not get a valid RadiusAuthenticator for specified protocol: " + confService.getRadiusAuthProtocol());
@@ -135,6 +126,15 @@ public class RadiusConnectionService {
             radAuth instanceof EAPTLSAuthenticator || 
             radAuth instanceof EAPTTLSAuthenticator) {
 
+            // Pull TLS configuration parameters from guacamole.properties
+            LocalEnvironment guacEnv = new LocalEnvironment();
+            String guacHome = guacEnv.getGuacamoleHome();
+            String caFile = confService.getRadiusCAFile();
+            String caPassword = confService.getRadiusCAPassword();
+            String keyFile = confService.getRadiusKeyFile();
+            String keyPassword = confService.getRadiusKeyPassword();
+            String innerProtocol = confService.getRadiusEAPTTLSInnerProtocol();
+
             if (caFile != null) {
                 ((EAPTLSAuthenticator)radAuth).setCaFile((new File(guacHome, caFile)).toString());
                 ((EAPTLSAuthenticator)radAuth).setCaFileType(confService.getRadiusCAType());


[31/50] guacamole-client git commit: GUACAMOLE-197: Fix LICENSE order and style.

Posted by mj...@apache.org.
GUACAMOLE-197: Fix LICENSE order and style.


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

Branch: refs/heads/master
Commit: aa556763b201a2327b50ec977a7fb9f30da12d15
Parents: f0b36ca
Author: Nick Couchman <vn...@apache.org>
Authored: Fri Jul 14 21:55:39 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 .../guacamole-auth-radius/src/licenses/LICENSE    | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/aa556763/extensions/guacamole-auth-radius/src/licenses/LICENSE
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/licenses/LICENSE b/extensions/guacamole-auth-radius/src/licenses/LICENSE
index fb195e1..7ad231d 100644
--- a/extensions/guacamole-auth-radius/src/licenses/LICENSE
+++ b/extensions/guacamole-auth-radius/src/licenses/LICENSE
@@ -220,14 +220,6 @@ AOP Alliance (http://aopalliance.sourceforge.net/)
         Public Domain (bundled/aopalliance-1.0/LICENSE)
 
 
-JRadius (https://github.com/coova/jradius)
-------------------------------------------
-
-    Version: 1.1.5
-    From: 'Coova Technologies, LLC' (https://coova.github.io)
-    License(s):
-        LGPL-2.1 (bundled/jradius-1.1.5/LICENSE)
-
 BouncyCastle Crypto (https://www.bouncycastle.org/java.html)
 ------------------------------------------------------------
 
@@ -236,6 +228,7 @@ BouncyCastle Crypto (https://www.bouncycastle.org/java.html)
     License(s):
         The Bouncy Castle License (bundled/bouncycastle-1.44/LICENSE
 
+
 Google Guice (https://github.com/google/guice)
 ----------------------------------------------
 
@@ -245,6 +238,15 @@ Google Guice (https://github.com/google/guice)
         Apache v2.0 (bundled/guice-3.0/COPYING)
 
 
+JRadius (https://github.com/coova/jradius)
+------------------------------------------
+
+    Version: 1.1.5
+    From: 'Coova Technologies, LLC' (https://coova.github.io)
+    License(s):
+        LGPL-2.1 (bundled/jradius-1.1.5/LICENSE)
+
+
 JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/)
 ----------------------------------------------------------------------------
 


[23/50] guacamole-client git commit: GUACAMOLE-197: Remove last traces of incubating.

Posted by mj...@apache.org.
GUACAMOLE-197: Remove last traces of incubating.


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

Branch: refs/heads/master
Commit: aba9d839565f78f55d419a68ea1fc57992bac443
Parents: adc574f
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Jan 15 10:27:16 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:11 2018 -0500

----------------------------------------------------------------------
 extensions/guacamole-auth-radius/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/aba9d839/extensions/guacamole-auth-radius/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/pom.xml b/extensions/guacamole-auth-radius/pom.xml
index f1c26f1..9d27a10 100644
--- a/extensions/guacamole-auth-radius/pom.xml
+++ b/extensions/guacamole-auth-radius/pom.xml
@@ -28,7 +28,7 @@
     <packaging>jar</packaging>
     <version>0.9.14</version>
     <name>guacamole-auth-radius</name>
-    <url>http://guacamole.incubator.apache.org/</url>
+    <url>http://guacamole.apache.org/</url>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>


[19/50] guacamole-client git commit: GUACAMOLE-197: Remove unnecessary return statements.

Posted by mj...@apache.org.
GUACAMOLE-197: Remove unnecessary return statements.


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

Branch: refs/heads/master
Commit: 3976af7b11fa81e04fb7bade11a73814ef54e87f
Parents: 12ae122
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 09:27:57 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../org/apache/guacamole/auth/radius/RadiusConnectionService.java | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/3976af7b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index a2f984b..e36b8bd 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -88,17 +88,14 @@ public class RadiusConnectionService {
         catch (GuacamoleException e) {
             logger.error("Unable to initialize RADIUS client: {}", e.getMessage());
             logger.debug("Failed to init RADIUS client.", e);
-            return;
         }
         catch (UnknownHostException e) {
             logger.error("Unable to resolve host: {}", e.getMessage());
             logger.debug("Failed to resolve host.", e);
-            return;
         }
         catch (IOException e) {
             logger.error("Unable to communicate with host: {}", e.getMessage());
             logger.debug("Failed to communicate with host.", e);
-            return;
         }
 
     }


[16/50] guacamole-client git commit: GUACAMOLE-197: Fix comments for function that sets up RadiusClient.

Posted by mj...@apache.org.
GUACAMOLE-197: Fix comments for function that sets up RadiusClient.


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

Branch: refs/heads/master
Commit: 12ae1223148351608d1b503a3cc7021da8daef94
Parents: 8d83ba2
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 09:26:51 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../org/apache/guacamole/auth/radius/RadiusConnectionService.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/12ae1223/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index e8a30ff..a2f984b 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -68,7 +68,7 @@ public class RadiusConnectionService {
     private RadiusClient radiusClient;
 
     /**
-     * Creates a new instance of RadiusConnection, configured with parameters
+     * Creates a new instance of RadiusClient, configured with parameters
      * from guacamole.properties.
      *
      * @throws GuacamoleException


[20/50] guacamole-client git commit: GUACAMOLE-197: Allow setupRadiusAuthenticator to throw GuacamoleException rather than hiding it.

Posted by mj...@apache.org.
GUACAMOLE-197: Allow setupRadiusAuthenticator to throw GuacamoleException rather than hiding it.


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

Branch: refs/heads/master
Commit: a49dfeeeeb8acd950d2c7b3fe056453652259d75
Parents: 3976af7
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 09:41:18 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../auth/radius/RadiusConnectionService.java    | 32 ++++++++------------
 1 file changed, 12 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/a49dfeee/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index e36b8bd..64a0257 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -110,7 +110,7 @@ public class RadiusConnectionService {
      *     configuration fails.
      *
      */
-    private RadiusAuthenticator setupRadiusAuthenticator() {
+    private RadiusAuthenticator setupRadiusAuthenticator() throws GuacamoleException {
 
         // If we don't have a radiusClient object, yet, don't go any further.
         if (radiusClient == null) {
@@ -132,26 +132,18 @@ public class RadiusConnectionService {
         String basePath;
 
         // Pull configuration parameters from guacamole.properties
-        try {
-            guacEnv = new LocalEnvironment();
-            basePath = guacEnv.getGuacamoleHome().getAbsolutePath() + '/';
-            radAuthName = confService.getRadiusAuthProtocol();
-            caFile = confService.getRadiusCAFile();
-            caPassword = confService.getRadiusCAPassword();
-            caType = confService.getRadiusCAType();
-            keyFile = confService.getRadiusKeyFile();
-            keyPassword = confService.getRadiusKeyPassword();
-            keyType = confService.getRadiusKeyType();
-            trustAll = confService.getRadiusTrustAll();
-            innerProtocol = confService.getRadiusEAPTTLSInnerProtocol();
+        guacEnv = new LocalEnvironment();
+        basePath = guacEnv.getGuacamoleHome().getAbsolutePath() + '/';
+        radAuthName = confService.getRadiusAuthProtocol();
+        caFile = confService.getRadiusCAFile();
+        caPassword = confService.getRadiusCAPassword();
+        caType = confService.getRadiusCAType();
+        keyFile = confService.getRadiusKeyFile();
+        keyPassword = confService.getRadiusKeyPassword();
+        keyType = confService.getRadiusKeyType();
+        trustAll = confService.getRadiusTrustAll();
+        innerProtocol = confService.getRadiusEAPTTLSInnerProtocol();
             
-        }
-        catch (GuacamoleException e) {
-            logger.error("Error retrieving configuration.");
-            logger.debug("Error getting config parameters from file.");
-            return null;
-        }
-
         RadiusAuthenticator radAuth = radiusClient.getAuthProtocol(radAuthName);
         if (radAuth == null)
             return null;


[43/50] guacamole-client git commit: GUACAMOLE-197: Clean up imports in various classes.

Posted by mj...@apache.org.
GUACAMOLE-197: Clean up imports in various classes.


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

Branch: refs/heads/master
Commit: 440a74e71a272adfe615a3eee87f5c41fd50b277
Parents: aba9d83
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Jan 15 10:42:46 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:12 2018 -0500

----------------------------------------------------------------------
 .../auth/radius/AuthenticationProviderService.java        | 10 ----------
 .../guacamole/auth/radius/ConfigurationService.java       |  2 --
 .../guacamole/auth/radius/RadiusConnectionService.java    |  9 +++++----
 .../guacamole/auth/radius/form/RadiusStateField.java      |  3 ---
 4 files changed, 5 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/440a74e7/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index eafdf83..ae9f6bf 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -36,14 +36,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import net.jradius.dictionary.Attr_State;
 import net.jradius.dictionary.Attr_ReplyMessage;
-import net.jradius.exception.UnknownAttributeException;
 import net.jradius.packet.RadiusPacket;
 import net.jradius.packet.AccessAccept;
 import net.jradius.packet.AccessChallenge;
 import net.jradius.packet.AccessReject;
-import net.jradius.packet.AccessRequest;
-import net.jradius.packet.AccessResponse;
-import net.jradius.packet.attribute.AttributeList;
 import net.jradius.packet.attribute.RadiusAttribute;
 
 /**
@@ -64,12 +60,6 @@ public class AuthenticationProviderService {
     private RadiusConnectionService radiusService;
 
     /**
-     * Service for retrieving RADIUS server configuration information.
-     */
-    @Inject
-    private ConfigurationService confService;
-
-    /**
      * Provider for AuthenticatedUser objects.
      */
     @Inject

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/440a74e7/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
index 0cfe26b..73241ea 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
@@ -20,8 +20,6 @@
 package org.apache.guacamole.auth.radius;
 
 import com.google.inject.Inject;
-import java.util.Collections;
-import java.util.List;
 import org.apache.guacamole.GuacamoleException;
 import org.apache.guacamole.environment.Environment;
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/440a74e7/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index 345a03d..52e735e 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -22,22 +22,23 @@ package org.apache.guacamole.auth.radius;
 import com.google.inject.Inject;
 import java.io.File;
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.security.NoSuchAlgorithmException;
 import org.apache.guacamole.GuacamoleException;
-import org.apache.guacamole.GuacamoleUnsupportedException;
 import org.apache.guacamole.environment.LocalEnvironment;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import net.jradius.client.RadiusClient;
+import net.jradius.dictionary.Attr_CleartextPassword;
+import net.jradius.dictionary.Attr_ReplyMessage;
+import net.jradius.dictionary.Attr_State;
+import net.jradius.dictionary.Attr_UserName;
+import net.jradius.dictionary.Attr_UserPassword;
 import net.jradius.exception.RadiusException;
 import net.jradius.packet.RadiusPacket;
 import net.jradius.packet.AccessRequest;
-import net.jradius.dictionary.*;
 import net.jradius.packet.attribute.AttributeList;
-import net.jradius.packet.attribute.RadiusAttribute;
 import net.jradius.client.auth.EAPTLSAuthenticator;
 import net.jradius.client.auth.EAPTTLSAuthenticator;
 import net.jradius.client.auth.RadiusAuthenticator;

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/440a74e7/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
index 51d57fe..c7c06c4 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
@@ -20,9 +20,6 @@
 package org.apache.guacamole.auth.radius.form;
 
 import org.apache.guacamole.form.Field;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * The invisible field that stores the state of the RADIUS


[15/50] guacamole-client git commit: GUACAMOLE-197: Consider challengeResponse empty value an acceptable response.

Posted by mj...@apache.org.
GUACAMOLE-197: Consider challengeResponse empty value an acceptable response.


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

Branch: refs/heads/master
Commit: 8be8626578862eccd9fac53f0a1b7e4e20c1d6e2
Parents: 564b968
Author: Nick Couchman <ni...@yahoo.com>
Authored: Tue Apr 11 09:18:17 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 .../guacamole/auth/radius/AuthenticationProviderService.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/8be86265/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
index bb2e203..2b4f981 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java
@@ -111,7 +111,7 @@ public class AuthenticationProviderService {
         String challengeResponse = request.getParameter(RadiusChallengeResponseField.PARAMETER_NAME);
 
         // We do not have a challenge response, so we proceed normally
-        if (challengeResponse == null || challengeResponse.isEmpty()) {
+        if (challengeResponse == null) {
 
             // Initialize Radius Packet and try to authenticate
             try {


[42/50] guacamole-client git commit: GUACAMOLE-197: Finish cleaning unused imports.

Posted by mj...@apache.org.
GUACAMOLE-197: Finish cleaning unused imports.


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

Branch: refs/heads/master
Commit: 8cf66bc3df52c82fba32dd91765dd6662746441a
Parents: 440a74e
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Jan 15 10:43:55 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:12 2018 -0500

----------------------------------------------------------------------
 .../guacamole/auth/radius/form/RadiusChallengeResponseField.java  | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/8cf66bc3/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusChallengeResponseField.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusChallengeResponseField.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusChallengeResponseField.java
index 0b8944b..7f407aa 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusChallengeResponseField.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusChallengeResponseField.java
@@ -20,9 +20,6 @@
 package org.apache.guacamole.auth.radius.form;
 
 import org.apache.guacamole.form.Field;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * A form used to prompt the user for additional information when


[46/50] guacamole-client git commit: GUACAMOLE-197: Clean up comments and configured parameters.

Posted by mj...@apache.org.
GUACAMOLE-197: Clean up comments and configured parameters.


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

Branch: refs/heads/master
Commit: ab90606c8197407849f205dd0f688d8b6f747a89
Parents: 8cf66bc
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Jan 15 15:02:37 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:12 2018 -0500

----------------------------------------------------------------------
 .../auth/radius/ConfigurationService.java       | 54 +++++++++++-------
 .../auth/radius/RadiusConnectionService.java    | 59 +++++++++++++++-----
 .../auth/radius/RadiusGuacamoleProperties.java  |  8 +--
 .../form/RadiusChallengeResponseField.java      | 21 ++++---
 .../auth/radius/form/RadiusStateField.java      | 11 +++-
 .../controllers/radiusResponseController.js     |  2 +-
 6 files changed, 108 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ab90606c/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
index 73241ea..c903a38 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java
@@ -53,8 +53,9 @@ public class ConfigurationService {
     }
 
     /**
-     * Returns the authentication port of the RADIUS server configured with
-     * guacamole.properties.
+     * Returns the UDP port that will be used to communicate authentication
+     * and authorization information to the RADIUS server, as configured in
+     * guacamole.properties.  By default this will be 1812.
      *
      * @return
      *     The authentication port of the RADIUS server, as configured with
@@ -71,8 +72,9 @@ public class ConfigurationService {
     }
 
     /**
-     * Returns the accounting port of the RADIUS server configured with
-     * guacamole.properties. 
+     * Returns the UDP port that will be used to communicate accounting
+     * information to the RADIUS server, as configured in
+     * guacamole.properties.  The default is 1813.
      *
      * @return
      *     The accouting port of the RADIUS server, as configured with
@@ -89,8 +91,9 @@ public class ConfigurationService {
     }
 
     /**
-     * Returns the shared secret of the RADIUS server configured with
-     * guacamole.properties. 
+     * Returns the shared secret used to communicate with the RADIUS server,
+     * as configured in guacamole.properties.  This must match the value
+     * in the RADIUS server configuration.
      *
      * @return
      *     The shared secret of the RADIUS server, as configured with
@@ -106,8 +109,11 @@ public class ConfigurationService {
     }
 
     /**
-     * Returns the authentication protocol of the RADIUS server
-     * from guacamole.properties.
+     * Returns the authentication protocol Guacamole should use when
+     * communicating with the RADIUS server, as configured in
+     * guacamole.properties.  This must match the configuration
+     * of the RADIUS server, so that the RADIUS server and Guacamole
+     * client are "speaking the same language."
      *
      * @return
      *     The authentication protocol of the RADIUS server, 
@@ -123,8 +129,8 @@ public class ConfigurationService {
     }
 
     /**
-     * Returns the number of retries for connecting to the RADIUS server
-     * from guacamole.properties.
+     * Returns the maximum number of retries for connecting to the RADIUS server
+     * from guacamole.properties.  The default number of retries is 5.
      *
      * @return
      *     The number of retries for connection to the RADIUS server,
@@ -133,19 +139,19 @@ public class ConfigurationService {
      * @throws GuacamoleException
      *     If guacamole.properties cannot be parsed.
      */
-    public int getRadiusRetries() throws GuacamoleException {
+    public int getRadiusMaxRetries() throws GuacamoleException {
         return environment.getProperty(
-            RadiusGuacamoleProperties.RADIUS_RETRIES,
+            RadiusGuacamoleProperties.RADIUS_MAX_RETRIES,
             5
         );
     }
 
     /**
-     * Returns the timeout for connecting to the RADIUS server
-     * from guacamole.properties.
+     * Returns the timeout, in seconds, for connecting to the RADIUS server
+     * from guacamole.properties.  The default timeout is 60 seconds.
      *
      * @return
-     *     The timeout for connection to the RADIUS server,
+     *     The timeout, in seconds, for connection to the RADIUS server,
      *     from guacamole.properties.
      *
      * @throws GuacamoleException
@@ -159,8 +165,9 @@ public class ConfigurationService {
     }
 
     /**
-     * Returns the CA file for validating certificates for
-     * encrypted connections as specified in guacamole.properties
+     * Returns the CA file for validating certificates for encrypted
+     * connections to the RADIUS server, as configured in
+     * guacamole.properties.
      *
      * @return
      *     The file name for the CA file for validating
@@ -178,7 +185,8 @@ public class ConfigurationService {
     /**
      * Returns the key file for the client for creating encrypted
      * connections to RADIUS servers as specified in
-     * guacamole.properties.
+     * guacamole.properties.  By default a file called radius.pem
+     * is used.
      *
      * @return
      *     The file name for the client certificate/key pair
@@ -213,7 +221,8 @@ public class ConfigurationService {
     /**
      * Returns the type of store that the CA file represents
      * so that it can be correctly processed by the RADIUS
-     * library, as configured in guacamole.properties.
+     * library, as configured in guacamole.properties.  By
+     * default the pem type is used.
      *
      * @return
      *     The type of store that the CA file is encoded
@@ -248,7 +257,8 @@ public class ConfigurationService {
     /**
      * Returns the type of store that the key file represents
      * so that it can be correctly processed by the RADIUS
-     * library, as configured in guacamole.properties.
+     * library, as configured in guacamole.properties.  By
+     * default the pem type is used.
      *
      * @return
      *     The type of store that the key file is encoded
@@ -268,7 +278,9 @@ public class ConfigurationService {
      * Returns the boolean value of whether or not the
      * RADIUS library should trust all server certificates
      * or should validate them against known CA certificates,
-     * as configured in guacamole.properties.
+     * as configured in guacamole.properties.  By default
+     * this is false, indicating that server certificates
+     * must be validated against a known good CA.
      *
      * @return
      *     True if the RADIUS client should trust all

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ab90606c/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
index 52e735e..c73bf66 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
@@ -26,6 +26,7 @@ import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.security.NoSuchAlgorithmException;
 import org.apache.guacamole.GuacamoleException;
+import org.apache.guacamole.GuacamoleServerException;
 import org.apache.guacamole.environment.LocalEnvironment;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -68,11 +69,15 @@ public class RadiusConnectionService {
      * Creates a new instance of RadiusClient, configured with parameters
      * from guacamole.properties.
      *
+     * @return
+     *     A RadiusClient instance, configured with server, shared secret,
+     *     ports, and timeout, as configured in guacamole.properties.
+     *
      * @throws GuacamoleException
      *     If an error occurs while parsing guacamole.properties, or if the
      *     configuration of RadiusClient fails.
      */
-    private RadiusClient createRadiusConnection() {
+    private RadiusClient createRadiusConnection() throws GuacamoleException {
 
         // Create the RADIUS client with the configuration parameters
         try {
@@ -82,31 +87,34 @@ public class RadiusConnectionService {
                                             confService.getRadiusAcctPort(),
                                             confService.getRadiusTimeout());
         }
-        catch (GuacamoleException e) {
-            logger.error("Unable to initialize RADIUS client: {}", e.getMessage());
-            logger.debug("Failed to init RADIUS client.", e);
-        }
         catch (UnknownHostException e) {
-            logger.error("Unable to resolve host: {}", e.getMessage());
             logger.debug("Failed to resolve host.", e);
+            throw new GuacamoleServerException("Unable to resolve RADIUS server host.", e);
         }
         catch (IOException e) {
-            logger.error("Unable to communicate with host: {}", e.getMessage());
             logger.debug("Failed to communicate with host.", e);
+            throw new GuacamoleServerException("Failed to communicate with RADIUS server.", e);
         }
 
-        return null;
-
     }
 
     /**
      * Creates a new instance of RadiusAuthentictor, configured with
      * parameters specified within guacamole.properties.
      *
+     * @param radiusClient
+     *     A RadiusClient instance that has been initialized to
+     *     communicate with a RADIUS server.
+     *
      * @return
      *     A new RadiusAuthenticator instance which has been configured
      *     with parameters from guacamole.properties, or null if
      *     configuration fails.
+     *
+     * @throws GuacamoleException
+     *     If the configuration cannot be read or the inner protocol is
+     *     not configured when the client is set up for a tunneled
+     *     RADIUS connection.
      */
     private RadiusAuthenticator setupRadiusAuthenticator(RadiusClient radiusClient)
             throws GuacamoleException {
@@ -168,10 +176,13 @@ public class RadiusConnectionService {
      *
      * @param username
      *     The username for the authentication
+     *
+     * @param secret
+     *     The secret, usually a password or challenge response, to send
+     *     to authenticate to the RADIUS server.
+     *
      * @param state
      *     The previous state of the RADIUS connection
-     * @param response
-     *     The response to the RADIUS challenge
      *
      * @return
      *     A RadiusPacket with the response of the server.
@@ -228,12 +239,12 @@ public class RadiusConnectionService {
 
             radAuth.setupRequest(radiusClient, radAcc);
             radAuth.processRequest(radAcc);
-            RadiusResponse reply = radiusClient.sendReceive(radAcc, confService.getRadiusRetries());
+            RadiusResponse reply = radiusClient.sendReceive(radAcc, confService.getRadiusMaxRetries());
 
             // We receive a Challenge not asking for user input, so silently process the challenge
             while((reply instanceof AccessChallenge) && (reply.findAttribute(Attr_ReplyMessage.TYPE) == null)) {
                 radAuth.processChallenge(radAcc, reply);
-                reply = radiusClient.sendReceive(radAcc, confService.getRadiusRetries());
+                reply = radiusClient.sendReceive(radAcc, confService.getRadiusMaxRetries());
             }
             return reply;
         }
@@ -252,6 +263,28 @@ public class RadiusConnectionService {
         }
     }
 
+    /**
+     * Send a challenge response to the RADIUS server by validating the input and
+     * then sending it along to the authenticate method.
+     *
+     * @param username
+     *     The username to send to the RADIUS server for authentication.
+     *
+     * @param response
+     *     The response phrase to send to the RADIUS server in response to the
+     *     challenge previously provided.
+     *
+     * @param state
+     *     The state data provided by the RADIUS server in order to continue
+     *     the RADIUS conversation.
+     *
+     * @return
+     *     A RadiusPacket containing the server's response to the authentication
+     *     attempt.
+     *
+     * @throws GuacamoleException
+     *     If an error is encountered trying to talk to the RADIUS server.
+     */
     public RadiusPacket sendChallengeResponse(String username, String response, String state)
             throws GuacamoleException {
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ab90606c/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
index cee7e0e..49fa1b6 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusGuacamoleProperties.java
@@ -88,17 +88,17 @@ public class RadiusGuacamoleProperties {
     };
 
     /**
-     * The number of retries when attempting a RADIUS packet transaction.
+     * The maximum number of retries when attempting a RADIUS packet transaction.
      */
-    public static final IntegerGuacamoleProperty RADIUS_RETRIES = new IntegerGuacamoleProperty() {
+    public static final IntegerGuacamoleProperty RADIUS_MAX_RETRIES = new IntegerGuacamoleProperty() {
 
         @Override
-        public String getName() { return "radius-retries"; }
+        public String getName() { return "radius-max-retries"; }
 
     };
 
     /**
-     * The network timeout when attempting a RADIUS packet transaction.
+     * The network timeout, in seconds, when attempting a RADIUS packet transaction.
      */
     public static final IntegerGuacamoleProperty RADIUS_TIMEOUT = new IntegerGuacamoleProperty() {
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ab90606c/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusChallengeResponseField.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusChallengeResponseField.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusChallengeResponseField.java
index 7f407aa..32ceb90 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusChallengeResponseField.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusChallengeResponseField.java
@@ -41,21 +41,28 @@ public class RadiusChallengeResponseField extends Field {
     /**
      * The message the RADIUS server sent back in the challenge.
      */
-    private final String replyMsg;
+    private final String challenge;
 
     /**
-     * Initialize the field with the reply message and the state.
+     * Initialize the field with the challenge sent back by the RADIUS server.
+     *
+     * @param challenge
+     *     The challenge message sent back by the RADIUS server.
      */
-    public RadiusChallengeResponseField(String replyMsg) {
+    public RadiusChallengeResponseField(String challenge) {
         super(PARAMETER_NAME, RADIUS_FIELD_TYPE);
-        this.replyMsg = replyMsg;
+        this.challenge = challenge;
 
     }
 
     /**
-     * Get the value of the replyMsg field.
+     * Get the challenge sent by the RADIUS server.
+     *
+     * @return
+     *     A String that indicates the challenge returned
+     *     by the RADIUS server.
      */
-    public String getReplyMsg() {
-        return replyMsg;
+    public String getChallenge() {
+        return challenge;
     }
 }

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ab90606c/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
index c7c06c4..201df2c 100644
--- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
+++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusStateField.java
@@ -45,7 +45,10 @@ public class RadiusStateField extends Field {
     private final String radiusState;
 
     /**
-     * Initialize the field with the reply message and the state.
+     * Initialize the field with the state returned by the RADIUS server.
+     *
+     * @param radiusState
+     *     The state returned by the RADIUS server.
      */
     public RadiusStateField(String radiusState) {
         super(PARAMETER_NAME, RADIUS_FIELD_TYPE);
@@ -53,6 +56,12 @@ public class RadiusStateField extends Field {
 
     }
 
+    /**
+     * Get the state provided by the RADIUS server.
+     *
+     * @return
+     *     The state provided by the RADIUS server.
+     */
     public String getRadiusState() {
         return radiusState;
     }

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ab90606c/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js b/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
index ddc7e34..4782b20 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
+++ b/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js
@@ -25,6 +25,6 @@ angular.module('guacRadius').controller('radiusResponseController', ['$scope', '
         function radiusResponseController($scope, $injector) {
 
     // Populate the reply message field
-    $scope.radiusPlaceholder = $scope.field.replyMsg;
+    $scope.radiusPlaceholder = $scope.field.challenge;
 
 }]);


[06/50] guacamole-client git commit: GUACAMOLE-197: Make a seprate build profile for LGPL dependencies and add this extension to that list; also exclude all extensions from top-level RAT check.

Posted by mj...@apache.org.
GUACAMOLE-197: Make a seprate build profile for LGPL dependencies and add this extension to that list; also exclude all extensions from top-level RAT check.


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

Branch: refs/heads/master
Commit: f4a6cf85ed84d9305397447dfde4cfab1815b8b5
Parents: cf884f3
Author: Nick Couchman <ni...@yahoo.com>
Authored: Fri Apr 21 22:25:48 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:10 2018 -0500

----------------------------------------------------------------------
 pom.xml | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/f4a6cf85/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b2203a9..0144d5a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,7 +56,6 @@
         <module>extensions/guacamole-auth-ldap</module>
         <module>extensions/guacamole-auth-noauth</module>
         <module>extensions/guacamole-auth-openid</module>
-        <module>extensions/guacamole-auth-radius</module>
 
         <!-- Example web applications using the Guacamole APIs -->
         <module>doc/guacamole-example</module>
@@ -64,6 +63,15 @@
 
     </modules>
 
+    <profiles>
+        <profile>
+            <id>lgpl-extensions</id>
+            <modules>
+                <module>extensions/guacamole-auth-radius</module>
+            </modules>
+        </profile>
+    </profiles>
+
     <build>
         <plugins>
 
@@ -106,6 +114,7 @@
                         <exclude>.dockerignore</exclude>
                         <exclude>CONTRIBUTING</exclude>
                         <exclude>**/README.md</exclude>
+                        <exclude>extensions/**/*</exclude>
                     </excludes>
                 </configuration>