<div dir="ltr">I should add too that  <i>curl --cacert ca.crt <a href="https://dogtag.test.org:8443/ca/services">https://dogtag.test.org:8443/ca/services</a> </i>does get a valid response while using that file with the -C switch on dogtag-submit does not.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 3, 2015 at 3:47 PM, Steve Neuharth <span dir="ltr"><<a href="mailto:steve@sylvation.com" target="_blank">steve@sylvation.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Thanks again for the information. I have a couple more questions for you. <br><br></div>first is that I have added a new 'Dogtag' ca in /var/lib/certmonger/cas/20150331194831-5<br><br><i>id=Dogtag<br>ca_aka=Dogtag PKI<br>ca_is_default=0<br>ca_type=EXTERNAL<br>ca_external_helper=/usr/libexec/certmonger/dogtag-submit<br>ca_required_enroll_attributes=template-subject<br>ca_required_renewal_attributes=template-subject<br></i> <br></div>however, when I run getcert list-cas, it does not appear<br><br></div>The next question is regarding the dogtag-submit helper itself. I'm trying to execute this:<br><div><div><br><i>/usr/libexec/certmonger/dogtag-submit -vv -c ~/test.crt -k ~/test.key -E <a href="https://dogtag.test.org:8443/ca/ee/ca" target="_blank">https://dogtag.test.org:8443/ca/ee/ca</a> -A <a href="https://dogtag.test.org:8443/ca/agent/ca" target="_blank">https://dogtag.test.org:8443/ca/agent/ca</a> -T caServerCert -d /etc/httpd/alias -n caadmin -p /etc/pki/pki-tomcat/alias/pwdfile.txt -C /etc/pki/pki-tomcat/alias</i><br><br></div><div>and then I paste in my csr and hit 'ctrl-d' and I get:<br><br><i>code = 77<br>code_text = "Problem with the SSL CA cert (path? access rights?)"<br>results = "(null)"<br>Error 77 connecting to <a href="https://dogtag.test.org:8443/ca/ee/ca/profileSubmit" target="_blank">https://dogtag.test.org:8443/ca/ee/ca/profileSubmit</a>: Problem with the SSL CA cert (path? access rights?).<br><br></i></div><div>I guess I'm not sure what CA cert path it's talking about. I've tried the pki-tomcat alias path and I've tried pointing to the CAcert that I downloaded from the WebUI<font size="-1"><font face="PrimaSans BT, Verdana, sans-serif"> on the 'Import CA Certificate Chain' page but I always get the same error.<br><br></font></font></div><div><font size="-1"><font face="PrimaSans BT, Verdana, sans-serif">Thanks for your help,<br></font></font></div><div><font size="-1"><font face="PrimaSans BT, Verdana, sans-serif">--steve<br></font></font></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Apr 1, 2015 at 4:43 PM, Nalin Dahyabhai <span dir="ltr"><<a href="mailto:nalin@redhat.com" target="_blank">nalin@redhat.com</a>></span> wrote:<br></span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Wed, Apr 01, 2015 at 03:37:58PM -0500, Steve Neuharth wrote:<br>
> Hello everyone,<br>
><br>
> I have a requirement to provide a service to our internal linux systems to<br>
> allow them to self-register and receive a certificate representing the host<br>
> itself and then a cert representing any application on that host. I have<br>
> installed DogTag, it's up and running and seems to be working.<br>
><br>
> I'd like to be able to use REST to request a certificate and have it<br>
> auto-signed. I know that DogTag has a REST interface and while the<br>
> interface is documented, there are no examples where I can see how it would<br>
> actually be used to post a CSR, fetch a cert, etc.<br>
><br>
> Normally, I'd just sniff a request made with getcert but as I'm using just<br>
> dogtag as a standalone install and not as a part of FreeIPA, getcert has no<br>
> knowledge of my local DogTag CA:<br>
><br>
</span>> *[root@dogtag lib]# getcert list-casCA 'SelfSign':        is-default:<br>
<span>> no        ca-type: INTERNAL:SELF        next-serial-number: 01CA<br>
> 'IPA':        is-default: no        ca-type: EXTERNAL<br>
</span>> helper-location: /usr/libexec/certmonger/ipa-submitCA 'certmaster':<br>
<span>> is-default: no        ca-type: EXTERNAL        helper-location:<br>
> /usr/libexec/certmonger/certmaster-submitCA<br>
> 'dogtag-ipa-renew-agent':        is-default: no        ca-type:<br>
> EXTERNAL        helper-location:<br>
</span>> /usr/libexec/certmonger/dogtag-ipa-renew-agent-submitCA 'local':<br>
<span>> is-default: no        ca-type: EXTERNAL        helper-location:<br>
</span>> /usr/libexec/certmonger/local-submit*<br>
<span>><br>
> so... how do I make it aware? I'm using fedora21 so I'm at<br>
> certmonger-0.76.8-1.fc21 and don't have access to the add-ca subtask. It<br>
> looks like I'd edit files in /var/lib/certmonger/cas but I'm not sure what<br>
> to add.<br>
<br>
</span>If you're after something you can use to poke at the server from the<br>
command line, the 'pki' tool from the 'pki-tools' package may be closer<br>
to what you're looking for.<br>
<br>
If not, well, here's more than you probably want to know.<br>
<br>
The CAs which certmonger knows about by default are the ones that don't<br>
require any additional configuration to be passed to them.  For example,<br>
the ipa-submit helper can dig up all of the configuration that it needs<br>
from the IPA configuration files.  Along similar lines, the<br>
dogtag-ipa-renew-agent-submit helper can dig through IPA's configuration<br>
for some settings, and have hardwired defaults for the rest.<br>
<br>
The general-purpose dogtag-submit helper doesn't have that expectation,<br>
and it hasn't seen much use yet, so you may find some bugs (well, more<br>
than usual).  Anyway, a new file telling certmonger how to invoke it<br>
would look something like this:<br>
<br>
 id=Dogtag<br>
 ca_type=EXTERNAL<br>
 ca_external_helper=/usr/libexec/certmonger/dogtag-submit ...<br>
