Commit Graph

348 Commits

Author SHA1 Message Date
Ramkumar Chinchani 0cac8a7ee8 chore: fix dependabot alerts (#3707)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-01-15 20:42:39 +02:00
Asgeir Storesund Nilsen 708adf63d4 fix: CVE-2025-30204 - golang-jwt DoS vulnerability via excessive memory allocation (#3687)
* fix: CVE-2025-30204 - golang-jwt DoS vulnerability via excessive memory
allocation

Signed-off-by: Asgeir Nilsen <asgeir@twingine.no>

* fix: linting

Signed-off-by: Asgeir Nilsen <asgeir@twingine.no>

* chore: update project-zot/mockoidc to remove golang-jwt v3

Signed-off-by: Asgeir Nilsen <asgeir@twingine.no>

* test: Add more tests for bearer tokens

Signed-off-by: Asgeir Nilsen <asgeir@twingine.no>

* fix: Rewrite tests to remove MakeAuthTestServerLegacy

Signed-off-by: Asgeir Nilsen <asgeir@twingine.no>

---------

Signed-off-by: Asgeir Nilsen <asgeir@twingine.no>
2026-01-14 11:34:58 +02:00
Ramkumar Chinchani 800a545fbe chore: fix dependabot alerts (#3677)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-12-29 09:59:57 +02:00
Ramkumar Chinchani 331a927fa4 chore: fix dependabot alerts (#3660)
* chore: fix dependabot alerts

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* fix: linter error

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-12-19 12:12:10 -08:00
Ramkumar Chinchani 3a349dccec chore: fix dependabot alerts (#3657)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-12-15 23:34:32 -08:00
Ramkumar Chinchani e7b73b6c2d chore: fix dependabot alerts (#3636)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-12-09 10:49:45 +02:00
Ramkumar Chinchani 92aee8ebce chore: Fix deps (#3620)
* chore: fix dependabot alerts

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* chore: update zui

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-12-04 11:43:24 +02:00
Andrei Aaron e068b8dc9f chore: Enable Go jsonv2 experiment and update the trivy dependency (v0.67.2) (#3572)
It requires the encoding/json/jsontext
package which is only available when the goexperiment.jsonv2 build
tag is enabled. This was causing build constraint errors during
tests and builds.

Changes:
- Add GOEXPERIMENT=jsonv2 to Makefile export and all go build/test
  commands that use env (since env creates a fresh environment)
- Add GOEXPERIMENT=jsonv2 to GitHub workflows that use direct go
  commands (workflows using make inherit it from Makefile)

Fix other dependabot alerts.

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-11-27 09:58:37 +02:00
Ramkumar Chinchani 6452bec403 chore: fix dependabot alerts (#3595)
* chore: fix dependabot alerts

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* ci: bump up golang to 1.25.x

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* fix: linter errors

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* fix: stacker and docker build files to use golang 1.25

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-11-26 11:21:36 +02:00
Ramkumar Chinchani 4a03184f9c chore: fix dependabot alerts (#3566)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-11-19 23:19:22 -08:00
Andrei Aaron 2b60e11ce4 chore: update cosign from v2 to v3 (#3561)
* chore: update cosign from v2 to v3

Also do not import cosing into zli, as it doubles the bianry size
See: https://github.com/project-zot/zot/actions/runs/19506399474/job/55833719683?pr=3561

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>

* chore: privileged-test should not depend on downloaded images

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>

---------

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-11-20 00:43:57 +02:00
Andrei Aaron 8e63df6678 chore: update github.com/olekukonko/tablewriter to v1.1.1 (#3559)
Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-11-18 23:02:50 -08:00
Ramkumar Chinchani 49c15abf06 chore: fix dependabot alerts (#3555)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-11-18 08:46:51 +02:00
Ramkumar Chinchani 2b6fba7059 chore: fix dependabot alerts (#3534)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-11-10 23:45:17 -08:00
Ramkumar Chinchani 04ae0a9409 fix: add support for sha256 and sha512 in htpasswd (#3497)
feat: add support for sha256 and sha512 htpasswd formats

Fixes issue #3495

We currently support only bcrypt htpasswd hashes, however bcrypt is not
FIPS-140 approved since it uses Blowfish.

This PR adds support for sha256 and sha512 formats and enforces that
bcrypt be disabled when fips140 mode is enabled.

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-11-09 15:28:29 +02:00
Ramkumar Chinchani 911244b4b7 chore: fix dependabot alerts (#3517)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-11-06 17:08:18 -08:00
Ramkumar Chinchani 33c466e007 chore: fix dependabot alerts (#3514)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-11-04 14:11:27 +02:00
Ramkumar Chinchani a0943eccfe chore: fix dependabot alerts (#3496)
* chore: fix dependabot alerts

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* fix: initialize logger in ut

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-10-30 14:21:53 -07:00
Ramkumar Chinchani 559d9cf2fc chore: fix dependabot alerts (#3477)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-10-22 09:46:03 +03:00
Andrei Aaron dfb5d1df54 fix: make config read/write thread safe (#3432)
* fix: make config read/write thread safe and fix some other similar issues

1. The config config has a lock, and safe methods to update and read the attributes
2. The config has methods to retrieve copies of specific attributes, such as the extyensions config, the auth config, and the authz config.
These are needed, as the config object may mutate in the middle of an auth/authz requests, and we avoid partial configuration being applied for that request.
3. Fix an issue with the monitoring server not stopping when the controller is shut down.
4. Fix an issue with the HTPasswdWatcher not stopping when the background tasks are supposed to finish.
5. Fix some tests using hardcoded ports.

Moved some of the methods which were on the main config to the auth, access control and extension configs

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-10-18 11:20:58 +03:00
Luca Muscariello 2402296e9a fix: migrate to Go module v2 for proper semantic versioning (#3462)
* fix: migrate to Go module v2 for proper semantic versioning

This change updates the module path from 'zotregistry.dev/zot' to
'zotregistry.dev/zot/v2' to comply with Go's semantic versioning rules.

According to Go's module versioning requirements, major version v2+
must include the major version in the module path. The current
module path 'zotregistry.dev/zot' only supports v0.x.x and v1.x.x
versions, making existing v2.x.x tags (like v2.1.8) unusable.

Changes:
- Updated go.mod module path to zotregistry.dev/zot/v2
- Updated all internal import paths across 280+ Go source files
- Updated configuration files (golangcilint.yaml, gqlgen.yml)
- Updated README.md Go reference badge

This fix enables proper use of existing v2.x.x Git tags and allows
external packages to import zot v2+ versions without compatibility
errors.

Resolves: Go module import compatibility for v2+ versions
Fixes: #3071
Signed-off-by: Luca Muscariello <muscariello@ieee.org>

* fix: regenerate GraphQL files with updated v2 import paths

The gqlgen tool needs to regenerate the GraphQL schema files after
the module path change to use the new v2 imports.

Signed-off-by: Luca Muscariello <muscariello@ieee.org>

---------

Signed-off-by: Luca Muscariello <muscariello@ieee.org>
2025-10-16 22:43:47 -07:00
Ramkumar Chinchani b2bbbb27f2 chore: fix dependabot alerts (#3461)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-10-14 08:07:24 +03:00
Ramkumar Chinchani 411a3d00b5 fix: update go-redsync for fips-140 compatibility (#3451)
* fix: update go-redsync for fips-140 compatibility

Fixes issue #3445

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* fix: address comments and add a basic push-pull test

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* fix: address comments

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-10-13 09:34:12 +03:00
Ramkumar Chinchani 1d9c9aeacf chore: fix dependabot alerts (#3444)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-10-07 14:14:34 +03:00
Vishwas Rajashekar 86af38abfc feat(sessions): add support for remote redis session store (#3345)
Description
====================
zot currently stores session cookies in memory or in a local directory.
For cases where the session cookies should be independent of the
instance where they were created such as multiple instances of zot, or a
fully stateless zot instance, there is a need to support a remote
session storage.
This change adds support for using Redis and Redis-compatible services as a
remote session driver as well as introduces a new configuration option
for it.

What has changed
=======================
- New config added under Auth config to specify configuration for
  the session driver.
- Examples README updated with details of the new Auth config.
- The config supports only 2 drivers in this change - local and redis
- Using the local driver is backwards compatible and behaves the same
  way that zot currently works for local session storage.
- Omitting this config does not result in an error. In this case, zot
  behaves as it normally does for local session storage.
- When configured, zot can use redis for persisting cookie
  information for zot UI.
- The cookie in the store is deleted on logout or after the max
  expiry time for the cookie.
- Configuration for the redis session driver accepts the same configuration
  values as that of the remote meta cache.
- A separate connection is established for the session driver. An
  existing connection for meta cache will not be re-used for the
  session driver.
- A key prefix is configurable for the redis session driver. The value will be
  converted into a string for use. If no value is provided, a default
  prefix of "zotsession" will be used.
- Redis sessions does not support hash key or encryption in this change.
- New BATS test added to verify zot behavior with Redis session store.
- Github workflow updated to install valkey-tools dependency for BATS.

Signed-off-by: Vishwas Rajashekar <dev@vrajashkr.com>
2025-10-05 10:13:38 +03:00
Ramkumar Chinchani b1842ab9e0 fix: migrate from github.com/rs/zerolog to golang-native log/slog (#3405)
* fix: migrate from github.com/rs/zerolog to golang-native log/slog

We have been using zerolog for a really long time.
golang now has structured logging using slog.
Best to move to this in interests of long-term support.

This is a tech debt item.

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* fix: a few changes on top

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* fix: address comments

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-10-03 12:34:03 -07:00
Andrei Aaron 5309e7f5cf chore: increase/stabilize go test coverage (#3411)
* chore: increase/stabilize coverage for the local storage driver

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>

* chore: add/stabilize coverage for soring ImageSummary objects

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>

* chore: stabilize coverage in sync tests

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>

---------

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-10-01 15:24:38 -07:00
Ramkumar Chinchani 5e5bd1e33c chore: fix dependabot alerts (#3422)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-09-30 09:56:53 +03:00
Ramkumar Chinchani 1fdf1aad9d chore: fix dependabot alerts (#3407)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-09-26 14:27:16 +03:00
Ramkumar Chinchani e49048958d chore: fix dependabot alerts (#3397)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-09-18 11:49:04 -07:00
Ramkumar Chinchani 97ab0e2568 chore: fix dependabot alerts (#3380)
* chore: fix dependabot alerts

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* ci: bump up golang version to 1.24.x

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-09-11 11:11:38 +03:00
Ramkumar Chinchani 9bb73d43b4 chore: fix dependabot alerts (#3365)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-09-07 00:04:16 -07:00
Ramkumar Chinchani cb520aa9e4 Fix deps (#3343)
* chore(ci): fix sync images workflow

golang image is sync'ed from dockerhub and it appears certs have expired
that is breaking 'docker trust inspect ...'

* chore: fix dependabot alerts

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-08-28 09:05:59 -07:00
Ramkumar Chinchani f689c13f2e chore: fix dependabot alerts (#3328)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-08-19 01:49:36 -07:00
Ramkumar Chinchani 69e58b092d chore: fix dependabot alerts (#3312)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-08-16 00:23:35 -07:00
Ramkumar Chinchani a13c917b73 chore: fix dependabot alerts (#3292)
* chore: fix dependabot alerts

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* fix: update trivy api call

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-08-06 10:09:53 -07:00
Ramkumar Chinchani 77abd8b101 chore: fix dependabot alerts (#3280)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-07-31 20:27:39 -07:00
Ramkumar Chinchani 966d4584ba chore: fix dependabot alerts (#3275)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-07-26 10:10:26 +03:00
Ramkumar Chinchani e775f41edc chore: fix dependabot alerts (#3274)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-07-25 09:33:23 -07:00
Ramkumar Chinchani 552242f558 chore: fix dependabot alerts (#3258)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-07-10 09:01:40 +03:00
Ramkumar Chinchani e33a937b38 chore: fix dependabot alerts (#3255)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-07-07 22:27:05 -07:00
Ramkumar Chinchani 2c7e8fd33e chore: fix dependabot alerts (#3245)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-07-05 00:06:32 +03:00
Asgeir Storesund Nilsen c298818cc2 feat: healthz server (#3228)
* feat: healthz server

Signed-off-by: Asgeir Nilsen <asgeir@twingine.no>

* fix: startup and readiness probe activation points

Enable startup probe at end of Controller.Init and readiness probe at
end of Controller.Run

Signed-off-by: Asgeir Nilsen <asgeir@twingine.no>

* fix: rewrote to reuse same HTTP listener

Signed-off-by: Asgeir Nilsen <asgeir@twingine.no>

---------

Signed-off-by: Asgeir Nilsen <asgeir@twingine.no>
2025-07-04 19:13:01 +03:00
Ramkumar Chinchani 9755bba9ba chore: fix dependabot alerts (#3225)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-06-25 23:15:31 -07:00
Ramkumar Chinchani 100dfec142 chore: fix dependabot alerts (#3213)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-06-17 10:09:19 -07:00
Andrei Aaron 8867814d95 chore: bump github.com/olekukonko/tablewriter from 0.0.5 to 1.0.7 (#3198)
* chore: bump github.com/olekukonko/tablewriter from 0.0.5 to 1.0.7

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* fix: zli failed to connect to https server using test certificates

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

---------

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-06-16 00:07:15 +03:00
Andrei Aaron 6a22640bfa Fix dependabot alerts (#3188)
* chore: update github.com/redis/go-redis/v9 to v9.9.0

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* chore: update trivy to v0.63.0

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* chore: update github.com/spf13/cast to v1.9.2

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* chore: update ossf/scorecard-action from 2.4.1 to 2.4.2

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* chore: fix multiple dependabot alerts

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

---------

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-06-09 10:40:13 -07:00
Ramkumar Chinchani 167f7e34cd chore: fix dependabot alerts (#3155)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-05-27 18:58:50 +03:00
Ramkumar Chinchani 7291b88896 chore: fix dependabot alerts (#3154)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-05-12 22:21:42 -07:00
Ramkumar Chinchani 32a5eee521 chore: fix dependabot alerts (#3141)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-05-05 22:06:22 -07:00