{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/gradle-enterprise/versions/8.0.json",
  "description": "Gradle Enterprise configuration schema",
  "x-lintel": {
    "source": "https://docs.gradle.com/develocity/helm-admin/schema/gradle-enterprise-config-schema-8.json",
    "sourceSha256": "6cd387a245b9dd6f06488ccec392cc098f9dd92ef7094e0f7deef780c0cec839",
    "fileMatch": [
      "*gradle-enterprise.yml",
      "*gradle-enterprise.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "version": {
      "const": 8,
      "description": "The version of the config file model (must be 8)."
    },
    "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": "#/$defs/Map(ConfigParamKey,String)"
                },
                {
                  "description": "Configuration parameters for the application"
                }
              ]
            },
            "scanPayloadCacheSize": {
              "type": "integer",
              "description": "The amount of memory for the scan payload event stream cache"
            }
          },
          "minProperties": 1,
          "additionalProperties": false
        },
        "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": "#/$defs/Map(ConfigParamKey,String)"
                },
                {
                  "description": "Configuration parameters for the application"
                }
              ]
            }
          },
          "minProperties": 1,
          "additionalProperties": false
        },
        "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": "#/$defs/Map(ConfigParamKey,String)"
                },
                {
                  "description": "Configuration parameters for the application"
                }
              ]
            }
          },
          "minProperties": 1,
          "additionalProperties": false
        },
        "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": "#/$defs/Map(ConfigParamKey,String)"
                },
                {
                  "description": "Configuration parameters for the application"
                }
              ]
            }
          },
          "minProperties": 1,
          "additionalProperties": false
        }
      },
      "minProperties": 1,
      "additionalProperties": false
    },
    "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",
              "accessAllDataWithOrWithoutAssociatedProject",
              "accessDataWithoutAssociatedProject",
              "readCacheWriteCas"
            ]
          }
        },
        "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"
                    ],
                    "properties": {
                      "type": {
                        "const": "ldap"
                      },
                      "bindUser": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "dn": {
                            "type": "string",
                            "description": "Distinguished name for the LDAP user account"
                          },
                          "password": {
                            "allOf": [
                              {
                                "$ref": "#/$defs/EncryptedSecret"
                              },
                              {
                                "description": "Password for the LDAP user account"
                              }
                            ]
                          }
                        },
                        "required": [
                          "dn",
                          "password"
                        ],
                        "description": "Binding information used when LDAP requires authentication",
                        "minProperties": 1,
                        "additionalProperties": false
                      },
                      "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"
                              ],
                              "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)"
                                }
                              },
                              "minProperties": 1,
                              "additionalProperties": false
                            }
                          },
                          {
                            "if": {
                              "properties": {
                                "type": {
                                  "const": "local"
                                }
                              }
                            },
                            "then": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "const": "local"
                                }
                              },
                              "minProperties": 1,
                              "additionalProperties": false
                            }
                          }
                        ],
                        "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"
                            ],
                            "description": "Describes how user attributes are mapped",
                            "minProperties": 1,
                            "additionalProperties": false
                          },
                          "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"
                        ],
                        "minProperties": 1,
                        "additionalProperties": false
                      }
                    },
                    "minProperties": 1,
                    "additionalProperties": false
                  }
                },
                {
                  "if": {
                    "properties": {
                      "type": {
                        "const": "saml"
                      }
                    }
                  },
                  "then": {
                    "type": "object",
                    "required": [
                      "displayName",
                      "idpMetadata",
                      "roles"
                    ],
                    "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?"
                          }
                        },
                        "description": "Groups all options and is only necessary when one or more needs to be enabled",
                        "minProperties": 1,
                        "additionalProperties": false
                      },
                      "roles": {
                        "allOf": [
                          {
                            "if": {
                              "properties": {
                                "type": {
                                  "const": "external"
                                }
                              }
                            },
                            "then": {
                              "type": "object",
                              "required": [
                                "attribute"
                              ],
                              "properties": {
                                "type": {
                                  "const": "external"
                                },
                                "attribute": {
                                  "type": "string",
                                  "description": "Name of the SAML attribute holding role names"
                                }
                              },
                              "minProperties": 1,
                              "additionalProperties": false
                            }
                          },
                          {
                            "if": {
                              "properties": {
                                "type": {
                                  "const": "local"
                                }
                              }
                            },
                            "then": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "const": "local"
                                }
                              },
                              "minProperties": 1,
                              "additionalProperties": false
                            }
                          }
                        ],
                        "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"
                          }
                        },
                        "description": "Describes how user attributes are mapped",
                        "minProperties": 1,
                        "additionalProperties": false
                      }
                    },
                    "minProperties": 1,
                    "additionalProperties": false
                  }
                }
              ],
              "minProperties": 1
            }
          ]
        },
        "projects": {
          "type": "object",
          "properties": {
            "acceptAnonymousProjects": {
              "type": "boolean",
              "description": "Accept data from builds not associated with a project. Also allows build acceleration features (build caching, test distribution, etc) to work with builds not associated with a project."
            },
            "enabled": {
              "type": "boolean",
              "description": "Enables per-project access control."
            }
          },
          "description": "Configuration of project access control related options",
          "minProperties": 1,
          "additionalProperties": false
        },
        "roles": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/Role"
          }
        },
        "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": "#/$defs/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"
              ],
              "description": "Token to authenticate with the SCIM API",
              "minProperties": 1,
              "additionalProperties": false
            }
          },
          "description": "Configuration for System for Cross-domain Identity Management (SCIM) support",
          "minProperties": 1,
          "additionalProperties": false
        },
        "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)"
            }
          },
          "description": "Timeouts you can specify for user logins in Gradle Enterprise",
          "minProperties": 1,
          "additionalProperties": false
        }
      },
      "description": "Configuration of Gradle Enterprise authentication options",
      "minProperties": 1,
      "additionalProperties": false
    },
    "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"
                ],
                "properties": {
                  "type": {
                    "const": "daily"
                  },
                  "timeOfDay": {
                    "allOf": [
                      {
                        "$ref": "#/$defs/TimeOfDay"
                      },
                      {
                        "description": "Time (in UTC) to perform the backup"
                      }
                    ]
                  }
                },
                "minProperties": 1,
                "additionalProperties": false
              }
            },
            {
              "if": {
                "properties": {
                  "type": {
                    "const": "weekly"
                  }
                }
              },
              "then": {
                "type": "object",
                "required": [
                  "dayOfWeek",
                  "timeOfDay"
                ],
                "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": "#/$defs/TimeOfDay"
                      },
                      {
                        "description": "Time (in UTC) to perform the backup"
                      }
                    ]
                  }
                },
                "minProperties": 1,
                "additionalProperties": false
              }
            },
            {
              "if": {
                "properties": {
                  "type": {
                    "const": "cron"
                  }
                }
              },
              "then": {
                "type": "object",
                "required": [
                  "expression"
                ],
                "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,
                "additionalProperties": false
              }
            }
          ],
          "minProperties": 1
        }
      },
      "required": [
        "schedule"
      ],
      "description": "Automatic backup configuration",
      "minProperties": 1,
      "additionalProperties": false
    },
    "buildCache": {
      "type": "object",
      "properties": {
        "allowUntrustedNodeSsl": {
          "type": "boolean",
          "description": "Allow communication with nodes running over untrusted SSL"
        },
        "storageSize": {
          "type": "integer",
          "description": "Total amount of storage in megabytes reserved for the Built-in Build Cache"
        }
      },
      "description": "Configuration specific to the build cache app",
      "minProperties": 1,
      "additionalProperties": false
    },
    "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
            }
          },
          "minProperties": 1,
          "additionalProperties": false
        },
        "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
        }
      },
      "description": "Configuration specific to the build scans app",
      "minProperties": 1,
      "additionalProperties": false
    },
    "dailyMaintenanceTime": {
      "allOf": [
        {
          "$ref": "#/$defs/TimeOfDay"
        },
        {
          "description": "Which time (UTC) should retention-cleanup be performed"
        }
      ]
    },
    "email": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "administratorAddress": {
          "allOf": [
            {
              "$ref": "#/$defs/EmailAddress"
            },
            {
              "description": "Email address notifications are sent to"
            }
          ]
        },
        "authentication": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "password": {
              "$ref": "#/$defs/EncryptedSecret"
            },
            "type": {
              "type": "string",
              "enum": [
                "login",
                "cramMd5",
                "plain"
              ]
            },
            "username": {
              "type": "string"
            }
          },
          "required": [
            "password",
            "type",
            "username"
          ],
          "description": "SMTP authentication method",
          "minProperties": 1,
          "additionalProperties": false
        },
        "fromAddress": {
          "allOf": [
            {
              "$ref": "#/$defs/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"
      ],
      "description": "SMTP configuration for notifications",
      "minProperties": 1,
      "additionalProperties": false
    },
    "helpContact": {
      "type": "object",
      "properties": {
        "email": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/EmailAddress"
            }
          ],
          "description": "The email address users should contact"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the contact"
        }
      },
      "description": "Who users should contact if they have a problem",
      "minProperties": 1,
      "additionalProperties": false
    },
    "legacyObjectStorage": {
      "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"
                    ],
                    "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"
                              ],
                              "properties": {
                                "source": {
                                  "const": "configuration"
                                },
                                "accessKey": {
                                  "type": "string"
                                },
                                "secretKey": {
                                  "$ref": "#/$defs/EncryptedSecret"
                                }
                              },
                              "minProperties": 1,
                              "additionalProperties": false
                            }
                          },
                          {
                            "if": {
                              "properties": {
                                "source": {
                                  "const": "environment"
                                }
                              }
                            },
                            "then": {
                              "type": "object",
                              "properties": {
                                "source": {
                                  "const": "environment"
                                }
                              },
                              "minProperties": 1,
                              "additionalProperties": false
                            }
                          }
                        ],
                        "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",
      "minProperties": 1,
      "additionalProperties": false
    },
    "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": "#/$defs/EncryptedSecret"
                    },
                    {
                      "description": "Proxy password"
                    }
                  ]
                },
                "username": {
                  "type": "string",
                  "description": "Proxy username"
                }
              },
              "required": [
                "password",
                "username"
              ],
              "description": "Proxy authentication credentials",
              "minProperties": 1,
              "additionalProperties": false
            },
            "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"
          ],
          "description": "Http proxy config",
          "minProperties": 1,
          "additionalProperties": false
        }
      },
      "description": "Network configuration",
      "minProperties": 1,
      "additionalProperties": false
    },
    "systemPassword": {
      "allOf": [
        {
          "$ref": "#/$defs/HashedSecret"
        },
        {
          "description": "The password for the system user"
        }
      ]
    }
  },
  "minProperties": 1,
  "additionalProperties": false,
  "$defs": {
    "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",
      "propertyNames": {
        "$ref": "#/$defs/ConfigParamKey"
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "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",
              "accessAllDataWithOrWithoutAssociatedProject",
              "accessDataWithoutAssociatedProject",
              "readCacheWriteCas"
            ]
          }
        }
      },
      "minProperties": 1,
      "additionalProperties": false
    },
    "TimeOfDay": {
      "type": "string",
      "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
    }
  },
  "required": [
    "systemPassword",
    "version"
  ]
}
