Added "AzureAD" RDP login support

This commit is contained in:
Adolfo Gómez García 2021-03-10 18:13:08 +01:00
parent 35b0d709f6
commit 81d8544f5f
2 changed files with 19 additions and 5 deletions

View File

@ -189,7 +189,11 @@ class HTML5RDPTransport(transports.Transport):
if self.fixedPassword.value != '':
password = self.fixedPassword.value
azureAd = False
if self.fixedDomain.value != '':
if self.fixedDomain.value.lower() == 'azuread':
azureAd = True
else:
domain = self.fixedDomain.value
if self.useEmptyCreds.isTrue():
@ -203,6 +207,9 @@ class HTML5RDPTransport(transports.Transport):
username = username + '@' + domain
domain = ''
username = 'AzureAD\\' + username
# Fix username/password acording to os manager
username, password = userService.processUserPassword(username, password)

View File

@ -182,7 +182,12 @@ class BaseRDPTransport(transports.Transport):
if self.fixedPassword.value:
password = self.fixedPassword.value
if self.fixedDomain.value:
azureAd = False
if self.fixedDomain.value != '':
if self.fixedDomain.value.lower() == 'azuread':
azureAd = True
else:
domain = self.fixedDomain.value
if self.useEmptyCreds.isTrue():
username, password, domain = '', '', ''
@ -198,8 +203,6 @@ class BaseRDPTransport(transports.Transport):
username = domain + '\\' + username
domain = ''
# Temporal "fix" to check if we do something on processUserPassword
# Fix username/password acording to os manager
username, password = userService.processUserPassword(username, password)
@ -207,6 +210,10 @@ class BaseRDPTransport(transports.Transport):
if '\\' in username:
domain, username = username.split('\\')
# If AzureAD, include it on username
if azureAd:
username = 'AzureAD\\' + username
return {'protocol': self.protocol, 'username': username, 'password': password, 'domain': domain}
def getConnectionInfo(