I am trying to import private key using restman's import API restman/1.0/privateKeys/000000000000000000000000000001123:nn%20issuer/import. And this is my request xml which I am trying to send in the request.
But I am getting following error, can you please help me out?
Status: 403 ForbiddenServer: Apache-Coyote/1.1Content-Length: 468Date: Wed, 02 Aug 2017 14:58:17 GMTContent-Type: application/xml<?xml version="1.0" encoding="UTF-8" standalone="yes"?><l7:Error xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management"> <l7:Type>ResourceAccess</l7:Type> <l7:TimeStamp>2017-08-02T20:28:17.263+05:30</l7:TimeStamp> <l7:Link rel="self" uri="https://iii.com:8443/restman/1.0/privateKeys/000000000000000000000000000001123:nnt%20issuer/import"/> <l7:Detail>PKCS12 key store mac invalid - wrong password or corrupted file.</l7:Detail></l7:Error>
I have tried other generated keys as well but response remains the same.#####
Looks like your issue is the id of the key you are specifying
Try using a valid id like this the first part is the id of the default gateway keystone and is always 00000000000000000000000000000002, the second part is the alias to use for the key.
I was able to use the body for supplied and import the private key
I tried same key with the same key id and alias name through restman using GMU and got the below error. Not sure whether the error mentioned in the response is correct since the key seems to be valid.
Status: 403 ForbiddenServer: Apache-Coyote/1.1Content-Length: 468Date: Thu, 03 Aug 2017 12:46:23 GMTContent-Type: application/xml<?xml version="1.0" encoding="UTF-8" standalone="yes"?><l7:Error xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management"> <l7:Type>ResourceAccess</l7:Type> <l7:TimeStamp>2017-08-03T18:16:23.773+05:30</l7:TimeStamp> <l7:Link rel="self" uri="https://iii.com:8443/restman/1.0/privateKeys/00000000000000000000000000000002:jwt%20issuer/import"/> <l7:Detail>PKCS12 key store mac invalid - wrong password or corrupted file.</l7:Detail></l7:Error>
You made a statement that you are using GMU. Would you outline what you are doing with the GMU in the sense of bundle information? The work that Barry and I have tried was directly to the Restman endpoint and we both did not see an issue. I used RestClient through Firefox to test and I did not see the same error you were presented.
Director, CA Support
I was trying to import private key using GMU by hitting restman's API and sending xml file in the request.
I was able to import it using Firefox's rest client but not through GMU, here is the command I am using and request xml.
GatewayMigrationUtility.bat restman --header Content-Type:application/xml --method POST --path 1.0/privateKeys/00000000000000000000000000000002:jwt%20issuer/import --request C:\projects\requests\request_import_private_key.xml -z C:\projects\ssg_awsi.properties
Content of request_import_private_key.xml is:-
I've attempted to execute the command that you outlined above and was able to successful upload the private key. Just a note that I was testing this against a 9.2 version of the Gateway with GMU version 1.4.
Thanks for your reply, I was using the 1.3 version of GMU and 9.1 of Gateway where error message was not enough to explain the cause, but when I tried GMU 1.4 with Gateway 9.1 only, I got the proper reason why it was not working.
Were you able to determine the issue and correct based on the feedback of using the newer version of the GMU?
Yes, I got the exact error in GMU 1.4 stating that "key already present" while in 1.3 I was getting "wrong password or corrupted file".