From 85a7fa3b4668394be2990aa8078100524b38adc3 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Fri, 9 Aug 2019 21:59:34 -0400 Subject: [PATCH 1/5] GUACAMOLE-769: Polish the RADIUS challenge box. --- .../radius/AuthenticationProviderService.java | 31 +++++--- .../radius/form/GuacamoleRadiusChallenge.java | 77 +++++++++++++++++++ .../src/main/resources/config/radiusConfig.js | 1 - .../controllers/radiusResponseController.js | 30 -------- .../templates/radiusResponseField.html | 7 +- .../src/main/resources/translations/en.json | 3 +- 6 files changed, 104 insertions(+), 45 deletions(-) create mode 100644 extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/GuacamoleRadiusChallenge.java delete mode 100644 extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js 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 4fd37f18a..d44205b8d 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 @@ -25,6 +25,7 @@ import com.google.inject.Provider; import java.util.Arrays; import javax.servlet.http.HttpServletRequest; import org.apache.guacamole.auth.radius.user.AuthenticatedUser; +import org.apache.guacamole.auth.radius.form.GuacamoleRadiusChallenge; import org.apache.guacamole.auth.radius.form.RadiusChallengeResponseField; import org.apache.guacamole.auth.radius.form.RadiusStateField; import org.apache.guacamole.GuacamoleException; @@ -67,18 +68,20 @@ public class AuthenticationProviderService { private Provider authenticatedUserProvider; /** - * Returns the expected credentials from a RADIUS challenge. + * Returns an object containing the challenge message and 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. + * A GuacamoleRadiusChallenge object that contains the challenge message + * sent by the RADIUS server and the expected credentials that should + * be requested of the user in order to continue authentication. One + * of the expected credentials *must* be the RADIUS state. */ - private CredentialsInfo getRadiusChallenge(RadiusPacket challengePacket) { + private GuacamoleRadiusChallenge 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); @@ -97,13 +100,17 @@ public class AuthenticationProviderService { } // We have the required attributes - convert to strings and then generate the additional login box/field - String replyMsg = replyAttr.toString(); + logger.debug("Received challenge: {}", replyAttr.toString()); + String replyMsg = replyAttr.toString().split(" = ", 2)[1]; String radiusState = BaseEncoding.base16().encode(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)); + // Return the GuacamoleRadiusChallenge object that has the state + // and the expected response. + return new GuacamoleRadiusChallenge(replyMsg, + new CredentialsInfo(Arrays.asList(radiusResponseField, + radiusStateField))); } /** @@ -200,12 +207,14 @@ public class AuthenticationProviderService { // Received AccessChallenge packet, more credentials required to complete authentication else if (radPack instanceof AccessChallenge) { - CredentialsInfo expectedCredentials = getRadiusChallenge(radPack); + GuacamoleRadiusChallenge challenge = getRadiusChallenge(radPack); - if (expectedCredentials == null) + if (challenge == null) throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD); - throw new GuacamoleInsufficientCredentialsException("LOGIN.INFO_RADIUS_ADDL_REQUIRED", expectedCredentials); + throw new GuacamoleInsufficientCredentialsException( + challenge.getChallengeText(), + challenge.getExpectedCredentials()); } // Something unanticipated happened, so panic and go back to login. diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/GuacamoleRadiusChallenge.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/GuacamoleRadiusChallenge.java new file mode 100644 index 000000000..581675ff0 --- /dev/null +++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/GuacamoleRadiusChallenge.java @@ -0,0 +1,77 @@ +/* + * 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. + */ + +package org.apache.guacamole.auth.radius.form; + +import org.apache.guacamole.net.auth.credentials.CredentialsInfo; + +/** + * A class for storing the RADIUS challenge message and expected credentials + * in a single object. + */ +public class GuacamoleRadiusChallenge { + + /** + * The challenge text sent by the RADIUS server. + */ + private final String challengeText; + + /** + * The expected credentials that need to be provided to satisfy the + * RADIUS authentication challenge. + */ + private final CredentialsInfo expectedCredentials; + + /** + * Create a new GuacamoleRadiusChallenge object with the provided + * challenge message and expected credentials. + * + * @param challengeText + * The challenge message sent by the RADIUS server. + * + * @param expectedCredentials + * The credentials required to complete the challenge. + */ + public GuacamoleRadiusChallenge(String challengeText, + CredentialsInfo expectedCredentials) { + this.challengeText = challengeText; + this.expectedCredentials = expectedCredentials; + } + + /** + * Return the challenge message provided by the RADIUS server. + * + * @return + * The challenge message provided by the RADIUS server. + */ + public String getChallengeText() { + return challengeText; + } + + /** + * Return the credentials required to satisfy the RADIUS challenge. + * + * @return + * The credentials required to satisfy the RADIUS challenge. + */ + public CredentialsInfo getExpectedCredentials() { + return expectedCredentials; + } + +} 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 dab0ffc24..09aefd668 100644 --- a/extensions/guacamole-auth-radius/src/main/resources/config/radiusConfig.js +++ b/extensions/guacamole-auth-radius/src/main/resources/config/radiusConfig.js @@ -26,7 +26,6 @@ angular.module('guacRadius').config(['formServiceProvider', // Define field for the challenge from the RADIUS service formServiceProvider.registerFieldType('GUAC_RADIUS_CHALLENGE_RESPONSE', { module : 'guacRadius', - controller : 'radiusResponseController', templateUrl : 'app/ext/radius/templates/radiusResponseField.html' }); diff --git a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js b/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js deleted file mode 100644 index 4782b208f..000000000 --- a/extensions/guacamole-auth-radius/src/main/resources/controllers/radiusResponseController.js +++ /dev/null @@ -1,30 +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. - */ - -/** - * 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', '$injector', - function radiusResponseController($scope, $injector) { - - // Populate the reply message field - $scope.radiusPlaceholder = $scope.field.challenge; - -}]); diff --git a/extensions/guacamole-auth-radius/src/main/resources/templates/radiusResponseField.html b/extensions/guacamole-auth-radius/src/main/resources/templates/radiusResponseField.html index eec760ff4..ced48f642 100644 --- a/extensions/guacamole-auth-radius/src/main/resources/templates/radiusResponseField.html +++ b/extensions/guacamole-auth-radius/src/main/resources/templates/radiusResponseField.html @@ -1 +1,6 @@ - + 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 c068a70af..203db185d 100644 --- a/extensions/guacamole-auth-radius/src/main/resources/translations/en.json +++ b/extensions/guacamole-auth-radius/src/main/resources/translations/en.json @@ -6,8 +6,7 @@ "LOGIN" : { "FIELD_HEADER_GUAC_RADIUS_CHALLENGE_RESPONSE" : "", - "FIELD_HEADER_GUAC_RADIUS_STATE" : "", - "INFO_RADIUS_ADDL_REQUIRED" : "Please supply additional credentials" + "FIELD_HEADER_GUAC_RADIUS_STATE" : "" } } From 30591dcc2e197fb6acc74636aac747ad478473b1 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sun, 11 Aug 2019 14:25:15 -0400 Subject: [PATCH 2/5] GUACAMOLE-769: Use standard password field for RADIUS challenge. --- .../radius/AuthenticationProviderService.java | 8 ++- .../form/RadiusChallengeResponseField.java | 68 ------------------- 2 files changed, 5 insertions(+), 71 deletions(-) delete mode 100644 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/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java index d44205b8d..94a462663 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 @@ -26,7 +26,6 @@ import java.util.Arrays; import javax.servlet.http.HttpServletRequest; import org.apache.guacamole.auth.radius.user.AuthenticatedUser; import org.apache.guacamole.auth.radius.form.GuacamoleRadiusChallenge; -import org.apache.guacamole.auth.radius.form.RadiusChallengeResponseField; import org.apache.guacamole.auth.radius.form.RadiusStateField; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.form.Field; @@ -43,6 +42,7 @@ import net.jradius.packet.AccessAccept; import net.jradius.packet.AccessChallenge; import net.jradius.packet.AccessReject; import net.jradius.packet.attribute.RadiusAttribute; +import org.apache.guacamole.form.PasswordField; /** * Service providing convenience functions for the RADIUS AuthenticationProvider @@ -54,6 +54,8 @@ public class AuthenticationProviderService { * Logger for this class. */ private final Logger logger = LoggerFactory.getLogger(AuthenticationProviderService.class); + + private static final String CHALLENGE_RESPONSE_PARAM = "radisuChallenge"; /** * Service for creating and managing connections to RADIUS servers. @@ -103,7 +105,7 @@ public class AuthenticationProviderService { logger.debug("Received challenge: {}", replyAttr.toString()); String replyMsg = replyAttr.toString().split(" = ", 2)[1]; String radiusState = BaseEncoding.base16().encode(stateAttr.getValue().getBytes()); - Field radiusResponseField = new RadiusChallengeResponseField(replyMsg); + Field radiusResponseField = new PasswordField(CHALLENGE_RESPONSE_PARAM); Field radiusStateField = new RadiusStateField(radiusState); // Return the GuacamoleRadiusChallenge object that has the state @@ -141,7 +143,7 @@ public class AuthenticationProviderService { // Grab HTTP request object and a response to a challenge. HttpServletRequest request = credentials.getRequest(); - String challengeResponse = request.getParameter(RadiusChallengeResponseField.PARAMETER_NAME); + String challengeResponse = request.getParameter(CHALLENGE_RESPONSE_PARAM); // RadiusPacket object to store response from server. RadiusPacket radPack; 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 deleted file mode 100644 index 32ceb90de..000000000 --- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/RadiusChallengeResponseField.java +++ /dev/null @@ -1,68 +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. - */ - -package org.apache.guacamole.auth.radius.form; - -import org.apache.guacamole.form.Field; - -/** - * A form used to prompt the user for additional information when - * the RADIUS server sends a challenge back to the user with a reply - * message. - */ -public class RadiusChallengeResponseField extends Field { - - /** - * The field returned by the RADIUS challenge/response. - */ - public static final String PARAMETER_NAME = "guac-radius-challenge-response"; - - /** - * The type of field to initialize for the challenge/response. - */ - private static final String RADIUS_FIELD_TYPE = "GUAC_RADIUS_CHALLENGE_RESPONSE"; - - /** - * The message the RADIUS server sent back in the challenge. - */ - private final String challenge; - - /** - * 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 challenge) { - super(PARAMETER_NAME, RADIUS_FIELD_TYPE); - this.challenge = challenge; - - } - - /** - * Get the challenge sent by the RADIUS server. - * - * @return - * A String that indicates the challenge returned - * by the RADIUS server. - */ - public String getChallenge() { - return challenge; - } -} From 7dceecd7f3f1b2b3648c5e7f18122b96c3dbb4ad Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sun, 11 Aug 2019 14:33:17 -0400 Subject: [PATCH 3/5] GUACAMOLE-769: Finish removing custom RADIUS challenge field. --- .../src/main/resources/config/radiusConfig.js | 6 ------ .../src/main/resources/guac-manifest.json | 1 - .../src/main/resources/templates/radiusResponseField.html | 6 ------ .../src/main/resources/translations/en.json | 1 - 4 files changed, 14 deletions(-) delete mode 100644 extensions/guacamole-auth-radius/src/main/resources/templates/radiusResponseField.html 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 09aefd668..a3d72bf3a 100644 --- a/extensions/guacamole-auth-radius/src/main/resources/config/radiusConfig.js +++ b/extensions/guacamole-auth-radius/src/main/resources/config/radiusConfig.js @@ -23,12 +23,6 @@ angular.module('guacRadius').config(['formServiceProvider', function guacRadiusConfig(formServiceProvider) { - // Define field for the challenge from the RADIUS service - formServiceProvider.registerFieldType('GUAC_RADIUS_CHALLENGE_RESPONSE', { - module : 'guacRadius', - templateUrl : 'app/ext/radius/templates/radiusResponseField.html' - }); - // Define the hidden field for the RADIUS state formServiceProvider.registerFieldType('GUAC_RADIUS_STATE', { module : 'guacRadius', 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 6e8e07899..707f233b7 100644 --- a/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json +++ b/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json @@ -19,7 +19,6 @@ ], "resources" : { - "templates/radiusResponseField.html" : "text/html", "templates/radiusStateField.html" : "text/html" } diff --git a/extensions/guacamole-auth-radius/src/main/resources/templates/radiusResponseField.html b/extensions/guacamole-auth-radius/src/main/resources/templates/radiusResponseField.html deleted file mode 100644 index ced48f642..000000000 --- a/extensions/guacamole-auth-radius/src/main/resources/templates/radiusResponseField.html +++ /dev/null @@ -1,6 +0,0 @@ - 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 203db185d..66232e4e7 100644 --- a/extensions/guacamole-auth-radius/src/main/resources/translations/en.json +++ b/extensions/guacamole-auth-radius/src/main/resources/translations/en.json @@ -5,7 +5,6 @@ }, "LOGIN" : { - "FIELD_HEADER_GUAC_RADIUS_CHALLENGE_RESPONSE" : "", "FIELD_HEADER_GUAC_RADIUS_STATE" : "" } From 516963a16210503023bf100c94ad645b02ec983a Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sun, 11 Aug 2019 14:36:26 -0400 Subject: [PATCH 4/5] GUACAMOLE-769: Clean up documentation and add challenge variable comment. --- .../radius/AuthenticationProviderService.java | 15 +++++++++++---- .../radius/form/GuacamoleRadiusChallenge.java | 10 +++++----- 2 files changed, 16 insertions(+), 9 deletions(-) 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 94a462663..043d16d05 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 @@ -55,7 +55,11 @@ public class AuthenticationProviderService { */ private final Logger logger = LoggerFactory.getLogger(AuthenticationProviderService.class); - private static final String CHALLENGE_RESPONSE_PARAM = "radisuChallenge"; + /** + * The name of the password field where the user will enter a response to + * the RADIUS challenge. + */ + private static final String CHALLENGE_RESPONSE_PARAM = "radiusChallenge"; /** * Service for creating and managing connections to RADIUS servers. @@ -71,7 +75,8 @@ public class AuthenticationProviderService { /** * Returns an object containing the challenge message and the expected - * credentials from a RADIUS challenge. + * credentials from a RADIUS challenge, or null if either state or reply + * attributes are missing from the challenge. * * @param challengePacket * The AccessChallenge RadiusPacket received from the RADIUS @@ -81,7 +86,9 @@ public class AuthenticationProviderService { * A GuacamoleRadiusChallenge object that contains the challenge message * sent by the RADIUS server and the expected credentials that should * be requested of the user in order to continue authentication. One - * of the expected credentials *must* be the RADIUS state. + * of the expected credentials *must* be the RADIUS state. If either + * state or the reply are missing from the challenge this method will + * return null. */ private GuacamoleRadiusChallenge getRadiusChallenge(RadiusPacket challengePacket) { @@ -102,7 +109,7 @@ public class AuthenticationProviderService { } // We have the required attributes - convert to strings and then generate the additional login box/field - logger.debug("Received challenge: {}", replyAttr.toString()); + logger.debug("Received challenge: {}", replyAttr.getValue().toString()); String replyMsg = replyAttr.toString().split(" = ", 2)[1]; String radiusState = BaseEncoding.base16().encode(stateAttr.getValue().getBytes()); Field radiusResponseField = new PasswordField(CHALLENGE_RESPONSE_PARAM); diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/GuacamoleRadiusChallenge.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/GuacamoleRadiusChallenge.java index 581675ff0..45897944b 100644 --- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/GuacamoleRadiusChallenge.java +++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/form/GuacamoleRadiusChallenge.java @@ -22,8 +22,8 @@ package org.apache.guacamole.auth.radius.form; import org.apache.guacamole.net.auth.credentials.CredentialsInfo; /** - * A class for storing the RADIUS challenge message and expected credentials - * in a single object. + * Stores the RADIUS challenge message and expected credentials in a single + * object. */ public class GuacamoleRadiusChallenge { @@ -39,7 +39,7 @@ public class GuacamoleRadiusChallenge { private final CredentialsInfo expectedCredentials; /** - * Create a new GuacamoleRadiusChallenge object with the provided + * Creates a new GuacamoleRadiusChallenge object with the provided * challenge message and expected credentials. * * @param challengeText @@ -55,7 +55,7 @@ public class GuacamoleRadiusChallenge { } /** - * Return the challenge message provided by the RADIUS server. + * Returns the challenge message provided by the RADIUS server. * * @return * The challenge message provided by the RADIUS server. @@ -65,7 +65,7 @@ public class GuacamoleRadiusChallenge { } /** - * Return the credentials required to satisfy the RADIUS challenge. + * Returns the credentials required to satisfy the RADIUS challenge. * * @return * The credentials required to satisfy the RADIUS challenge. From 59c46da5b569d175ae8d88270d1bb990238175ab Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sun, 11 Aug 2019 18:41:39 -0400 Subject: [PATCH 5/5] GUACAMOLE-769: Get the value and avoid splitting the string. --- .../guacamole/auth/radius/AuthenticationProviderService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 043d16d05..fee43575d 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,8 +109,7 @@ public class AuthenticationProviderService { } // We have the required attributes - convert to strings and then generate the additional login box/field - logger.debug("Received challenge: {}", replyAttr.getValue().toString()); - String replyMsg = replyAttr.toString().split(" = ", 2)[1]; + String replyMsg = replyAttr.getValue().toString(); String radiusState = BaseEncoding.base16().encode(stateAttr.getValue().getBytes()); Field radiusResponseField = new PasswordField(CHALLENGE_RESPONSE_PARAM); Field radiusStateField = new RadiusStateField(radiusState);