if os.path.exists(cepces_submit):
env = os.environ
env['CERTMONGER_OPERATION'] = 'GET-SUPPORTED-TEMPLATES'
- p = Popen([cepces_submit, '--server=%s' % server], env=env,
- stdout=PIPE, stderr=PIPE)
+ p = Popen([cepces_submit, '--server=%s' % server, '--auth=Kerberos'],
+ env=env, stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
if p.returncode != 0:
log.warn('Failed to fetch the list of supported templates.')
cepces_submit = find_cepces_submit()
if getcert is not None and os.path.exists(cepces_submit):
p = Popen([getcert, 'add-ca', '-c', ca['cn'][0], '-e',
- '%s --server=%s' % (cepces_submit, ca['dNSHostName'][0])],
+ '%s --server=%s --auth=Kerberos' % (cepces_submit,
+ ca['dNSHostName'][0])],
stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
log.debug(out.decode())
if __name__ == "__main__":
parser = optparse.OptionParser('cepces-submit [options]')
parser.add_option('--server')
+ parser.add_option('--auth')
(opts, args) = parser.parse_args()
assert opts.server is not None
+ assert opts.auth == 'Kerberos'
if 'CERTMONGER_OPERATION' in os.environ and \
os.environ['CERTMONGER_OPERATION'] == 'GET-SUPPORTED-TEMPLATES':
print('Machine') # Report a Machine template