forked from shaba/openuds
Added "AzureAD" RDP login support
This commit is contained in:
parent
35b0d709f6
commit
81d8544f5f
@ -189,7 +189,11 @@ class HTML5RDPTransport(transports.Transport):
|
|||||||
if self.fixedPassword.value != '':
|
if self.fixedPassword.value != '':
|
||||||
password = self.fixedPassword.value
|
password = self.fixedPassword.value
|
||||||
|
|
||||||
|
azureAd = False
|
||||||
if self.fixedDomain.value != '':
|
if self.fixedDomain.value != '':
|
||||||
|
if self.fixedDomain.value.lower() == 'azuread':
|
||||||
|
azureAd = True
|
||||||
|
else:
|
||||||
domain = self.fixedDomain.value
|
domain = self.fixedDomain.value
|
||||||
|
|
||||||
if self.useEmptyCreds.isTrue():
|
if self.useEmptyCreds.isTrue():
|
||||||
@ -203,6 +207,9 @@ class HTML5RDPTransport(transports.Transport):
|
|||||||
username = username + '@' + domain
|
username = username + '@' + domain
|
||||||
domain = ''
|
domain = ''
|
||||||
|
|
||||||
|
|
||||||
|
username = 'AzureAD\\' + username
|
||||||
|
|
||||||
# Fix username/password acording to os manager
|
# Fix username/password acording to os manager
|
||||||
username, password = userService.processUserPassword(username, password)
|
username, password = userService.processUserPassword(username, password)
|
||||||
|
|
||||||
|
@ -182,7 +182,12 @@ class BaseRDPTransport(transports.Transport):
|
|||||||
|
|
||||||
if self.fixedPassword.value:
|
if self.fixedPassword.value:
|
||||||
password = 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
|
domain = self.fixedDomain.value
|
||||||
if self.useEmptyCreds.isTrue():
|
if self.useEmptyCreds.isTrue():
|
||||||
username, password, domain = '', '', ''
|
username, password, domain = '', '', ''
|
||||||
@ -198,8 +203,6 @@ class BaseRDPTransport(transports.Transport):
|
|||||||
username = domain + '\\' + username
|
username = domain + '\\' + username
|
||||||
domain = ''
|
domain = ''
|
||||||
|
|
||||||
# Temporal "fix" to check if we do something on processUserPassword
|
|
||||||
|
|
||||||
# Fix username/password acording to os manager
|
# Fix username/password acording to os manager
|
||||||
username, password = userService.processUserPassword(username, password)
|
username, password = userService.processUserPassword(username, password)
|
||||||
|
|
||||||
@ -207,6 +210,10 @@ class BaseRDPTransport(transports.Transport):
|
|||||||
if '\\' in username:
|
if '\\' in username:
|
||||||
domain, username = username.split('\\')
|
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}
|
return {'protocol': self.protocol, 'username': username, 'password': password, 'domain': domain}
|
||||||
|
|
||||||
def getConnectionInfo(
|
def getConnectionInfo(
|
||||||
|
Loading…
Reference in New Issue
Block a user