Options

Upload SSL certs to an A10 vThunder via axapi v3.0

LeighLeigh Member
edited September 2022 in ADC - Application Delivery
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.

Comments

  • Options
    edited July 2018
    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
      }
    }'
    
  • Options
    LeighLeigh Member
    edited July 2018
    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)
  • Options
    edited July 2018
    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"
    }
    }
  • Options

    In case anyone else gets to this post, the answer is over in another very similar question: https://community.a10networks.com/discussion/16789/upload-ssl-certs-via-axapi-v3-0

Sign In or Register to comment.