<br>
The flags that would be passed to the dogtag-submit helper depend on<br>
whether or not it's expected to use agent creds to use Dogtag's agent<br>
services to approve the signing requests that it submits.  Briefly:<br>
-T caServerCert<br>
   The name of the Dogtag enrollment profile to use.<br>
-E <a href="http://server:8080/ca/ee/ca" target="_blank">http://server:8080/ca/ee/ca</a><br>
   The location of Dogtag's end-user service.<br>
-A <a href="https://server:8443/ca/agent/ca" target="_blank">https://server:8443/ca/agent/ca</a><br>
   The location of Dogtag's agent services, if agent creds will be used.<br>
-d /etc/httpd/alias -n ipaCert -p /etc/httpd/alias/pwdfile.txt<br>
   The location of the agent creds, if agent creds will be used.<br>
<br>
Some words of caution: the helper doesn't use the new REST API, but<br>
rather the old forms-based one, due to a combination of wanting to<br>
remain compatible with older versions of Dogtag and wanting to avoid<br>
adding new dependencies to the server via the REST API.<br>
<br>
If you try to use agent creds to auto-approve things, but the enrollment<br>
profile doesn't provide defaults for every extension value that it<br>
populates, the logic in dogtag-submit that tries to use agent creds to<br>
approve requests won't be able to tell the server to just use the<br>
defaults, and things could go awry.  The -O flag may help here.<br>
<br>
You may want to run dogtag-submit interactively to get the flags sorted<br>
out, passing in previous output using the -S flag to mimic the<br>
certmonger daemon running it iteratively.<br>
<span><br>
> I apologize in advance for the pedestrian questions. I have read the docs<br>
> and the getting started guide and while they provide examples for<br>
> self-signed certs and for using FreeIPA, I don't see much info on using<br>
> getcert with DogTag as a standalone product. I'd also like to explore using<br>
> SCEP for requesting certs from our MS PKI. Is there a guide or info setting<br>
> up certmonger/getcert to hit a SCEP URL?<br>
<br>
</span>That functionality was new in 0.77, and I've just submitted a candidate<br>
update build for F21, so hopefully some will be available in the<br>
updates-testing tree this week.  Anyway, the short version of how to use<br>
an SCEP server is:<br>
<br>
* Use "getcert add-scep-ca -u $URL -c $NAME" to point the service at<br>
  your SCEP server's URL and give the CA a nickname.<br>
  * If it's an HTTPS URL, use the -R flag to point it to a PEM-formatted<br>
    copy of the CA's certificate.  If not, use "getcert list" and<br>
    "getcert list-cas" to display request and certificate fingerprints<br>
    for manual verification.<br>
* Use "getcert -c $NAME" to request a certificate.<br>
  * Use the -L or -l flag to supply the enrollment PIN or point to a<br>
    file that contains the enrollment PIN.<br>
<br>
A lot of the logic for supporting SCEP is new, so if you run into<br>
problems in that area, please make sure to let us know.<br>
<br>
HTH,<br>
<br>
Nalin<br>
</blockquote></div></div></div><br></div>
</blockquote></div><br></div>