Upload SSL certs via axapi v3.0

Community Forum Forums Thunder and AX Series Upload SSL certs via axapi v3.0

This topic contains 3 replies, has 3 voices, and was last updated by avatar jsharma 2 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14762
    avatar
    Leigh
    Member

    Hi All,
    Can anybody tell me how to upload SSL Certs to an A10 vThunder via axapi 3.0? I want the certificate to be in the payload of the request, rather than having it on a remote server, as I don’t want the A10 to be able to connect to outside servers.

    Thanks.

    #14772
    avatar
    tjones
    Member

    Hi Leigh,

    Try these.

    Import certificate:

    curl -X POST \
      https://192.168.0.153/axapi/v3/import \
      -H 'authorization: A10 61affb2fec3de67a5da205f921023b' \
      -H 'content-type: application/json' \
      -d '{
    "import": {
      "ssl-cert": "sd-san.crt",
      "certificate-type":"pem",
      "overwrite":"1",
      "remote-file": "scp://admin:password@192.168.0.18:/private/tftpboot/sd-san.crt",
      "use-mgmt-port": 1
      }
    }'
    

    Import certificate key:

    
    curl -X POST \
      https://192.168.0.153/axapi/v3/import \
      -H 'authorization: A10 61affb2fec3de67a5da205f921023b' \
      -H 'content-type: application/json' \
      -d '{
    "import": {
      "ssl-key": "sd-san.key",
      "overwrite":"1",
      "remote-file": "scp://admin:password@192.168.0.18:/private/tftpboot/sd-san.key",
      "use-mgmt-port": 1
      }
    }'
    
    #14792
    avatar
    Leigh
    Member

    The ‘remote-file’ part is the bit I didn’t want to do. I want to be able to upload the cert in the request, rather than specify a remote location.
    I don’t want our A10 to be able to scp from another server. (or tftp, or http, or whatever)

    #14812
    avatar
    jsharma
    Member

    You can also try with a POST to this URI: /axapi/v3/file/ssl-cert

    {
    “ssl-cert”:{
    “file”:”certificate”,
    “certificate-type”:”pem”,
    “file-handle”:”certificate.pem”,
    “action”:”import”
    }
    }

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Comments are closed.