<div dir="ltr">Hi Endi,<div><br></div><div>Thanks a lot for your response. In the meanwhile I managed to get some code working to get this approval done but somehow when I do this for a number of times it hangs. I then checked with the PKI CLI and the approval call is indeed at times very slow (giving a hang perception but does work after some time) and that's the reason my code breaks with an exception - see below. So I have 2 queries:</div><div><br></div><div>- Why Approval calls so slow? Can these be made faster. I am running fedora 32 as VM with 6 GB RAM and 4 vCPUs.</div><div>- Is there a way to set the timeout period in the client to ensure the calling application doesn't close the session too soon.</div><div><br></div><div>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection - Client certificate: PKI Administrator for localhost.localdomain<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection - HTTP request: POST /ca/rest/agent/certrequests/68/approve HTTP/1.1<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Accept: application/xml<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Content-Type: application/xml<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Content-Length: 21606<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Host: <a href="http://192.168.56.103:8443/" target="_blank">192.168.56.103:8443</a><br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Connection: Keep-Alive<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   User-Agent: Apache-HttpClient/4.5.10 (Java/1.8.0_242)<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Cookie: JSESSIONID=BF20B9C354788A712389E9FBF920651C<br>pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection - HTTP response: HTTP/1.1 400<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Content-Type: text/html;charset=UTF-8<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Content-Length: 243<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Date: Thu, 12 Nov 2020 09:25:04 GMT<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Connection: close<br><b>[pool-3-thread-4] ERROR com.netscape.certsrv.client.PKIConnection - WARNING: SSL alert sent: CLOSE_NOTIFY</b><br>com.netscape.certsrv.base.PKIException: Bad Request<br>at com.netscape.certsrv.client.PKIConnection.handleErrorResponse(PKIConnection.java:469)<br>at com.netscape.certsrv.client.PKIConnection.getEntity(PKIConnection.java:432)<br>at com.netscape.certsrv.client.PKIClient.getEntity(PKIClient.java:106)<br>at com.netscape.certsrv.ca.CACertClient.approveRequest(CACertClient.java:127)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 12, 2020 at 5:05 PM <<a href="mailto:pki-users-owner@redhat.com">pki-users-owner@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This mailing list is restricted to members, and your message has been<br>
automatically rejected.<br>
<br>
To subscribe, visit: <a href="https://www.redhat.com/mailman/listinfo/pki-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pki-users</a><br>
<br>
<br>
If you think that your messages are being rejected in error, contact<br>
the mailing list owner at <a href="mailto:pki-users-owner@redhat.com" target="_blank">pki-users-owner@redhat.com</a>.<br>
<br>
<br>
<br><br><br>---------- Forwarded message ----------<br>From: "info@codegic" <<a href="mailto:info@codegic.com" target="_blank">info@codegic.com</a>><br>To: Endi Dewata <<a href="mailto:edewata@redhat.com" target="_blank">edewata@redhat.com</a>><br>Cc: <a href="mailto:pki-users@redhat.com" target="_blank">pki-users@redhat.com</a><br>Bcc: <br>Date: Thu, 12 Nov 2020 16:59:13 +0500<br>Subject: Re: [Pki-users] Is Dogtag PKI Rest API documentation up to date?<br><div dir="ltr">Hi Endi,<div><br></div><div>Thanks a lot for your response. In the meanwhile I managed to get some code working to get this approval done but somehow when I do this for a number of times it hangs. I then checked with the PKI CLI and the approval call is indeed at times very slow (giving a hang perception but does work after some time) and that's the reason my code breaks with an exception - see below. So I have 2 queries:</div><div><br></div><div>- Why Approval calls so slow? Can these be made faster. I am running fedora 32 as VM with 6 GB RAM and 4 vCPUs.</div><div>- Is there a way to set the timeout period in the client to ensure the calling application doesn't close the session too soon.</div><div><br></div><div>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection - Client certificate: PKI Administrator for localhost.localdomain<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection - HTTP request: POST /ca/rest/agent/certrequests/68/approve HTTP/1.1<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Accept: application/xml<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Content-Type: application/xml<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Content-Length: 21606<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Host: <a href="http://192.168.56.103:8443" target="_blank">192.168.56.103:8443</a><br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Connection: Keep-Alive<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   User-Agent: Apache-HttpClient/4.5.10 (Java/1.8.0_242)<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Cookie: JSESSIONID=BF20B9C354788A712389E9FBF920651C<br>pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection - HTTP response: HTTP/1.1 400 <br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Content-Type: text/html;charset=UTF-8<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Content-Length: 243<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Date: Thu, 12 Nov 2020 09:25:04 GMT<br>[pool-3-thread-4] INFO com.netscape.certsrv.client.PKIConnection -   Connection: close<br><b>[pool-3-thread-4] ERROR com.netscape.certsrv.client.PKIConnection - WARNING: SSL alert sent: CLOSE_NOTIFY</b><br>com.netscape.certsrv.base.PKIException: Bad Request<br>at com.netscape.certsrv.client.PKIConnection.handleErrorResponse(PKIConnection.java:469)<br>at com.netscape.certsrv.client.PKIConnection.getEntity(PKIConnection.java:432)<br>at com.netscape.certsrv.client.PKIClient.getEntity(PKIClient.java:106)<br>at com.netscape.certsrv.ca.CACertClient.approveRequest(CACertClient.java:127)<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 11, 2020 at 10:39 PM Endi Dewata <<a href="mailto:edewata@redhat.com" target="_blank">edewata@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi Wahaj,</div><div><br></div><div>The REST API doc was created manually, so unfortunately it may have become</div><div>out of date and we don't have resources right now to update it. For now I'd suggest</div><div>to run the pki CLI in --verbose, --message-format, and --output to see the actual</div><div>request and responses sent between the server and client and then replicate the</div><div>same messages in your application. Hope this helps.<br></div><div><br></div><div><a href="https://github.com/dogtagpki/pki/wiki/PKI-CLI-Options" target="_blank">https://github.com/dogtagpki/pki/wiki/PKI-CLI-Options</a></div><div><br></div><div>-- <br><div dir="ltr"><div dir="ltr"><div>Endi S. Dewata</div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 9, 2020 at 1:52 AM Wahaj K <<a href="mailto:mwahaj3120@gmail.com" target="_blank">mwahaj3120@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>Saw the documentation at: <a href="https://github.com/dogtagpki/pki/wiki/PKI-CA-Revoke-Certificate-REST-API" target="_blank">https://github.com/dogtagpki/pki/wiki/PKI-CA-Revoke-Certificate-REST-API</a></div><div><br></div><div>I am trying this and failing. I get all sort of issues like Content type is not valid, Content Length is not valid etc when I put some content type and content length. I believe as this is HTTP POST and no content required hence I am then skipping both of these but then I get this in the CA logs:</div><div><br></div><div>2020-11-09 11:33:00 [https-jsse-nio-8443-exec-24] ERROR: RESTEASY002010: Failed to execute<br><br>javax.ws.rs.NotSupportedException: RESTEASY003200: Could not find message body reader for type: class com.netscape.certsrv.cert.CertRevokeRequest of content type: */*<br></div><div><br></div><div>I am using Postman. Get Certs call is working fine.</div><div><br></div><div><div><img src="cid:ii_kha6hz4p0" alt="image.png" style="outline: currentcolor none 0px;" width="521" height="341"><br></div></div><div><br></div><div>I get similar errors on the Restful Approve call.</div><div><br></div><div>Is the documentation up to date? I am stuck for days :( <b>Would be grateful if you can guide!</b></div><div><b><br></b></div><div><div>Regards,</div><div>Wahaj</div></div></div>
_______________________________________________<br>
Pki-users mailing list<br>
<a href="mailto:Pki-users@redhat.com" target="_blank">Pki-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pki-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pki-users</a></blockquote></div><br clear="all"><div dir="ltr"><div dir="ltr"><div><br></div></div></div></div>
</blockquote></div>
</blockquote></div>