{
  "$schema" : "http://json-schema.org/draft-07/schema#",
  "definitions" : {
    "ConfigParamKey" : {
      "type" : "string",
      "pattern" : "^(?=[^=]+$)(?!\\s+$)(.|\\n)+$"
    },
    "EmailAddress" : {
      "type" : "string",
      "pattern" : "^.+@.+$",
      "format" : "gradle-enterprise:email-address",
      "description" : "Internet email address conforming to most of RFC 822 syntax rules and by that allowing a majority of internalized email addresses as well."
    },
    "EncryptedSecret" : {
      "type" : "string",
      "pattern" : "^(?:plain:.+|aes256:(?:\\s*[A-Za-z0-9+/]){16}:(?:\\s*[A-Za-z0-9+/]){16}:(?:(?:\\s*[A-Za-z0-9+/]){4})*(?:(?:\\s*[A-Za-z0-9+/]){2}(?:\\s*=){2}|(?:\\s*[A-Za-z0-9+/]){3}(?:\\s*=))?\\s*)$"
    },
    "HashedSecret" : {
      "type" : "string",
      "pattern" : "^(?:\\s*[A-Za-z0-9+/]){43}(?:\\s*=):(?:(?:\\s*[A-Za-z0-9+/]){4})*(?:(?:\\s*[A-Za-z0-9+/]){2}(?:\\s*=){2}|(?:\\s*[A-Za-z0-9+/]){3}(?:\\s*=))?\\s*$"
    },
    "Map(ConfigParamKey,String)" : {
      "type" : "object",
      "additionalProperties" : {
        "type" : "string"
      },
      "propertyNames" : {
        "$ref" : "#/definitions/ConfigParamKey"
      }
    },
    "Role" : {
      "type" : "object",
      "properties" : {
        "assignToNewExternalUsers" : {
          "type" : "boolean"
        },
        "description" : {
          "type" : [ "string", "null" ]
        },
        "displayName" : {
          "type" : [ "string", "null" ]
        },
        "externalValue" : {
          "type" : [ "string", "null" ]
        },
        "permissions" : {
          "uniqueItems" : true,
          "type" : "array",
          "items" : {
            "type" : "string",
            "enum" : [ "viewScan", "exportData", "administerGe", "administerProjects", "administerCache", "publishScan", "testDistribution", "readCache", "writeCache", "accessAllProjects", "accessAnonymousProjectData" ]
          }
        }
      },
      "additionalProperties" : false,
      "minProperties" : 1
    },
    "TimeOfDay" : {
      "type" : "string",
      "pattern" : "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
    }
  },
  "type" : "object",
  "required" : [ "systemPassword", "version" ],
  "description" : "Gradle Enterprise configuration schema",
  "additionalProperties" : false,
  "minProperties" : 1,
  "properties" : {
    "version" : {
      "const" : 7,
      "description" : "The version of the config file model (must be 7)."
    },
    "advanced" : {
      "type" : "object",
      "properties" : {
        "app" : {
          "type" : "object",
          "properties" : {
            "heapMemory" : {
              "type" : "integer",
              "description" : "The amount of heap memory allocated to the application",
              "minimum" : 100
            },
            "offHeapMemory" : {
              "type" : "integer",
              "description" : "The amount of off-heap memory allocated to the application",
              "minimum" : 100
            },
            "params" : {
              "allOf" : [ {
                "$ref" : "#/definitions/Map(ConfigParamKey,String)"
              }, {
                "description" : "Configuration parameters for the application"
              } ]
            },
            "scanPayloadCacheSize" : {
              "type" : "integer",
              "description" : "The amount of memory for the scan payload event stream cache"
            }
          },
          "additionalProperties" : false,
          "minProperties" : 1
        },
        "appBackgroundProcessor" : {
          "type" : "object",
          "properties" : {
            "heapMemory" : {
              "type" : "integer",
              "description" : "The amount of heap memory allocated to the application",
              "minimum" : 100
            },
            "offHeapMemory" : {
              "type" : "integer",
              "description" : "The amount of off-heap memory allocated to the application",
              "minimum" : 100
            },
            "params" : {
              "allOf" : [ {
                "$ref" : "#/definitions/Map(ConfigParamKey,String)"
              }, {
                "description" : "Configuration parameters for the application"
              } ]
            }
          },
          "additionalProperties" : false,
          "minProperties" : 1
        },
        "buildCacheNode" : {
          "type" : "object",
          "properties" : {
            "heapMemory" : {
              "type" : "integer",
              "description" : "The amount of heap memory allocated to the application",
              "minimum" : 100
            },
            "offHeapMemory" : {
              "type" : "integer",
              "description" : "The amount of off-heap memory allocated to the application",
              "minimum" : 100
            },
            "params" : {
              "allOf" : [ {
                "$ref" : "#/definitions/Map(ConfigParamKey,String)"
              }, {
                "description" : "Configuration parameters for the application"
              } ]
            }
          },
          "additionalProperties" : false,
          "minProperties" : 1
        },
        "distributionBroker" : {
          "type" : "object",
          "properties" : {
            "heapMemory" : {
              "type" : "integer",
              "description" : "The amount of heap memory allocated to the application",
              "minimum" : 100
            },
            "offHeapMemory" : {
              "type" : "integer",
              "description" : "The amount of off-heap memory allocated to the application",
              "minimum" : 100
            },
            "params" : {
              "allOf" : [ {
                "$ref" : "#/definitions/Map(ConfigParamKey,String)"
              }, {
                "description" : "Configuration parameters for the application"
              } ]
            }
          },
          "additionalProperties" : false,
          "minProperties" : 1
        }
      },
      "additionalProperties" : false,
      "minProperties" : 1
    },
    "auth" : {
      "type" : "object",
      "properties" : {
        "anonymousPermissions" : {
          "description" : "Permissions to assign to anonymous users - does not support administerGe, administerCache, or testDistribution",
          "uniqueItems" : true,
          "type" : "array",
          "items" : {
            "type" : "string",
            "enum" : [ "viewScan", "exportData", "administerGe", "administerProjects", "administerCache", "publishScan", "testDistribution", "readCache", "writeCache", "accessAllProjects", "accessAnonymousProjectData" ]
          }
        },
        "external" : {
          "anyOf" : [ {
            "type" : "null"
          }, {
            "type" : "object",
            "properties" : {
              "type" : {
                "enum" : [ "ldap", "saml" ]
              }
            },
            "required" : [ "type" ],
            "allOf" : [ {
              "if" : {
                "properties" : {
                  "type" : {
                    "const" : "ldap"
                  }
                }
              },
              "then" : {
                "type" : "object",
                "required" : [ "connectionUrl", "displayName", "roles", "users" ],
                "additionalProperties" : false,
                "minProperties" : 1,
                "properties" : {
                  "type" : {
                    "const" : "ldap"
                  },
                  "bindUser" : {
                    "type" : [ "object", "null" ],
                    "properties" : {
                      "dn" : {
                        "type" : "string",
                        "description" : "Distinguished name for the LDAP user account"
                      },
                      "password" : {
                        "allOf" : [ {
                          "$ref" : "#/definitions/EncryptedSecret"
                        }, {
                          "description" : "Password for the LDAP user account"
                        } ]
                      }
                    },
                    "required" : [ "dn", "password" ],
                    "additionalProperties" : false,
                    "minProperties" : 1,
                    "description" : "Binding information used when LDAP requires authentication"
                  },
                  "connectionUrl" : {
                    "type" : "string",
                    "description" : "URL used to connect to LDAP server"
                  },
                  "displayName" : {
                    "type" : "string",
                    "description" : "Name of this identity provider configuration"
                  },
                  "roles" : {
                    "allOf" : [ {
                      "if" : {
                        "properties" : {
                          "type" : {
                            "const" : "external"
                          }
                        }
                      },
                      "then" : {
                        "type" : "object",
                        "required" : [ "baseDn", "membershipAttribute", "membershipAttributeType", "nameAttribute", "objectClass" ],
                        "additionalProperties" : false,
                        "minProperties" : 1,
                        "properties" : {
                          "type" : {
                            "const" : "external"
                          },
                          "baseDn" : {
                            "type" : "string",
                            "description" : "Base DN for the subtree holding roles"
                          },
                          "membershipAttribute" : {
                            "type" : "string",
                            "description" : "Name of the LDAP attribute holding role membership"
                          },
                          "membershipAttributeType" : {
                            "type" : "string",
                            "enum" : [ "dn", "uid" ],
                            "description" : "Type of the membership-ldap-attribute"
                          },
                          "nameAttribute" : {
                            "type" : "string",
                            "description" : "Name of the LDAP attribute holding the role name"
                          },
                          "objectClass" : {
                            "type" : "string",
                            "description" : "LDAP object classes for roles"
                          },
                          "retrieveStrategy" : {
                            "type" : "string",
                            "enum" : [ "groupMember", "userMemberof", "matchingRuleInChain" ],
                            "description" : "Type of roles retrieve strategy (defaults to GROUP_MEMBER)"
                          }
                        }
                      }
                    }, {
                      "if" : {
                        "properties" : {
                          "type" : {
                            "const" : "local"
                          }
                        }
                      },
                      "then" : {
                        "type" : "object",
                        "additionalProperties" : false,
                        "minProperties" : 1,
                        "properties" : {
                          "type" : {
                            "const" : "local"
                          }
                        }
                      }
                    } ],
                    "type" : "object",
                    "properties" : {
                      "type" : {
                        "enum" : [ "external", "local" ]
                      }
                    },
                    "required" : [ "type" ],
                    "minProperties" : 1,
                    "description" : "Holds information when the identity provider manages roles"
                  },
                  "users" : {
                    "type" : "object",
                    "properties" : {
                      "attributes" : {
                        "type" : "object",
                        "properties" : {
                          "email" : {
                            "type" : "string",
                            "description" : "Name of the LDAP attribute holding email address"
                          },
                          "firstName" : {
                            "type" : "string",
                            "description" : "Name of the LDAP attribute holding first name"
                          },
                          "lastName" : {
                            "type" : "string",
                            "description" : "Name of the LDAP attribute holding last name"
                          },
                          "userName" : {
                            "type" : "string",
                            "description" : "Name of the LDAP attribute holding user name"
                          },
                          "uuid" : {
                            "type" : "string",
                            "description" : "Name of the LDAP attribute holding a unique id"
                          }
                        },
                        "required" : [ "email", "firstName", "lastName", "userName", "uuid" ],
                        "additionalProperties" : false,
                        "minProperties" : 1,
                        "description" : "Describes how user attributes are mapped"
                      },
                      "baseDn" : {
                        "type" : "string",
                        "description" : "Base DN for the subtree holding users"
                      },
                      "filter" : {
                        "allOf" : [ {
                          "type" : [ "string", "null" ],
                          "format" : "gradle-enterprise:ldap-filter",
                          "description" : "LDAP search filter expression."
                        }, {
                          "description" : "Optional LDAP filter expression to limit access"
                        } ]
                      }
                    },
                    "required" : [ "attributes", "baseDn" ],
                    "additionalProperties" : false,
                    "minProperties" : 1
                  }
                }
              }
            }, {
              "if" : {
                "properties" : {
                  "type" : {
                    "const" : "saml"
                  }
                }
              },
              "then" : {
                "type" : "object",
                "required" : [ "displayName", "idpMetadata", "roles" ],
                "additionalProperties" : false,
                "minProperties" : 1,
                "properties" : {
                  "type" : {
                    "const" : "saml"
                  },
                  "displayName" : {
                    "type" : "string",
                    "description" : "Name of this identity provider configuration"
                  },
                  "idpMetadata" : {
                    "type" : "string",
                    "pattern" : "^(?:(?:\\s*[A-Za-z0-9+/]){4})*(?:(?:\\s*[A-Za-z0-9+/]){2}(?:\\s*=){2}|(?:\\s*[A-Za-z0-9+/]){3}(?:\\s*=))?\\s*$",
                    "description" : "SAML metadata that describes this identity provider"
                  },
                  "options" : {
                    "type" : "object",
                    "properties" : {
                      "requireEncryptedAssertion" : {
                        "type" : "boolean",
                        "description" : "Encrypt SAML assertions?"
                      },
                      "signAuthenticationRequests" : {
                        "type" : "boolean",
                        "description" : "Sign authentication requests?"
                      },
                      "validateAssertionSignature" : {
                        "type" : "boolean",
                        "description" : "Enable signature validation of SAML assertions?"
                      },
                      "validateResponseSignature" : {
                        "type" : "boolean",
                        "description" : "Enable signature validation of SAML responses?"
                      }
                    },
                    "additionalProperties" : false,
                    "minProperties" : 1,
                    "description" : "Groups all options and is only necessary when one or more needs to be enabled"
                  },
                  "roles" : {
                    "allOf" : [ {
                      "if" : {
                        "properties" : {
                          "type" : {
                            "const" : "external"
                          }
                        }
                      },
                      "then" : {
                        "type" : "object",
                        "required" : [ "attribute" ],
                        "additionalProperties" : false,
                        "minProperties" : 1,
                        "properties" : {
                          "type" : {
                            "const" : "external"
                          },
                          "attribute" : {
                            "type" : "string",
                            "description" : "Name of the SAML attribute holding role names"
                          }
                        }
                      }
                    }, {
                      "if" : {
                        "properties" : {
                          "type" : {
                            "const" : "local"
                          }
                        }
                      },
                      "then" : {
                        "type" : "object",
                        "additionalProperties" : false,
                        "minProperties" : 1,
                        "properties" : {
                          "type" : {
                            "const" : "local"
                          }
                        }
                      }
                    } ],
                    "type" : "object",
                    "properties" : {
                      "type" : {
                        "enum" : [ "external", "local" ]
                      }
                    },
                    "required" : [ "type" ],
                    "minProperties" : 1,
                    "description" : "Holds information when the identity provider manages roles"
                  },
                  "userAttributes" : {
                    "type" : "object",
                    "properties" : {
                      "email" : {
                        "type" : [ "string", "null" ],
                        "description" : "Name of the SAML attribute holding email address"
                      },
                      "firstName" : {
                        "type" : [ "string", "null" ],
                        "description" : "Name of the SAML attribute holding first name"
                      },
                      "lastName" : {
                        "type" : [ "string", "null" ],
                        "description" : "Name of the SAML attribute holding last name"
                      }
                    },
                    "additionalProperties" : false,
                    "minProperties" : 1,
                    "description" : "Describes how user attributes are mapped"
                  }
                }
              }
            } ],
            "minProperties" : 1
          } ]
        },
        "roles" : {
          "type" : "object",
          "additionalProperties" : {
            "$ref" : "#/definitions/Role"
          },
          "propertyNames" : {
            "type" : "string"
          }
        },
        "scim" : {
          "type" : "object",
          "properties" : {
            "enabled" : {
              "type" : "boolean",
              "description" : "Whether to allow access to the SCIM API for user and group management"
            },
            "token" : {
              "type" : [ "object", "null" ],
              "properties" : {
                "hash" : {
                  "allOf" : [ {
                    "$ref" : "#/definitions/HashedSecret"
                  }, {
                    "description" : "The hash of the token"
                  } ]
                },
                "length" : {
                  "type" : "integer",
                  "description" : "The length of the token"
                },
                "prefix" : {
                  "type" : "string",
                  "description" : "The prefix of the token"
                }
              },
              "required" : [ "hash", "length", "prefix" ],
              "additionalProperties" : false,
              "minProperties" : 1,
              "description" : "Token to authenticate with the SCIM API"
            }
          },
          "additionalProperties" : false,
          "minProperties" : 1,
          "description" : "Configuration for System for Cross-domain Identity Management (SCIM) support"
        },
        "timeouts" : {
          "type" : "object",
          "properties" : {
            "accessTokenLifespan" : {
              "type" : "integer",
              "description" : "The maximum time before an access token is expired (in minutes), default is 10 minutes"
            },
            "ssoSessionIdleTimeout" : {
              "type" : "integer",
              "description" : "The time a login session is allowed to be idle before it expires (in minutes), default is 4 days (5760 minutes)"
            },
            "ssoSessionMaxLifespan" : {
              "type" : "integer",
              "description" : "The maximum time before a login session is expired (in minutes), default is 30 days (43200 minutes)"
            }
          },
          "additionalProperties" : false,
          "minProperties" : 1,
          "description" : "Timeouts you can specify for user logins in Gradle Enterprise"
        }
      },
      "additionalProperties" : false,
      "minProperties" : 1,
      "description" : "Configuration of Gradle Enterprise authentication options"
    },
    "backups" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "backupsToRetain" : {
          "type" : "integer",
          "description" : "How many old backups to keep",
          "minimum" : 1
        },
        "emailNotification" : {
          "type" : "boolean",
          "description" : "Send an email when backup is complete"
        },
        "schedule" : {
          "type" : "object",
          "properties" : {
            "type" : {
              "enum" : [ "daily", "weekly", "cron" ]
            }
          },
          "required" : [ "type" ],
          "allOf" : [ {
            "if" : {
              "properties" : {
                "type" : {
                  "const" : "daily"
                }
              }
            },
            "then" : {
              "type" : "object",
              "required" : [ "timeOfDay" ],
              "additionalProperties" : false,
              "minProperties" : 1,
              "properties" : {
                "type" : {
                  "const" : "daily"
                },
                "timeOfDay" : {
                  "allOf" : [ {
                    "$ref" : "#/definitions/TimeOfDay"
                  }, {
                    "description" : "Time (in UTC) to perform the backup"
                  } ]
                }
              }
            }
          }, {
            "if" : {
              "properties" : {
                "type" : {
                  "const" : "weekly"
                }
              }
            },
            "then" : {
              "type" : "object",
              "required" : [ "dayOfWeek", "timeOfDay" ],
              "additionalProperties" : false,
              "minProperties" : 1,
              "properties" : {
                "type" : {
                  "const" : "weekly"
                },
                "dayOfWeek" : {
                  "type" : "string",
                  "enum" : [ "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday" ],
                  "description" : "Day (in UTC) to perform the backup"
                },
                "timeOfDay" : {
                  "allOf" : [ {
                    "$ref" : "#/definitions/TimeOfDay"
                  }, {
                    "description" : "Time (in UTC) to perform the backup"
                  } ]
                }
              }
            }
          }, {
            "if" : {
              "properties" : {
                "type" : {
                  "const" : "cron"
                }
              }
            },
            "then" : {
              "type" : "object",
              "required" : [ "expression" ],
              "additionalProperties" : false,
              "minProperties" : 1,
              "properties" : {
                "type" : {
                  "const" : "cron"
                },
                "expression" : {
                  "type" : "string",
                  "pattern" : "^(?:\\*|(?:(?:\\*\\/)?[1-5]?[0-9])) (?:\\*|(?:(?:\\*\\/)?(?:1?[0-9]|2[0-3]))) (?:\\*|(?:(?:\\*\\/)?(?:[1-9]|[12][0-9]|3[0-1]))) (?:\\*|(?:(?:\\*\\/)?(?:[1-9]|1[0-2]))) (?:\\*|(?:(?:\\*\\/)?[0-6]))$",
                  "description" : "Custom cron expression for backup time"
                }
              }
            }
          } ],
          "minProperties" : 1
        }
      },
      "required" : [ "schedule" ],
      "additionalProperties" : false,
      "minProperties" : 1,
      "description" : "Automatic backup configuration"
    },
    "buildCache" : {
      "type" : "object",
      "properties" : {
        "allowUntrustedNodeSsl" : {
          "type" : "boolean",
          "description" : "Allow communication with nodes running over untrusted SSL"
        }
      },
      "additionalProperties" : false,
      "minProperties" : 1,
      "description" : "Configuration specific to the build cache app"
    },
    "buildScans" : {
      "type" : "object",
      "properties" : {
        "diskSpaceMonitoring" : {
          "type" : "object",
          "properties" : {
            "autoDeleteWhileFreeSpaceLessThanPercentage" : {
              "type" : [ "integer", "null" ],
              "description" : "Threshold of free disk space before old scans will be automatically deleted",
              "maximum" : 100,
              "minimum" : 1
            },
            "rejectIncomingWhileFreeSpaceLessThanPercentage" : {
              "type" : [ "integer", "null" ],
              "description" : "Threshold of free disk space before new scans will be rejected",
              "maximum" : 100,
              "minimum" : 1
            },
            "sendWarningEmailWhenFreeSpaceLessThanPercentage" : {
              "type" : [ "integer", "null" ],
              "description" : "Threshold of free disk space before a warning is sent to users publishing a build scan",
              "maximum" : 100,
              "minimum" : 1
            }
          },
          "additionalProperties" : false,
          "minProperties" : 1
        },
        "incomingStorageType" : {
          "anyOf" : [ {
            "type" : "null"
          }, {
            "type" : "string",
            "enum" : [ null, "database", "objectStorage" ],
            "description" : "Storage type of incoming builds"
          } ]
        },
        "keepDays" : {
          "type" : [ "integer", "null" ],
          "description" : "How many days of scans should be retained",
          "minimum" : 2
        }
      },
      "additionalProperties" : false,
      "minProperties" : 1,
      "description" : "Configuration specific to the build scans app"
    },
    "dailyMaintenanceTime" : {
      "allOf" : [ {
        "$ref" : "#/definitions/TimeOfDay"
      }, {
        "description" : "Which time (UTC) should retention-cleanup be performed"
      } ]
    },
    "email" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "administratorAddress" : {
          "allOf" : [ {
            "$ref" : "#/definitions/EmailAddress"
          }, {
            "description" : "Email address notifications are sent to"
          } ]
        },
        "authentication" : {
          "type" : [ "object", "null" ],
          "properties" : {
            "password" : {
              "$ref" : "#/definitions/EncryptedSecret"
            },
            "type" : {
              "type" : "string",
              "enum" : [ "login", "cramMd5", "plain" ]
            },
            "username" : {
              "type" : "string"
            }
          },
          "required" : [ "password", "type", "username" ],
          "additionalProperties" : false,
          "minProperties" : 1,
          "description" : "SMTP authentication method"
        },
        "fromAddress" : {
          "allOf" : [ {
            "$ref" : "#/definitions/EmailAddress"
          }, {
            "description" : "Email address notifications are sent from"
          } ]
        },
        "smtpServer" : {
          "type" : "string",
          "pattern" : "^(?:(?:(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])|(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*(?:[A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])):(?:[1-9][0-9]{0,3}|[1-6][0-5][0-5][0-3][0-5])$",
          "description" : "Address and port of the smtp server"
        },
        "sslProtocol" : {
          "anyOf" : [ {
            "type" : "null"
          }, {
            "type" : "string",
            "enum" : [ null, "startTls", "implicitTls" ],
            "description" : "SMTP protocol flavour"
          } ]
        }
      },
      "required" : [ "administratorAddress", "fromAddress", "smtpServer" ],
      "additionalProperties" : false,
      "minProperties" : 1,
      "description" : "SMTP configuration for notifications"
    },
    "helpContact" : {
      "type" : "object",
      "properties" : {
        "email" : {
          "anyOf" : [ {
            "type" : "null"
          }, {
            "$ref" : "#/definitions/EmailAddress"
          } ],
          "description" : "The email address users should contact"
        },
        "name" : {
          "type" : [ "string", "null" ],
          "description" : "The name of the contact"
        }
      },
      "additionalProperties" : false,
      "minProperties" : 1,
      "description" : "Who users should contact if they have a problem"
    },
    "network" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "additionalTrust" : {
          "type" : [ "string", "null" ],
          "pattern" : "(?:^|\\r?\\n)-----BEGIN CERTIFICATE-----(?:\\r?\\n)(?:(?:\\s*[A-Za-z0-9+/]){4})*(?:(?:\\s*[A-Za-z0-9+/]){2}(?:\\s*=){2}|(?:\\s*[A-Za-z0-9+/]){3}(?:\\s*=))?\\s*(?:\\r?\\n)-----END CERTIFICATE-----(?:$|\\r?\\n)",
          "format" : "gradle-enterprise:x509-certs-pem",
          "description" : "Required if Gradle Enterprise must communicate with servers using certificates not trusted by default"
        },
        "proxy" : {
          "type" : [ "object", "null" ],
          "properties" : {
            "auth" : {
              "type" : [ "object", "null" ],
              "properties" : {
                "password" : {
                  "allOf" : [ {
                    "$ref" : "#/definitions/EncryptedSecret"
                  }, {
                    "description" : "Proxy password"
                  } ]
                },
                "username" : {
                  "type" : "string",
                  "description" : "Proxy username"
                }
              },
              "required" : [ "password", "username" ],
              "additionalProperties" : false,
              "minProperties" : 1,
              "description" : "Proxy authentication credentials"
            },
            "excludedHosts" : {
              "description" : "A list of hosts that should not be proxied",
              "type" : "array",
              "items" : {
                "type" : "string",
                "pattern" : "^(?:(?:(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])|(?:(?:^[\\*]|[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*(?:[A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9]))$",
                "format" : "gradle-enterprise:excludedHosts"
              }
            },
            "host" : {
              "type" : "string",
              "pattern" : "^(?:(?:(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])|(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*(?:[A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9]))$",
              "format" : "gradle-enterprise:host",
              "description" : "Proxy host"
            },
            "port" : {
              "type" : "integer",
              "description" : "Proxy port",
              "maximum" : 65535,
              "minimum" : 1
            },
            "protocol" : {
              "type" : "string",
              "enum" : [ "http", "https" ],
              "description" : "Proxy protocol"
            }
          },
          "required" : [ "host" ],
          "additionalProperties" : false,
          "minProperties" : 1,
          "description" : "Http proxy config"
        }
      },
      "additionalProperties" : false,
      "minProperties" : 1,
      "description" : "Network configuration"
    },
    "objectStorage" : {
      "type" : "object",
      "properties" : {
        "provider" : {
          "anyOf" : [ {
            "type" : "null"
          }, {
            "type" : "object",
            "properties" : {
              "type" : {
                "enum" : [ "s3" ]
              }
            },
            "required" : [ "type" ],
            "allOf" : [ {
              "if" : {
                "properties" : {
                  "type" : {
                    "const" : "s3"
                  }
                }
              },
              "then" : {
                "type" : "object",
                "required" : [ "bucket", "credentials", "region" ],
                "additionalProperties" : false,
                "minProperties" : 1,
                "properties" : {
                  "type" : {
                    "const" : "s3"
                  },
                  "bucket" : {
                    "type" : "string",
                    "description" : "The name of the bucket to store the scan payloads"
                  },
                  "credentials" : {
                    "allOf" : [ {
                      "if" : {
                        "properties" : {
                          "source" : {
                            "const" : "configuration"
                          }
                        }
                      },
                      "then" : {
                        "type" : "object",
                        "required" : [ "accessKey", "secretKey" ],
                        "additionalProperties" : false,
                        "minProperties" : 1,
                        "properties" : {
                          "source" : {
                            "const" : "configuration"
                          },
                          "accessKey" : {
                            "type" : "string"
                          },
                          "secretKey" : {
                            "$ref" : "#/definitions/EncryptedSecret"
                          }
                        }
                      }
                    }, {
                      "if" : {
                        "properties" : {
                          "source" : {
                            "const" : "environment"
                          }
                        }
                      },
                      "then" : {
                        "type" : "object",
                        "additionalProperties" : false,
                        "minProperties" : 1,
                        "properties" : {
                          "source" : {
                            "const" : "environment"
                          }
                        }
                      }
                    } ],
                    "type" : "object",
                    "properties" : {
                      "source" : {
                        "enum" : [ "configuration", "environment" ]
                      }
                    },
                    "required" : [ "source" ],
                    "minProperties" : 1,
                    "description" : "The aws credentials"
                  },
                  "region" : {
                    "type" : "string",
                    "description" : "The region of the bucket"
                  }
                }
              }
            } ],
            "minProperties" : 1
          } ]
        }
      },
      "additionalProperties" : false,
      "minProperties" : 1,
      "description" : "Object Storage configuration"
    },
    "systemPassword" : {
      "allOf" : [ {
        "$ref" : "#/definitions/HashedSecret"
      }, {
        "description" : "The password for the system user"
      } ]
    }
  }
}