Commit Graph

354 Commits

Author SHA1 Message Date
Ramkumar Chinchani 79ab6464dc chore: fix dependabot alerts (#3921) 2026-03-31 09:53:19 +03:00
Ramkumar Chinchani 705939aed3 feat(schema): add schema command to dump JSON Schema for zot config (#3905)
Fixes https://github.com/project-zot/zot/issues/3882

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-03-28 08:28:35 -07:00
Andrei Aaron 2fec21c839 chore: pin trivy-action to safe version (#3897)
See https://github.com/aquasecurity/trivy/discussions/10425#discussion-9699852

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2026-03-26 10:24:06 +02:00
Ramkumar Chinchani 6831928e53 chore: fix dependabot alerts (#3896)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-03-26 09:14:59 +02:00
Andrei Aaron 544352858a ci: use zot localstack image and consolidate on using the setup localstack GH action (#3899)
* ci: use zot localstack image, and consolidate on using the setup localstack GH action

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

* chore: increase zot minimal test timeout

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

* chore: setup latest localstack still available for community

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

---------

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2026-03-25 14:19:58 -07:00
Ramkumar Chinchani d30be464f6 chore: fix dependabot alerts (#3880)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-03-19 08:38:41 +02:00
Ramkumar Chinchani 2ba0525f01 chore: fix dependabot alerts (#3860)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-03-10 09:43:08 +02:00
Ramkumar Chinchani bb121c3b76 chore: fix dependabot alerts (#3841)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-03-03 23:59:38 -08:00
Ramkumar Chinchani 01bca48e33 chore: fix dependabot alerts (#3820)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-02-24 08:23:49 +02:00
Andrei Aaron 0d327c9812 chore: bump zui version (#3809)
* chore: bump zui version

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

* test(blackbox): docker build to use docker mediatypes in blackbox tests

Add more debugging when starting zot servers
See thread https://github.com/actions/runner-images/issues/13474#issuecomment-3928452506
for changes in behavior caused by docker 28 to docker 29 upgrade.

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

---------

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2026-02-22 18:30:46 -08:00
Andrei Aaron 5e57656bff GCS storage support (#3798)
feat(storage): add a GCS driver

test(storage): add unit tests for GCS driver

test(storage): add missing unit tests for GCS driver & resolve lint issues

fix: configuration validation for GCS Storage

test(storage): resolve panic by test due to setupGCS ignoring returned error

test(storage): add dummy gcs credentials

test: add darwin support for macos to run tests

ci: update workflows to pin gcs emulator version

lint: resolve long line lengths & formatting issues

test: move error for gcs mock earlier with an error

test: stop test using local google credentials and use mock instead

test: add missing dummy creds

test(storage): use storage-testbench for GCS, isolate GCS tests, fix driver Delete

- Switch GCS emulator from fake-gcs-server to storage-testbench in CI.
  Run the GCS emulator only in the privileged-test job; remove it from
  minimal and extended test jobs.

- Consolidate GCS tests under pkg/storage/gcs (needprivileges,linux).
  Add TestMain with HTTPS proxy and /etc/hosts so tests talk to
  storage-testbench; move GCS-specific cases from storage_test.go and
  scrub_test.go into gcs_test.go. Run GCS tests via a second privileged-test
  invocation and collect coverage in coverage-needprivileges-gcs.txt.

- Make GCS driver Delete idempotent and normalize errors. Treat
  PathNotFoundError from Delete as success so that deleting an already-gone
  path (e.g. after GC under eventual consistency) does not fail. Add
  formatErr to map 404/not found to PathNotFoundError and use it for all
  driver methods so callers get consistent storage driver errors.

- Drop GCS branches and helpers from storage_test.go and scrub_test.go so
  non-privileged tests only use local/S3; GCS is tested only in
  pkg/storage/gcs with storage-testbench.

- Set GCSMOCK_ENDPOINT without /storage/v1/, as the rest of the URL is set in tests.

- Show errors in case of failure to create bucket.

- Consolidate StorageDriverMock structs inside the pkg/test/mocks package.

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
Co-authored-by: Steven Marks <steve.marks@qomodo.io>
2026-02-18 23:41:21 -08:00
Ramkumar Chinchani 624a520453 chore: fix dependabot alerts (#3802)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-02-16 11:42:35 -08:00
Ramkumar Chinchani 26f8201864 chore: update golang version to 1.25.7 (#3790)
* chore: update golang version to 1.25.7

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

* ci: attempt to update to latest golang

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

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-02-12 21:21:52 +02:00
Luca Muscariello 23cb7f8e45 fix(build): upgrade zot runtime base image to distroless debian13 (#3791)
* fix(build): upgrade zot runtime base image to distroless debian13

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

* fix(build): align Makefile BASE_IMAGE with distroless debian13

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

---------

Signed-off-by: Luca Muscariello <muscariello@ieee.org>
2026-02-12 13:22:55 +02:00
Ramkumar Chinchani c3c50a2261 chore: fix dependabot alerts (#3788)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-02-09 22:18:35 -08:00
Ramkumar Chinchani d5b1b2d25b chore: fix dependabot alerts (#3774)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-02-03 20:25:38 +02:00
Matheus Pimenta 0e5a339f11 feat(jwt-asm): support AWS Secrets Manager for JWT verification (#3763)
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-02-03 09:25:38 -08:00
Andrei Aaron 063014a942 ci: improvements for the Ecosystem tools job (#3762)
ci: blackbox test impromentts

A mutated zli config could be the cause of https://github.com/project-zot/zot/actions/runs/21560982825/job/62141227950

1. show zli configuration after cve.basts finishes running
2. ensure the zli config is removed in between test files
3. ensure teh zli configs use different names, not "main"

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2026-02-01 23:58:18 +02:00
Ramkumar Chinchani b905528b6c chore: fix dependabot alerts (#3751)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-01-31 11:48:29 +02:00
Matheus Pimenta bf619c570e Introduce support for OIDC workload identity federation (#3711)
* feat(oidc): introduce support for OIDC workload identity federation

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

* feat(oidc): add e2e test for bearer OIDC and a kind cluster

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

* feat(oidc): make OIDC workload identity federation its own feature

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

* feat(oidc): move errors to the errors package

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

* feat(oidc): fix race in cel package

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

* feat(oidc): compile cel expressions

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

---------

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-01-24 21:03:53 -08:00
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
Ramkumar Chinchani bc9f270e96 ci: fix nightly due to outdated kind (#3676)
ci: update kind version

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2026-01-12 10:14:23 -08: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 3a349dccec chore: fix dependabot alerts (#3657)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-12-15 23:34:32 -08:00
Andrei Aaron 08fae9104d feat: support mTLS-only authn/authz with AccessControl and allow combining mTLS with other auth mechanisms (#3624)
* feat: support mTLS-only authn/authz with AccessControl and allow combining mTLS with other auth mechanisms

Signed-off-by: Ivan Arkhipov <me@endevir.ru>

* refactor: improve authentication logic and TLS certificate generation

- Fix mTLS authentication to use only leaf certificate instead of iterating
  through all certificates in the chain
- Reject Authorization headers when corresponding auth method is disabled,
  regardless of mTLS status (security improvement)
- Simplify authentication switch statement ordering and logic
- Move ErrUserDataNotFound error handling into sessionAuthn method
- Refactor TLS certificate generation to use Options pattern with
  CertificateOptions struct for better extensibility
- Consolidate duplicate certificate generation code into helper functions
  (generateCertificate, parseCA, initializeTemplate, applyOptions)
- Rename certificate generation functions for clarity:
  - GenerateCertWithCN -> GenerateClientCert
  - GenerateSelfSignedCertWithCN -> GenerateClientSelfSignedCert
- Add support for SAN settings including email addresses in certificates
- Update tests to reflect new authentication behavior and certificate API

This commit improves both the security posture (rejecting disabled auth
methods) and code maintainability (consolidated certificate generation).

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

* fix: guard against multiple Authorization headers

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

---------

Signed-off-by: Ivan Arkhipov <me@endevir.ru>
Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
Co-authored-by: Ivan Arkhipov <me@endevir.ru>
2025-12-11 20:08:32 +02: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
Andrei Aaron ba8ab49502 ci: save unified coverage as build artifact (#3626)
Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-12-06 21:58:37 +02:00
Andrei Aaron 667ecfa40e ci: split needsprivileges tests from devmode tests (#3625)
Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-12-06 20:36:32 +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 05e9b8cdf8 chore: sync golang 1.25 (#3596)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
2025-11-25 09:29:01 +02:00
Andrei Aaron 7bc6637380 ci: use minio==7.2.18 (#3581)
Looks like they broke the public API in a minor version: https://github.com/minio/minio-py/releases/tag/7.2.19
It was probably not intetional, until they figure it out, let's use the older working version.

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-11-24 14:10:35 +02:00
Andrei Aaron da426850e7 chore: update golangci-lint and fix all issues (#3575)
* chore: Update golangci-lint

Signed-off-by: Lars Francke <git@lars-francke.de>

* chore: fix all golangci-lint issues

- Remove deprecated `// +build` tags
- Fix godoclint, modernize, wsl_v5, govet, lll, gci, noctx issues
- Update linter configuration
- Modernize code to use Go 1.22+ features (for range N, slices.Contains, etc.)
- Update make check lint the privileged tests

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

---------

Signed-off-by: Lars Francke <git@lars-francke.de>
Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
Co-authored-by: Lars Francke <git@lars-francke.de>
2025-11-22 23:36:48 +02:00
Ramkumar Chinchani 64829f9502 feat: allow claim mapping for user name with oidc (#3540)
* feat: allow claim mapping for user name with oidc

* feat: bats test for claim mapping

* test: fix dex config in openid mapping test

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

* test: add panva idp

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

* fix: address copilot comments

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

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
Co-authored-by: Sky Moore <i@msky.me>
2025-11-20 08:54:56 -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
Andrei Aaron a8a6d3be9e fix: separate cipher suites and curve preferences into FIPS and non FIPS, and use them accordingly (#3523)
See: https://github.com/project-zot/zot/actions/runs/19209741002/job/54910194536

`failed to ping registry localhost:11448: Get "https://localhost:11448/v2/": crypto/ecdh: use of X25519 is not allowed in FIPS 140-only mode`

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-11-10 23:24:59 +02: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 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
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
Andrei Aaron f724107c8f ci: fix values in stale comment messages (#3448)
Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-10-11 10:57:07 +03:00
Andrei Aaron 466cbc36fd ci: update stale checks (#3446)
Since the job for triaging stale issues started running last week, it has been mainly running for recent issues.
Also 30 days of issue inactivity is too low at this moment.

Update to 90 days, and force it to start processing older issues/PRs first.
Increase the number of operations per execution, processing more issues/PRs per run.

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-10-10 09:16:02 -07: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 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
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