Rest API /addcert 404 File Not Found

0

Hello everyone,

 

I am trying to add or replace a certificate with the RESTApi to autpomate the LE renew process. When I execute the curl command, I get a response from the KEMP but with Status: 404 not found.

curl -X POST --data-binary "@/certs/mycert.pem" -k "https://192.168.23.78:9443/access/addcert?cert=test&replace=0" -u "bal:mysecpw12345"

I also tried with replace = 1 when I uploaded the cert manually first and also with an api key.

 

I activated the API under "Remote Access" and other commands like /readcert /listcert are working.

Is this a bug or do I miss something?

 

Thanks in advance.

Moritz

7 comments

Avatar
Nick Smylie Official comment

Hi Moritz,

This is a current bug in the firmware.  Basically if API port and WUI port do not match issues will happen.  It is scheduled to be fixed on our next firmware release of .52.

Avatar
0
moritz.hofmann

Hello again,

 

I couldn't find a edit button?

I forgot to write which version we are using.

LoadMaster Version 7.2.50.0.18765.RELEASE

Thanks,

Moritz

Avatar
0
Nick Smylie

Hi @moritz.hofmann

It would appear it cannot find that file within your location that you specified.  I tried the same thing and it worked fine so I think the command itself is fine.

One thing to note on top of that though is that the file needs the public and private key in there to install correctly.  

Avatar
0
moritz.hofmann

Hi Nick,

its working now... It was the Port that we used (9443) I change the API Port to 443 and now its working.

Thanks,

Moritz 

Avatar
0
Nick Smylie

Hi Moritz,

Let me look at that more closely and find out if its an issue.

Avatar
0
Nick Smylie

Hi Moritz,

Yeah it looks like something to do with uploads.  I tried updating a snort rule set and it fails but while doing something as simple as /access/stats on port 8443 it works.  I am looking into this a bit more and will update when I have something new to share.

Avatar
0
moritz.hofmann

Hello Nick,


I had exactly the same behavior with port 9443. Commands like /readcert or /listcert have worked but the upload with /addcert did not work.