Skip to content

feat(cas-backend): introduce fallback mechanism#2629

Merged
Piskoo merged 13 commits into
chainloop-dev:mainfrom
Piskoo:pfm-3541
Jan 8, 2026
Merged

feat(cas-backend): introduce fallback mechanism#2629
Piskoo merged 13 commits into
chainloop-dev:mainfrom
Piskoo:pfm-3541

Conversation

@Piskoo

@Piskoo Piskoo commented Dec 21, 2025

Copy link
Copy Markdown
Contributor

Adds support for configuring a fallback CAS backend that is automatically used when the default backend becomes unavailable.

Changes

  • Added fallback boolean field to CAS backends
  • A backend cannot be both default and fallback
  • Creating a new fallback backend automatically unsets the previous one
  • Fallback backends are included in periodic validation (every 30 minutes)
  • During attestation process cas backend is decided as follows:
    • Try default backend
    • If default invalid, try fallback backend
    • If fallback invalid or missing, return error
  • Added --fallback flag to all casbackend add and update commands.

Example

$ chainloop casbackend add oci --repo index.docker.io/repo --username name --password password  --name fallbacktest --fallback

┌───────────────┬────────────────────────┬──────────┬─────────────┬───────────────┬─────────┬──────────┬────────┐
│ NAME          │ LOCATION               │ PROVIDER │ DESCRIPTION │ LIMITS        │ DEFAULT │ FALLBACK │ STATUS │
├───────────────┼────────────────────────┼──────────┼─────────────┼───────────────┼─────────┼──────────┼────────┤
│ fallbacktest  │ index.docker.io/repo   │ OCI      │             │ MaxSize: 300M │ false   │ true     │ valid  │
└───────────────┴────────────────────────┴──────────┴─────────────┴───────────────┴─────────┴──────────┴────────┘

During attestation init cas backend is decided seamlessly, we will provide information on what cas backend was used in the attestation itself.

@Piskoo Piskoo requested review from jiparis and migmartri December 22, 2025 13:09
@Piskoo Piskoo marked this pull request as ready for review December 22, 2025 13:09
Comment thread app/controlplane/pkg/biz/casbackend.go
Comment thread app/controlplane/internal/service/attestation.go Outdated
Comment thread app/controlplane/internal/service/attestation.go
@Piskoo Piskoo requested a review from migmartri January 5, 2026 15:28
Piskoo added 10 commits January 5, 2026 16:43
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Comment thread app/controlplane/internal/service/attestation.go
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Comment thread app/controlplane/pkg/biz/casbackend.go
@jiparis jiparis requested a review from migmartri January 7, 2026 11:49
Comment thread app/controlplane/pkg/data/casbackend.go
Comment thread app/controlplane/pkg/data/casbackend.go Outdated
Comment thread app/controlplane/pkg/biz/casbackend.go
Comment thread app/controlplane/pkg/biz/casbackend.go Outdated
Comment thread app/controlplane/pkg/biz/casbackend.go Outdated
Comment thread app/controlplane/pkg/biz/casbackend.go Outdated
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
@Piskoo Piskoo requested a review from migmartri January 7, 2026 16:00

@migmartri migmartri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ptal at my comment and if positive lgtm!

@Piskoo Piskoo merged commit 3118d63 into chainloop-dev:main Jan 8, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants