From 5d83a5f24bd59919704e5c458420458d87671b2d Mon Sep 17 00:00:00 2001 From: Nick Couchman Date: Tue, 7 Feb 2017 22:35:59 -0500 Subject: [PATCH] GUACAMOLE-197: Add configuration properties for EAP-related authentication protocols. --- .../auth/radius/ConfigurationService.java | 56 ++++++++++++++++++ .../radius/RadiusGuacamoleProperties.java | 57 +++++++++++++++++++ 2 files changed, 113 insertions(+) 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 461243b0f..37117e2cc 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 @@ -164,4 +164,60 @@ public class ConfigurationService { ); } + public String getRadiusCAFile() throws GuacamoleException { + return environment.getProperty( + RadiusGuacamoleProperties.RADIUS_CA_FILE, + "radius-ca.pem" + ); + } + + public String getRadiusKeyFile() throws GuacamoleException { + return environment.getProperty( + RadiusGuacamoleProperties.RADIUS_KEY_FILE, + "radius-key.pem" + ); + } + + public String getRadiusCAPassword() throws GuacamoleException { + return environment.getProperty( + RadiusGuacamoleProperties.RADIUS_CA_PASSWORD, + null + ); + } + + public String getRadiusCAType() throws GuacamoleException { + return environment.getProperty( + RadiusGuacamoleProperties.RADIUS_CA_TYPE, + null + ); + } + + public String getRadiusKeyPassword() throws GuacamoleException { + return environment.getProperty( + RadiusGuacamoleProperties.RADIUS_KEY_PASSWORD, + null + ); + } + + public String getRadiusKeyType() throws GuacamoleException { + return environment.getProperty( + RadiusGuacamoleProperties.RADIUS_KEY_PASSWORD, + null + ); + } + + public Boolean getRadiusTrustAll() throws GuacamoleException { + return environment.getProperty( + RadiusGuacamoleProperties.RADIUS_TRUST_ALL, + false + ); + } + + public String getRadiusEAPTTLSInnerProtocol() throws GuacamoleException { + return environment.getProperty( + RadiusGuacamoleProperties.RADIUS_EAP_TTLS_INNER_PROTOCOL, + null + ); + } + } 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 02b9df72b..46c267daf 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 @@ -19,6 +19,7 @@ package org.apache.guacamole.auth.radius; +import org.apache.guacamole.properties.BooleanGuacamoleProperty; import org.apache.guacamole.properties.IntegerGuacamoleProperty; import org.apache.guacamole.properties.StringGuacamoleProperty; @@ -108,5 +109,61 @@ public class RadiusGuacamoleProperties { }; + public static final StringGuacamoleProperty RADIUS_CA_FILE = new StringGuacamoleProperty() { + + @Override + public String getName() { return "radius-ca-file"; } + + }; + + public static final StringGuacamoleProperty RADIUS_CA_TYPE = new StringGuacamoleProperty() { + + @Override + public String getName() { return "radius-ca-type"; } + + }; + + public static final StringGuacamoleProperty RADIUS_CA_PASSWORD = new StringGuacamoleProperty() { + + @Override + public String getName() { return "radius-ca-password"; } + + }; + + public static final StringGuacamoleProperty RADIUS_KEY_FILE = new StringGuacamoleProperty() { + + @Override + public String getName() { return "radius-key-file"; } + + }; + + public static final StringGuacamoleProperty RADIUS_KEY_TYPE = new StringGuacamoleProperty() { + + @Override + public String getName() { return "radius-key-type"; } + + }; + + public static final StringGuacamoleProperty RADIUS_KEY_PASSWORD = new StringGuacamoleProperty() { + + @Override + public String getName() { return "radius-key-password"; } + + }; + + public static final BooleanGuacamoleProperty RADIUS_TRUST_ALL = new BooleanGuacamoleProperty() { + + @Override + public String getName() { return "radius-trust-all"; } + + }; + + public static final StringGuacamoleProperty RADIUS_EAP_TTLS_INNER_PROTOCOL = new StringGuacamoleProperty() { + + @Override + public String getName() { return "radius-eap-ttls-inner-protocol"; } + + }; + }