{
    "title": "Identity Service Properties",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.security.Properties",
    "type": "object",
    "properties": {
        "initialPassword": {
            "type": "string"
        },
        "minPasswordLength": {
            "type": "number",
            "format": "utc-millisec",
            "minimum": 0
        },
        "sessionTimeout": {
            "type": "integer",
            "minimum": 0
        },
        "vault": {
            "javaType": "com.sos.joc.model.security.VaultProperties",
            "type": "object",
            "properties": {
                "iamVaultUrl": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                },
                "iamVaultAuthenticationMethodPath": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                },
                "iamVaultTruststorePath": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                },
                "iamVaultTruststorePassword": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                },
                "iamVaultTruststoreType": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                },
                "iamVaultApplicationToken": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                }
            }
        },
        "ldap": {
            "javaType": "com.sos.joc.model.security.LdapProperties",
            "type": "object",
            "properties": {
                "simple": {
                    "javaType": "com.sos.joc.model.security.LdapSimpleProperties",
                    "type": "object",
                    "properties": {
                        "iamLdapHost": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapPort": {
                            "type": "number",
                            "format": "utc-millisec",
                            "minimum": 0
                        },
                        "iamLdapProtocol": {
                            "javaType": "com.sos.joc.model.security.LdapProtocolItem",
                            "type": "string",
                            "enum": [
                                "PLAIN",
                                "STARTTLS",
                                "SSL"
                            ]
                        },
                        "iamLdapAD": {
                            "type": "boolean"
                        },
                        "iamLdapADwithSamAccount": {
                            "type": "boolean"
                        },
                        "iamLdapWithMemberOf": {
                            "type": "boolean"
                        }
                    }
                },
                "expert": {
                    "javaType": "com.sos.joc.model.security.LdapExpertProperties",
                    "type": "object",
                    "properties": {
                        "iamLdapServerUrl": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapUserDnTemplate": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapSearchBase": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapGroupSearchBase": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapGroupNameAttribute": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapUserNameAttribute": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapUserSearchFilter": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapGroupSearchFilter": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapUseStartTls": {
                            "type": "boolean",
                            "default": false
                        },
                        "iamLdapTruststorePath": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapTruststorePassword": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapTruststoreType": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapHostNameVerification": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapSecurityProtocol": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "iamLdapGroupRolesMap": {
                            "javaType": "com.sos.joc.model.security.LdapGroupRolesMapping",
                            "type": "object",
                            "properties": {
                                "items": {
                                    "type": "array",
                                    "items": {
                                        "javaType": "com.sos.joc.model.security.LdapGroupRolesMappingItem",
                                        "type": "object",
                                        "properties": {
                                            "ldapGroupDn": {
                                                "type": "string",
                                                "pattern": "^[^<>]*$",
                                                "maxLength": 255
                                            },
                                            "roles": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "pattern": "^[^<>]*$",
                                                    "maxLength": 255
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}