forked from shaba/openuds
Added "AzureAD" RDP login support
This commit is contained in:
parent
35b0d709f6
commit
81d8544f5f
@ -189,8 +189,12 @@ class HTML5RDPTransport(transports.Transport):
|
||||
if self.fixedPassword.value != '':
|
||||
password = self.fixedPassword.value
|
||||
|
||||
azureAd = False
|
||||
if self.fixedDomain.value != '':
|
||||
domain = self.fixedDomain.value
|
||||
if self.fixedDomain.value.lower() == 'azuread':
|
||||
azureAd = True
|
||||
else:
|
||||
domain = self.fixedDomain.value
|
||||
|
||||
if self.useEmptyCreds.isTrue():
|
||||
username, password, domain = '', '', ''
|
||||
@ -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)
|
||||
|
||||
|
@ -182,8 +182,13 @@ class BaseRDPTransport(transports.Transport):
|
||||
|
||||
if self.fixedPassword.value:
|
||||
password = self.fixedPassword.value
|
||||
if self.fixedDomain.value:
|
||||
domain = 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(
|
||||
|
Loading…
Reference in New Issue
Block a user