Join the Conversation

To sign in, use your existing MySonicWall account. To create a free MySonicWall account click "Register".

SonicOS API

Has anyone ever used the SonicOS API on a gen 7 appliance to set the web management and/or the SSLVPN server certificate to self signed?

I have successfully tested authenticating, setting the session to config-mode, uploading a certificate and deleting a certificate.

My workflow is as follows:

Authenticate -> Set to Config Mode -> Set SSLVPN / Web Management to Self Signed -> delete old certificate -> upload new certificate -> Set SSLVPN / Web Management to new Certificate

You cannot delete the existing certificate if it is in use by any of the Sonicwall's servers

I've identified 2 models in the API documentation that look promising, but cannot get them to work despite many different ways of trying to implement it.

            web_management: 
              type: object
              description: "Configure web management."
              properties: 
                allow_http: 
                  type: boolean
                  description: "Allow HTTP management (it is less secure than using HTTPS)."

                certificate: 
                  type: object
                  description: "Set the HTTPS management certificate."
                  oneOf: 
                    - $ref: "#/components/schemas/administration_web_management_certificate_use_self_signed"
                    - $ref: "#/components/schemas/administration_web_management_certificate_name"

and

  ssl_vpn_server: 
      description: "SSL VPN server configuration."
      type: object
      properties: 
        ssl_vpn: 
          type: object
          description: "Configure SSL VPN."
          properties: 
            server: 
              type: object
              description: "Configure server settings."
              properties: 
                port: 
                  type: number
                  description: "Set SSL VPN server port."

                certificate: 
                  type: object
                  description: "Select SSL certificate to use for SSL VPN."
                  oneOf: 
                    - $ref: "#/components/schemas/ssl_vpn_server_certificate_use_self_signed"
                    - $ref: "#/components/schemas/ssl_vpn_server_certificate_name"

Any assistance is greatly appreciated!

Category: Firewall Management and Analytics
Reply
Sign In or Register to comment.