{
  "factory": {
    "id": "abstract-keystore",
    "type": "entaxy.security.keystore",
    "description": "Factory abstract-keystore of entaxy.security.keystore"
  },
  "entaxy.security.keystore": {},
  "fields": {
    "keystoreType": {
      "displayName": "Keystore Type",
      "type": "String",
      "required": true,
      "immutable": true
    },
    "contentAlgorithm": {
      "@NOT_USED": true,
      "type": "String",
      "required": true,
      "isHidden": true,
      "defaultValue": "A128GCM"
    },
    "keyAlgorithm": {
      "@NOT_USED": true,
      "type": "String",
      "required": true,
      "isHidden": true,
      "defaultValue": "RSA-OAEP"
    },
    "signatureAlgorithm": {
      "@NOT_USED": true,
      "type": "String",
      "required": true,
      "isHidden": true,
      "defaultValue": "RS256"
    },
    "keystorePassword": {
      "displayName": "Keystore Password",
      "description": "The password for the keystore. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/keystores.html\">Entaxy docs</a>",
      "type": "password",
      "required": true,
      "isHidden": true
    },
    "keystorePropertiesFile": {
      "type": "properties",
      "required": true,
      "isHidden": true,
      "@INTERNAL": true,
      "_isRef": true,
      "@RESOURCE": {
        "endType": "String",
        "provider": "entaxy-keystore",
        "location": {
          "@CALCULATED": {
            "expression": "${#OWNER#.objectId}.properties",
            "lazy": false
          }
        },
        "scope": "runtime"
      },
      "defaultValue": {
        "factoryId": "#OWNER#",
        "type": "entaxy.security.keystore",
        "outputType": "keystorePropertiesFile",
        "scope": "public",
        "properties": {
          "alias": {
            "@CALCULATED": {
              "expression": "${#OWNER#.objectId}",
              "lazy": false,
              "resultType": "String"
            }
          },
          "type": {
            "@CALCULATED": {
              "expression": "${#OWNER#.properties.keystoreType}",
              "lazy": false,
              "resultType": "String"
            }
          },
          "url": {
            "@CALCULATED": {
              "expression": "entaxy-resource://entaxy-keystore/${#OWNER#.objectId}.${#OWNER#.properties.keystoreType}",
              "lazy": false,
              "resultType": "String"
            }
          },
          "keystorePassword": {
            "@CALCULATED": {
              "expression": "${#OWNER#.properties.keystorePassword}",
              "lazy": false,
              "resultType": "String"
            }
          }
        },
        "refConfig": {
          "isRefByValueOnly": true
        }
      }
    },
    "keystoreFile": {
      "displayName": "Keystore File",
      "description": "A field for uploading the keystore file that contains cryptographic keys and certificates. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/keystores.html\">Entaxy docs</a>",
      "type": "resource",
      "@UI": {
        "processStage": "post-save",
        "resourceProviderProtocol": "entaxy-keystore",
        "resourceFilenameSourceField": "objectId",
        "resourceFilenameExtensionSourceField": "keystoreType"
      }
    },
    "##publish": {
      "defaultValue": {
        "keystoreType": {
          "@CALCULATED": {
            "expression": "${properties.keystoreType}",
            "lazy": false
          }
        },
        "keystoreUrl": {
          "@CALCULATED": {
            "expression": "entaxy-resource://entaxy-keystore/${objectId}.${properties.keystoreType}",
            "lazy": false
          }
        }
      }
    }
  },
  "outputs": {
    "init": {
      "isDefault": true,
      "config": {
        "configurable": false
      },
      "fields": {
        "keystoreType": {},
        "keystorePassword": {},
        "keystorePropertiesFile": {},
        "keystoreFile": {}
      }
    },
    "keystorePropertiesFile": {
      "config": {
        "configurable": false
      },
      "scopes": [
        "public"
      ],
      "fields": {
        "alias": {},
        "type": {},
        "url": {},
        "keystorePassword": {}
      }
    }
  }
}
