dbeaver / cloudbeaver

Cloud Database Manager
https://dbeaver.com/
Apache License 2.0
3.52k stars 381 forks source link

Configure Brute Force behavior #2669

Closed MatthiasSchnoeke closed 5 months ago

MatthiasSchnoeke commented 5 months ago

During login I receive very often the error message below. How to change/disable this behavior?

org.jkiss.dbeaver.DBException: Too frequent authentication requests at io.cloudbeaver.service.security.bruteforce.BruteForceUtils.checkLoginInterval(BruteForceUtils.java:64) at io.cloudbeaver.service.security.bruteforce.BruteForceUtils.checkBruteforce(BruteForceUtils.java:39) at io.cloudbeaver.service.security.CBEmbeddedSecurityController.createNewAuthAttempt(CBEmbeddedSecurityController.java:1536) at io.cloudbeaver.service.security.CBEmbeddedSecurityController.authenticate(CBEmbeddedSecurityController.java:1457) at io.cloudbeaver.service.auth.impl.WebServiceAuthImpl.authLogin(WebServiceAuthImpl.java:91) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568)


My cloudbeaver.conf:

{ server: { serverPort: 8978,

    workspaceLocation: "workspace",
    contentRoot: "web",
    driversLocation: "drivers",

    rootURI: "/",
    serviceURI: "/api/",

    productConfiguration: "conf/product.conf",

    expireSessionAfterPeriod: 21600000,

    develMode: false,

    enableSecurityManager: false,

    database: {
        driver="mariadb",
        url: "jdbc:mariadb://xxx:3306/cloudbeavertest?autoreconnect=true",
        user: "xxx",
        password: "xxx",

        createDatabase: true,

        initialDataConfiguration: "conf/initial-data.conf",

        pool: {
            minIdleConnections: 0,
            maxIdleConnections: 10,
            maxConnections: 100,
            validationQuery: "SELECT 1"
        }
    }

},
app: {
    anonymousAccessEnabled: false,
    anonymousUserRole: "user",
    supportsCustomConnections: false,

    forwardProxy: false,

    publicCredentialsSaveEnabled: false,
    adminCredentialsSaveEnabled: false,

    resourceManagerEnabled: true,

    resourceQuotas: {
        dataExportFileSizeLimit: 10000000,
        resourceManagerFileSizeLimit: 500000,
        sqlMaxRunningQueries: 100,
        sqlResultSetRowsLimit: 100000,
        sqlResultSetMemoryLimit: 2000000,
        sqlTextPreviewMaxLength: 4096,
        sqlBinaryPreviewMaxLength: 261120
    },
    enabledAuthProviders: [
        "local"
    ],

    disabledDrivers: [
        "sqlite:sqlite_jdbc",
        "h2:h2_embedded",
        "clickhouse:yandex_clickhouse"
    ]

}

}

MatthiasSchnoeke commented 5 months ago

ok it seems I have to add this:

    sm: {
        enableBruteForceProtection: false
    },
EvgeniaBzzz commented 5 months ago

Yes, you are right, enableBruteForceProtection: false will disable brute-force protection. But you can also ajust the policy. You can find the whole config part here.

MatthiasSchnoeke commented 5 months ago

many thanks for your fast answer