Forum Discussion

Blowfish's avatar
Blowfish
Icon for Nimbostratus rankNimbostratus
Feb 13, 2025
Solved

Declaration for loading Cert/PrivKey in Common

Dear F5 enthousiasts, I want to add a certificate and a private key to my F5 through a AS3 declaration under System > Certificate Management. The certificate must be placed under the /Common partiti...
  • Michael_Saleem's avatar
    Feb 13, 2025

    Hi,

    I don't think it's possible to upload directly to /Common. You can only upload to /Common/Shared (in order to avoid conflicts with manual LTM configuration)

    Reference: BIG-IP AS3 Frequently Asked Questions (FAQ)

    When does BIG-IP AS3 write to the Common partition for LTM configurations?

    • As noted above, BIG-IP AS3 only writes to the Common partition when you specifically use /Common/Shared. Otherwise, BIG-IP AS3 does not write to the Common partition for LTM configurations to ensure there is no impact to an existing device configuration where both BIG-IP AS3 and legacy configuration methods are being used


    So, using your example declaration, I think you would need to adjust it like so:

    {
      "$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/master/schema/latest/as3-schema.json",
      "class": "AS3",
      "action": "deploy",
      "declaration": {
        "class": "ADC",
        "schemaVersion": "3.45.0",
        "id": "import-cert",
        "label": "Certificate Import",
        "Common": {
          "class": "Tenant",
          "Shared": {
            "class": "Application",
            "template": "shared",
            "myCertName": {
            "class": "Certificate",
            "certificate": {
              "base64": "<base64 encoded certificate>"
            },
            "privateKey": {
              "base64": "<base64 encoded private key>"
            }
           }
          }
        }
      }
    }