1556 Commits

Author SHA1 Message Date
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
Andrei Aaron 3dcd7d1683 ci: fix nightly (#3431)
ci: fix nightly and show logs for nightly sync tests

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-10-05 12:58:04 -07: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
Andrei Aaron cbbd39745c chore: stabilize coverage for specific imagestore case (#3429)
https://app.codecov.io/gh/project-zot/zot/commit/636a6b1820088c4334b02ef5d2e61a3450c4b231/indirect-changes

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-10-04 23:40:25 -07:00
Lukasz Jakimczuk 50c7fa6dd8 feat(sync): enable regclient logs (#3363)
feat: enable regclient logs

Signed-off-by: Łukasz Jakimczuk <ljakimczuk@gmail.com>
2025-10-04 11:27:27 -07:00
Vishwas Rajashekar 636a6b1820 fix(ci): use fixed ranges for BATS server ports (#3428)
Changes in this PR
==================
- Replaces the get_free_port bash function in BATS tests
with get_free_port_for_service that returns a random free port
in a given range for a test file and service defined in a
ports.json file.
- Updates all get_free_port calls to use the new function.
- A new README file for details on the ports.json file.
- Updates some tests using fixed ports to use dynamic ports.
- Adds a ports.json file with all the allocations.
- Adds a new common helper for port fetching.

Signed-off-by: Vishwas Rajashekar <30438425+vrajashkr@users.noreply.github.com>
2025-10-04 19:16:03 +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
Ramkumar Chinchani d5779cfec8 ci: move workflow to oci runner (#3426)
* ci: move workflow to oci runner

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

* fix: some changes on top

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

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-10-03 11:51:12 -07:00
Ramkumar Chinchani 799496b7d3 ci: fix stale check (#3427)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-10-03 00:32:07 -07:00
Andrei Aaron 14736b8a53 ci: more sync/local driver tests to stabilize/increase coverage (#3425)
Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-10-02 09:19:43 -07:00
Ramkumar Chinchani 0aa0d6bb2d fix: broken CodeQL badge (#3424)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-10-02 12:46:32 +03: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
Andrei Aaron f49aaa0052 chore: update zui version (#3412)
- upgrade axios to v1.12.2 for cve fixes
- update mui libraries to 6.5.0 for cve fixes
- other updates for fixes
- react-scripts@5.0.1 is outdated and only supports TypeScript 4.9.5, so downgrade to 4.9.5
(note this was alreays done on npm install even in the previous commit)

Shoudl fix https://github.com/project-zot/zot/actions/runs/18036432234/job/51324327982

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-09-29 11:08:28 -07:00
Andrei Aaron e6dee9f1e6 chore: Update to graphql 5.2.0 (#3410)
chore: Update to graphql 5.2.0, previous version was not loading dependencies anymore

https://github.com/graphql/graphiql/tree/graphiql%405.2.0/examples/graphiql-cdn

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-09-29 19:59:05 +03:00
Andrei Aaron 1e9d9b8e60 feat: GC to cleanup untagged manifests by default (#3408)
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-09-26 22:09:54 -07: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
Lukasz Jakimczuk b740a6f037 fix: close the syncResult channel by any goroutine that receives the data (#3348)
fix: race condition in on-demand syncing

Signed-off-by: Łukasz Jakimczuk <ljakimczuk@gmail.com>
v2.1.8
2025-09-01 11:55:48 -07:00
Stephan Merker f0404e7e72 fix: gc for untagged docker manifests (#3349)
- fixes #3347: removeUntaggedManifests() did not consider compatible manifest types
- add AsDockerImage() to Image and MultiarchImage for testing
- extend TestGarbageCollectAndRetentionMetaDB to test docker image and multiarch image

Signed-off-by: Stephan Merker <stephan.merker@sap.com>
2025-09-01 09:20:35 -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 59679865ff chore: update notation version (#3316)
to v1.3.2

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-08-17 10:25:18 -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 e8b530ad9d ci: selectively revert this runner (#3297)
This workflow is failing. We will revisit once the default username
includes the docker group.

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-08-14 12:38:45 -07:00
Koray Oksay deb0e4a71b chore(ci): update github runners to oci gh arc runners (#3293)
ci: update github runners to oci gh arc runners

Signed-off-by: Koray Oksay <koray.oksay@gmail.com>
2025-08-06 21:01:12 -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 41183693b0 feat(freebsd): add support native freebsd container images (#3256)
* feat(freebsd): add support native freebsd container images

Fixes issue #1663

freebsd is now building and releasing official freebsd OCI container
images

https://hub.docker.com/r/freebsd/freebsd-runtime/tags
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* fix: add freebsd support in publish workflow

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

* fix: bump stacker version

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

* fix: disable non-functional darwin OCI image builds

darwin OCI images are non-functional until we get a usable base image.
Remove them.

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

* fix: set freebsd-static as base image for FreeBSD images

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

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
v2.1.7
2025-08-03 08:58:30 -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 642d9ba5cb fix: return the entire blob size in patch upload response (#3279)
https://github.com/regclient/regclient/issues/961
https://github.com/opencontainers/distribution-spec/pull/581

Previously, zot returned the size of the currently uploaded chunk.
Other registries the size of the entire blob.

Align with the latter behavior.

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-07-30 17:32:54 -07:00
Ramkumar Chinchani b2a5afc5c8 fix: close metadb on shutdown (#3277)
Fixes https://github.com/project-zot/helm-charts/issues/70

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-07-29 09:27:26 -07:00
Ramkumar Chinchani 966d4584ba chore: fix dependabot alerts (#3275)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
v2.1.6
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
Uwe Jäger 06c1be119c Read OpenID credentials from file (#3244)
* feat: read OpenID credentials from file

Signed-off-by: Uwe Jäger <uwe.jaeger@valiton.com>

* feat: allow credentials file and secret in config to keep BC

Signed-off-by: Uwe Jäger <uwe.jaeger@valiton.com>

---------

Signed-off-by: Uwe Jäger <uwe.jaeger@valiton.com>
2025-07-09 09:16:49 -07:00
Doug Rabson 432fde45af Fix building zot natively on FreeBSD (#3247)
fix: allow zot to build on a FreeBSD host (#3246)

The build works as long as the protoc package is installed on the build
host. This also fixes lint checks when building on FreeBSD, working
around common lint complaints caused by the fact that rlim_t is int64 on
FreeBSD.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2025-07-08 15:12:15 +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
Andrei Aaron 80081bb012 fix: GetNextRepository to use a list already scanned repositories as input (#3230)
Using just the last repository is not enough as in the case when it is deleted
(either by GC or some other way), GetNextRepository returns empty string
causing the generator to be marked completed without any errors.

An alternative would have been to start over from the first repository,
but this can take hours if multiple repositories need to be deleted,
not to mention the processing power and I/O and S3 load this could take.

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-07-04 19:12:18 +03:00
Andrei Aaron e8ac21c001 chore: bump zui version (#3241)
Specifically to fix https://snyk.io/vuln/SNYK-JS-AXIOS-9403194

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-07-01 11:37:48 +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>
v2.1.5
2025-06-17 10:09:19 -07:00
Ramkumar Chinchani 4d5712da58 chore: update zui version (#3212)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-06-16 12:58:12 -07:00
Ramkumar Chinchani a7a13f4c62 feat: add token auth support for event sink (#3197)
feat: add token auth and custom headers support for http event sink

fixes issue #3187

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-06-15 15:23:31 -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 e7a5e09214 fix: image retention policy to handle patterns even if metadb is not instantiated (#3200)
It is to fix #3185.
This fixes the case where MetaDB is not instantiated (none of the conditions match),
and we want to retain tags only by pattern (which should not need to use MetaBD).

Without this fix you could only use retention to delete untagged manifests.
If you specified only the key "patterns" under "keepTags", zot would crash.
It was possible to not specify "keepTags" all, which would retain all tags,
but it was not possible to retains specific tags.

Basically the case quoted below, from the documentation, was broken::
https://zotregistry.dev/v2.1.4/articles/retention/#configuration-example

```
When you specify a regex pattern with no rules other than the default, all tags matching the pattern are retained.
```

This would only work if MetaDb was instantiated by an unrelated configured feature.

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-06-15 07:38:52 +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