Skip to content

GUACAMOLE-2057: Add configuration parameters for supporting Kerberos authentication for RDP.#581

Draft
necouchman wants to merge 1 commit intoapache:mainfrom
necouchman:working/rdp-kerberos
Draft

GUACAMOLE-2057: Add configuration parameters for supporting Kerberos authentication for RDP.#581
necouchman wants to merge 1 commit intoapache:mainfrom
necouchman:working/rdp-kerberos

Conversation

@necouchman
Copy link
Copy Markdown
Contributor

Adds the required parameters to configure the FreeRDP library to force Kerberos and configure a couple of the parameters related to that, if required. I have tested the changes against both servers with NTLM still enabled and against one where NTLM is disabled, and it seems to work, but others should feel free to test.

I do need one bit of help with this - I have not added the detection of the Kerberos support to the configure.ac file, yet, as I'm struggling to figure out how to do that. In my mind, it needs 2-3 checks:

  • Check if FreeRDP contains support for the FreeRDP_AuthenticationPackageList setting. This is probably the biggest thing I'm struggling with, as this setting is part of an enum in one of the FreeRDP header files, but I'm having trouble finding any guidance on how to generate an autoconf check for an enum member? Any hints on the best way to do that would be appreciated.
  • Check if FreeRDP is built with Kerberos support. There's a flag in the FreeRDP buildconfig.h file, within the constant FREERDP_BUILD_CONFIG that shows WITH_KRB5=ON, but, again, I'm struggling with how to get autoconf to check for this, or identify a sane method or member to use with one of the other autoconf checks.

@necouchman necouchman force-pushed the working/rdp-kerberos branch from 08026b5 to 5c1032c Compare May 3, 2025 12:28

/**
* The authentication package to use based on the underlying FreeRDP support
* for alternatives to NTML. Currently FreeRDP2 only supports NTLM, while
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a typo (NTML > NTLM)

Comment on lines +1750 to +1770
switch(guac_settings->auth_pkg) {

case GUAC_AUTH_PKG_NTLM:
freerdp_settings_set_string(rdp_settings, FreeRDP_AuthenticationPackageList, "ntlm,!kerberos");
break;

case GUAC_AUTH_PKG_KERBEROS:
freerdp_settings_set_string(rdp_settings, FreeRDP_AuthenticationPackageList, "!ntlm,kerberos");
break;

case GUAC_AUTH_PKG_ANY:
freerdp_settings_set_string(rdp_settings, FreeRDP_AuthenticationPackageList, "ntlm,kerberos");
break;

}

if (guac_settings->kdc_url != NULL)
freerdp_settings_set_string(rdp_settings, FreeRDP_KerberosKdcUrl, guac_strdup(guac_settings->kdc_url));

if (guac_settings->kerberos_cache != NULL)
freerdp_settings_set_string(rdp_settings, FreeRDP_KerberosCache, guac_strdup(guac_settings->kerberos_cache));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The specific Kerberos code should only be enabled with FreeRDP >= 3.x to avoid compilation errors in 2.x.

Comment on lines +318 to +320
* When kerberos authentication is in use, the path to the kerberos ticket
* cache, relative to GUACAMOLE_HOME. If not specified, the default system
* cache of the underlying system on which guacd is running will be used.
Copy link
Copy Markdown
Contributor

@mike-jumper mike-jumper Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look to me like the path is evaluated relative to GUACAMOLE_HOME, but passed to FreeRDP unaltered (and then interpreted by FreeRDP relative to somewhere?).

Comment on lines +302 to +308
/**
* The authentication package to use based on the underlying FreeRDP support
* for alternatives to NTML. Currently FreeRDP2 only supports NTLM, while
* FreeRDP3 introduces support for Kerberos and continues to support NTLM.
* The default is to negotiate between guacd and the remote server.
*/
IDX_AUTH_PKG,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be part of the security parameter, rather than separate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants