Brute force not behave correctly

Đang mở
#3,045 12 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@yagudin10 đang làm issue này rồi.

Từ ngày 9/1/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

wontfix xf:authentication xf:local config

Describe the bug
I had configured my cloudbeaver with the env variable in docker

         - name: CLOUDBEAVER_BRUTE_FORCE_PROTECTION_ENABLED
           value: "true"
        - name: CLOUDBEAVER_MAX_FAILED_LOGINS
          value: "3"
        - name: CLOUDBEAVER_MINIMUM_LOGIN_TIMEOUT
          value: "1"
        - name: CLOUDBEAVER_BLOCK_PERIOD
          value: "30"

With CLOUDBEAVER_MINIMUM_LOGIN_TIMEOUT = 1, according to the code in repo, this should be last login attempt within 1second.
Once I logout, try to login again i will hit the exception

org.jkiss.dbeaver.DBException: Too frequent authentication requests
	at io.cloudbeaver.service.security.bruteforce.BruteForceUtils.checkLoginInterval(BruteForceUtils.java:65)
	at io.cloudbeaver.service.security.bruteforce.BruteForceUtils.checkBruteforce(BruteForceUtils.java:40)
	at io.cloudbeaver.service.security.CBEmbeddedSecurityController.createNewAuthAttempt(CBEmbeddedSecurityController.java:1620)
	at io.cloudbeaver.service.security.CBEmbeddedSecurityController.authenticate(CBEmbeddedSecurityController.java:1541)
	at io.cloudbeaver.service.auth.impl.WebServiceAuthImpl.authLogin(WebServiceAuthImpl.java:92)
	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:569)

To Reproduce
Steps to reproduce the behavior:

  1. Login to CloudBeaver
  2. Logout
  3. Try to login again
  4. See error

Screenshots
If applicable, add screenshots to help explain your problem.
image

Ngôn ngữ chính
TypeScript
Star
5.2k
Fork
577
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
93

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dbeaver/cloudbeaver

Tất cả issue của dbeaver/cloudbeaver

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.