$schema: https://json-schema.org/draft/2020-12/schema
title: ester policy
description: CA policy configuration for ester
definitions:
  scriptable:
    oneOf:
    - type: string
    - type: object
      required:
      - script
      additionalProperties: false
      properties:
        script:
          type: string
        interpreter:
          type: string
  reltime:
    oneOf:
    - type: integer
    - type: string
      pattern: "^[1-9][0-9]*[smhdwy]$"
type: object
additionalProperties: false
properties:
  issue:
    type: object
    additionalProperties: false
    properties:
      hash:
        enum:
        - sha1
        - sha256
        - sha384
        - sha512
      keys:
        type: object
        additionalProperties: false
        properties:
          rsa:
            type: object
            properties:
              size:
                type: integer
                minimum: 1
      approval:
        $ref: "#/definitions/scriptable"
      verdict:
        $ref: "#/definitions/scriptable"
      challenge:
        $ref: "#/definitions/scriptable"
  crl:
    type: object
    required:
    - interval
    - lifetime
    additionalProperties: false
    properties:
      interval:
        $ref: "#/definitions/reltime"
      lifetime:
        $ref: "#/definitions/reltime"
      deploy:
        $ref: "#/definitions/scriptable"
      uris:
        type: array
        items:
          type: string
  expire:
    type: object
    required:
    - notify
    additionalProperties: false
    properties:
      notify:
        $ref: "#/definitions/scriptable"
      warn-at:
        type: array
        maxItems: 8
        items:
          $ref: "#/definitions/reltime"
  static:
    type: object
    additionalProperties: false
    patternProperties:
      ^\/.*$:
        type: object
        required:
        - path
        properties:
          path:
            type: string
          indexes:
            type: array
            items:
              type: string
