nextcloud / nextcloud/bruteforcesettings

View status of an IP address from web UI

Open
#560 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement good first issue
Dominant language
JavaScript
Stars
55
Forks
18
Avg merge
9h 28m
Merged PRs (30d)
21

Description

Goal

Allow an admin to specify an IP address of interest in the Web UI to look up its BFP status and view a summary of its attempts history.

Details

An existing command (occ security:bruteforce:attempts) already provides this capability from the command-line. The same information should be available from the web UI (via the BFP settings app) for ease of day-to-day access by admins that prefer the Web UI (or that lack command-line access).

The operator will only need to specify the IP address of interest in order to query the details desired.

Implementation

No changes in the BFP implementation itself are required (i.e. this enhancement will not touch server). All changes will take place in in the bruteforcesettings app itself.

Existing occ command (model)

The existing occ command is implemented in https://github.com/nextcloud/server/blob/master/core/Command/Security/BruteforceAttempts.php.

Output of `occ security:bruteforce:attempts --help`
Description:
  lists bruteforce attempts for given IP address

Usage:
  security:bruteforce:attempts [options] [--] <ipaddress> [<action>]

Arguments:
  ipaddress              IP address for which the attempts are to be listed
  action                 Only count attempts for the given action

Example current output from occ security:bruteforce:attempts <IP_address> includes:

  - bypass-listed: false
  - attempts: 5
  - delay: 3200

How the output changes can be easily tested by entering an invalid password several times in a row and monitoring how the output changes. This same information should be presented in the web UI, albeit in a more "web UI appropriate" manner.

If needed for additional context, refer to the utilized public and private APIs.

Probably out of scope:

  • Looking up an IP range (i.e.. subnet/CIDR block) rather than just a single IP address
    • Caveat: Though we do need to make sure we support IPv6 too which is based a /64 boundary

Out of scope:

  • Specifying actions: Since actions aren't generally documented they're unlikely to be known by non-developers. So there is no need to permit limiting queries by action in the Web UI at this time.
  • Summarizing attempts by time period (e.g. last 48h, last 24h, last 8h, last 30m)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading core/Command/Security/BruteforceAttempts.php and the linked public and private throttler APIs to understand the existing output and data. Then inspect the bruteforcesettings app entry points for its BFP settings UI. Done means an admin can enter a single IPv4 or IPv6 address and view its bypass-listed status, attempt count, delay, and attempts history without specifying an action or time range.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
authentication, backend, frontend, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.