Commit Graph

1497 Commits

Author SHA1 Message Date
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
Piaras Hoban bc5fd1a357 feat(events): add events extension (#3045)
* feat: add events config

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* feat: implement event support with log sink

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* feat: integrate events and update tests

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* refactor: update event config

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* feat: implement http and nats sinks. remove log sink

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* refactor: events extension setup

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* chore: cleanup tests to use nil event recorder

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* chore: update events config example and add more logging

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* refactor: better use of build tags for minimal binary

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* fix: missing store param in evelated privileges tests

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* fix: regression in config decoding

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* chore: update check logs script to enable cross-platform usage via GREP_BIN_PATH envvar

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* chore: fix log lint issue for events

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* chore: fix failing events disabled test

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* test: add blackbox tests for events

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* chore: specify architecture when downloading binaries in Makefile

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* chore: improve failure handling when no valid sinks are provided

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* test: fix data race in events test

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* chore: cleanup event decoding

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* test: fix logging tests

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* test: make nats server test more reliable

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* chore: go mod cleanup

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* test: add sleep when setting up nats client

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* fix: ensure event sink errors do not propogate

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* test: increase coverage for events

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* feat(events): Refactor events to be non-blocking from caller.

Signed-off-by: Asgeir Nilsen <asgeir.nilsen@bouvet.no>
Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* chore: remove harded-coded linux

Co-authored-by: Andrei Aaron <andreifdaaron@gmail.com>
Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* feat(events): fail to start if incorrect event sink is configured

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* test: allow cli tests to return errors instead of panic

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

* chore: bump nats server to v2.11.3

Signed-off-by: Piaras Hoban <phoban01@gmail.com>

---------

Signed-off-by: Piaras Hoban <phoban01@gmail.com>
Signed-off-by: Asgeir Nilsen <asgeir.nilsen@bouvet.no>
Co-authored-by: Asgeir Nilsen <asgeir.nilsen@bouvet.no>
Co-authored-by: Andrei Aaron <andreifdaaron@gmail.com>
v2.1.3-rc6
2025-05-02 12:30:06 -07:00
Ramkumar Chinchani 06a0cd5220 chore: fix dependabot alerts (#3127)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-04-30 21:47:54 +03:00
Ramkumar Chinchani 293f424457 chore: update conformance badge (#3114)
We need to report conformance results from the default branch only.

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-04-23 15:26:46 -07:00
Ramkumar Chinchani b780b36841 chore: fix dependabot alerts (#3112)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-04-22 23:16:40 -07:00
Andrei Aaron 6ffb0183e3 fix: remove unneeded double locks in redis implementation of metadb (#3055)
fix: remove uneeded double locks in redis implementation of metadb

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
v2.1.3-rc5
2025-04-17 19:25:42 +03:00
Philipp 8f3533ac12 fix: get groups claim from idtokenclaims (#3101)
* fix: get groups claim from idtokenclaims

Signed-off-by: Philipp Lange <ph.lange@pm.me>

* fix: lint

Signed-off-by: Philipp Lange <ph.lange@pm.me>

---------

Signed-off-by: Philipp Lange <ph.lange@pm.me>
2025-04-17 12:02:36 +03:00
peusebiu 0e2aa81439 feat(sync): use regclient for sync extension (#2903)
* feat(sync): use regclient for sync extension

replaced containers/image package with regclient/regclient package

Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>

* fix(sync): fixed converting innner docker list mediatype

Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>

* feat(sync): added option to preserve digest

Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>

* fix(sync): added coverage and various fixes

Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>

* fix(metadb): fixed converting manifest list not setting platform and annotations

Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>

* fix(sync): remove read lock on storage, not used concurrently

Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>

* feat(sync): added cache for repo tags

Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>

* fix(sync): fixed Makefile
removed opengpg tag

Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>

* fix(sync): add test for on demand referrer

Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>

---------

Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>
2025-04-15 16:58:15 -07:00
Ramkumar Chinchani 2592d4c784 chore: fix dependabot alerts (#3099)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-04-14 22:43:56 -07:00
Ramkumar Chinchani 62af65b07d chore: fix dependabot alerts (#3084)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-04-08 22:57:22 -07:00
Ramkumar Chinchani ef1d6f37ce ci: update golang version to be synced to gh (#3073)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-04-06 01:15:29 -07:00
Ramkumar Chinchani bb7039f138 chore: fix dependabot alerts (#3072)
* chore: fix dependabot alerts

* chore: update container builds to use golang 1.24

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

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-04-05 00:57:20 -07:00
Ramkumar Chinchani fd761c0254 chore: fix dependabot alerts (#3070)
* chore: fix dependabot alerts

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

* ci: fix linter config

* fix: linter fixes

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

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-04-04 00:31:02 -07:00
Andrei Aaron cb9b82823a fix(zui): show referrers pointing to image manifests (#3053)
See https://github.com/project-zot/zui/issues/476

In previous implementations the referrers tab only showed the referrers returned at image
level, ignoring the referrers returned at manifest level.
This is fine for singlearch images, since they are the same.
For images containing multiple manifests only index referrers were shown.
The current implementation would show both the referrers to the index and the current manifest.

Also fix refreshing the data shown in the tag details tabs on changing the selected manifest

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
v2.1.3-rc4
2025-03-24 13:19:09 +02:00
Zhou You 32eb4579da feat: handle multiple attributes (#3052)
Enhance LDAP user group retrieval to handle multiple attributes

Signed-off-by: 周游 <hi@zhouyou.info>
2025-03-22 22:47:02 -07:00
Ramkumar Chinchani b9d453ca93 chore: fix dependabot alerts (#3051)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-03-21 18:28:59 -07:00
Ramkumar Chinchani 30467e60cf feat: build windows binaries (#3047)
Currently zot project doesn't build and ship Windows binaries.
This PR adds that support.

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-03-21 12:51:44 -07:00
Andrei Aaron 509327da2e fix: bump zui version to fix minor issues with handling empty manifest lists and missing platform information (#3044)
- fix: do not error in TagDetails if an empty manifest list is returned from the backend
- fix: use '----' as default for missing Os/Arch in drop-down and card (this value is for consistency with other such places where the values are missing)

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-03-19 19:34:33 +02:00
Ramkumar Chinchani ff50aab9b3 chore: fix dependabot alerts (#3041)
* chore: fix dependabot alerts

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

* test: fix http status code check

Related to gqlgen changes
-       github.com/99designs/gqlgen v0.17.66
+       github.com/99designs/gqlgen v0.17.68

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

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-03-18 20:10:55 -07:00
Andrei Aaron f9b647beaf ci: fix failures in nightly (#3042)
- fix log folder names used by nightly jobs
- fix attempt to install containerd.io in the redis pipeline (which conflicts with containerd)

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-03-18 10:39:51 -07:00
Brennan Kinney 4bf708caff chore: Remove VOLUME instruction from image (#3027)
Signed-off-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2025-03-18 10:38:28 +02:00
Andrei Aaron 88ad384506 test: do not use the clustering feature in case of redis + s3 storage
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-03-17 09:12:10 +02:00
Andrei Aaron 8438c83a23 test: add scale-out clustering tests using multiple zot servers with with redis and S3 integration
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-03-17 09:12:10 +02:00
Andrei Aaron 2a4edde637 chore: update image and dist specs to v1.1.1 (#3023)
chore: update image-spec and dist-spec to v1.1.1

As side effect the warnings mentioned in https://github.com/project-zot/zui/issues/475#issuecomment-2715802363 should no longer show up.

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-03-13 10:06:02 +02:00
Ramkumar Chinchani d87cdc9840 chore: fix dependabot alerts (#3026)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-03-12 20:30:53 -07:00
Ramkumar Chinchani c87f489a79 fix: allow changing media-type when pushing an image tag (#3022)
Fixes #3005

Previously, changing a image's media-type was disallowed.
However, "docker buildx" appears to first push an image manifest and
then an image index for the same image tag. So, allow this.

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
v2.1.3-rc3
2025-03-11 10:38:47 -07:00
Andrei Aaron 0930e57184 fix: show data from docker mediatypes in search results (#3019)
Including handling indexes / manifest lists for buildkit manifest lists containing image cache

See
- https://github.com/project-zot/zui/issues/475
- https://github.com/project-zot/zot/issues/3000#issuecomment-2709031927

Fix and unrelated issue with killing zot and collecting logs in case of cluster test failures

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-03-11 11:43:30 +02:00
Ramkumar Chinchani 651d123731 chore: fix dependabot alerts (#3021)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-03-11 01:40:27 -07:00
Evan d465690630 [feat]: add support for EC/ED25519 public keys for token authentication (#2998)
* feat: rework token auth to allow ED25519/EC public keys

Signed-off-by: evanebb <git@evanus.nl>

* fix: shadow err variable to hopefully avoid data race

Signed-off-by: evanebb <git@evanus.nl>

* fix: apply golangci-lint feedback

Signed-off-by: evanebb <git@evanus.nl>

* fix: simplify public key loading by only supporting certificates, fixes ED25519 certificate handling

Signed-off-by: evanebb <git@evanus.nl>

* test: add golang-jwt based test auth server and test RSA/EC/ED25519 keys

Signed-off-by: evanebb <git@evanus.nl>

* fix: restrict allowed signing algorithms as recommended by library

Signed-off-by: evanebb <git@evanus.nl>

* test: add more bearer authorizer tests

Signed-off-by: evanebb <git@evanus.nl>

* fix: apply more golangci-lint feedback

Signed-off-by: evanebb <git@evanus.nl>

* test: ensure chmod calls run on test failure for authn errors test

Signed-off-by: evanebb <git@evanus.nl>

* fix: verify issued-at in given token if present
Pulls the validation in-line with the old library

Signed-off-by: evanebb <git@evanus.nl>

---------

Signed-off-by: evanebb <git@evanus.nl>
2025-03-06 14:32:13 -08:00
Ramkumar Chinchani e7fb9c5e60 chore: fix dependabot alerts (#3002)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-03-04 22:53:21 -08:00
Andrei Aaron 983dc7f8d5 Cumulative improvements for CI troubleshooting (#2996)
* feat: show more error information in zb output

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

* chore(ci): gc stress tests to save logs as artifacts

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

* chore: add benchmark results to job summaries

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

* fix: count and show zb errors

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

* ci: fix the flaky coverage of the redis logger

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

---------

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-03-01 01:04:09 +02:00
Vladimir Ermakov 3893eec714 feat(htpasswd): add autoreload for htpasswd (#2933)
* feat(htpasswd): move htpasswd processing to a helper struct and add reload

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* feat(htpasswd): use dedicated fsnotify reloader for htpasswd file

- rewrite htpasswd watcher not to store context
- improve logging

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* feat(htpasswd): add htpasswd reload test

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

---------

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
2025-02-27 12:42:57 +02:00
Ramkumar Chinchani 7e07bae4d6 chore: fix dependabot alerts (#2991)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-02-26 23:27:01 -08:00
Ramkumar Chinchani 546a7ea425 chore: fix dependabot alerts (#2988)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-02-25 20:39:45 -08:00
Ramkumar Chinchani 328606def0 chore: fix dependabot alerts (#2978)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-02-22 22:28:23 -08:00
Andrei Aaron 88efa50de9 fix: Update AWS DynamoDB permission list and correct issues in DynamoDB examples (#2963)
fix: Update AWS DynamoDB permission list, and correct issues in DynamoDB examples

Note DeleteTable is only used for the zot tests, should not be needed in production

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-02-13 19:11:06 +02:00
Ramkumar Chinchani 528c2e5f6d chore: fix dependabot alerts (#2961)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-02-11 20:11:41 -08:00
Andrei Aaron e3c42a76c5 More validation for DynamoDB cache driver cachetablename (#2949)
fix: More validation for DynamoDB cache driver cachetablename

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-02-09 18:56:02 +02:00
Ramkumar Chinchani d0ad93532f chore: fix dependabot alerts (#2945)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-02-03 23:34:01 -08:00
Andrei Aaron ea6b6dab23 fix: MetaDB fixes related to Docker media types (#2934)
* fix: update download counters for docker media types

closes #2929

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

* fix: handle docker config mediatype in MetaDB

The OS/Arch/Layer History information was not written to MetaDB

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

---------

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2025-02-03 08:29:55 +02:00
Vladimir Ermakov 4fcd1079f7 feat(ldap): allow to customize user filter (#2927)
feat(ldap): allow to customize user filter (#2927)

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
2025-01-31 15:32:07 +00:00
Andrei Aaron 05823cd74f redis driver for blob cache information and metadb (#2865)
* feat: add redis cache support

https://github.com/project-zot/zot/pull/2005
Fixes https://github.com/project-zot/zot/issues/2004

* feat: add redis cache support

Currently, we have dynamoDB as the remote shared cache but ideal only
for the cloud use case.
For on-prem use case, add support for redis.

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

* feat(redis): added blackbox tests for redis

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>

* feat(redis): dummy implementation of MetaDB interface for redis cache

Signed-off-by: Alexei Dodon <adodon@cisco.com>

* feat: check validity of driver configuration on metadb instantiation

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

* feat: multiple fixes for redis cache driver implementation

- add missing method GetAllBlobs
- add redis cache tests, with and without mocking

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

* feat(redis): redis implementation for MetaDB

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

* feat(redis): use redsync to block concurrent write access to the redis DB

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

* feat(redis): update .github/workflows/cluster.yaml to also test redis

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

* feat(metadb): add keyPrefix parameter for redis and remove unneeded method meta.Crate()

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

* feat(redis): support RedisCluster configuration and add unit tests

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

* feat(redis): more tests for redis metadb implementation

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

* feat(redis): add more examples and update examples/README.md

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

* feat(redis): move option parsing and redis client initialization under pkg/api/config/redis

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

* chore(cachedb): move Cache interface to pkg/storage/types

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

* feat(redis): reorganize code in pkg/storage/cache.go

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

* feat(redis): call redis.SetLogger() with the zot logger as parameter

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

* feat(redis): rename pkg/meta/redisdb to pkg/meta/redis

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

---------

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
Signed-off-by: Alexei Dodon <adodon@cisco.com>
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
Co-authored-by: a <a@tuxpa.in>
Co-authored-by: Ramkumar Chinchani <rchincha@cisco.com>
Co-authored-by: Petu Eusebiu <peusebiu@cisco.com>
Co-authored-by: Alexei Dodon <adodon@cisco.com>
v2.1.3-rc2
2025-01-30 11:00:52 -08:00
peusebiu 90e1393585 fix(sync): fixed harbor authentication issues on _catalog endpoint (#2891)
Signed-off-by: Petu Eusebiu <petu.eusebiu@gmail.com>
2025-01-30 09:40:24 -08:00
Ramkumar Chinchani 67231230e5 chore: fix dependabot alerts (#2922)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-01-29 09:42:27 -08:00
Vladimir Ermakov 22864a95c8 feat(sync): add tag excludeRegex filter (#2906)
Fix #2902

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
2025-01-26 10:29:02 -08:00
tamil vanan d0de12d2d3 [Feat]: Support for AWS ECR Authentication with Temporary Tokens (#2907)
feat: add support for aws ecr authentication

Signed-off-by: K Tamil Vanan <vanan@arcesium.com>
2025-01-26 11:38:22 +02:00
Andrei Aaron cf8b20d92d fix(dynamodb): properly handle ResourceInUseException for existing tables (#2909)
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
v2.1.3-rc1
2025-01-24 14:58:13 -08:00
Ramkumar Chinchani ececc9c2c9 docs: fix ratelimit example (#2905)
Some fields are mixed case which is inconsistent with the rest of
example configs.

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-01-22 09:17:01 -08:00
Ramkumar Chinchani c6d343a730 chore: fix dependabot alerts (#2904)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-01-21 20:02:03 -08:00
Andrei Aaron b8437991cb ci: reenable test calling stacker (#2890)
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
v2.1.2
2025-01-17 13:09:45 -08:00