Tosone ac246ad163 feat(authn): throttle failed logins per username
Add a cache-backed failed-login throttler for Basic auth. Once a username
reaches auth.loginRateLimit.maxFailures failures within window, each
subsequent authentication attempt is delayed by delay (capped at 5s)
instead of being rejected; the counter is cleared on a successful login.

- add pkg/infra/ratelimit backed by pkg/infra/cache (inmemory/redis) with
  Count/Incr/Reset and Prometheus metrics for failures, delayed attempts,
  and cache errors
- wire ConfigurationAuthLoginRateLimit with defaults (5 failures, 5m window,
  1s delay) and document it in conf/config.yaml
- integrate the limiter into the authn middleware, counting all Basic
  failures including /v2/, and honor request context cancellation
- add unit tests for threshold behavior, delay, and cancellation
- mark the login rate limit item complete in TODO.md
2026-09-13 12:54:54 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00

sigma

sigma

GitHub Workflow Status Codecov GitHub repo size

Sigma is an image registry that is extremely easy to deploy and maintain, and it adheres to the interface standards defined by the OCI Distribution Specification 1.1, it can also support any other client programs that follow the interface definition of the OCI Distribution Specification, such as oras, apptainer, helm, and nerdctl.

Quick Start

Now you can use this command to run a simple server:

docker run --name sigma -p 3000:3000 --rm tosone/sigma:nightly-alpine

The default username and password is: sigma/Admin@123. If you want to modify the default password, please refer to the configuration instructions.

Demo Server

It is deployed on an AWS EC2 instance (2C4G, 40G disk) running Debian 12.1 as the Linux distribution. The Docker version used is 25.0.3. The demo server was set up following these instructions.

Visit: https://sigma.tosone.cn, username/password: sigma/Admin@123

Architecture

The diagram below maps Sigma's main runtime layers, from client entry points to request handling, background workers, and the infrastructure services they depend on.

Sigma architecture

Features

  • Support docker registry v2 protocol.
  • Support OCI Image v1 Format and OCI Image Index v1 Format.
  • Support OCI artifacts such as helm and so on.
  • Support OCI sbom.
  • Support Image security scan.
  • Support registry proxy.
  • Support Namespace quota.
  • Support Image automatic garbage collection.
  • Support Image sign.
  • Support Image build in docker, podman and kubernetes.
  • Support Image replication.

AI Clients and Automation

Sigma provides two integration paths for AI clients and external automation:

  • Embedded MCP server: Sigma can expose registry management tools through the existing server process. It is disabled by default and can be enabled through the mcp configuration section. See MCP Server.
  • External REST API skill: tools/skill/sigma-api-operator packages a reusable skill and swagger.yaml so CLI agents such as Claude Code or Copilot CLI can discover Sigma APIs and operate resources through HTTP requests.

Alternatives

Languages
Go 73.9%
TypeScript 23.6%
CSS 1.6%
Dockerfile 0.3%
Makefile 0.2%
Other 0.3%