Skip to content

feat!: migrate repository & sigstore to typed credentials#2586

Merged
matthiasbruns merged 24 commits into
open-component-model:mainfrom
matthiasbruns:feat/702_typed_credentials_repository_sigstore
May 21, 2026
Merged

feat!: migrate repository & sigstore to typed credentials#2586
matthiasbruns merged 24 commits into
open-component-model:mainfrom
matthiasbruns:feat/702_typed_credentials_repository_sigstore

Conversation

@matthiasbruns

@matthiasbruns matthiasbruns commented May 20, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

This PR migrates the following bindings to runtime.Typed credentials

  • repository
  • sigstore

Since we touch central interfaces, this is a breaking change.

For sigstore, this PR already introduces typed credentials and identities and updates all code paths where possible. (identity is mostly there for documentation, since we delayed the migration to typed identities)

The migration path can be observed here: #2519

Which issue(s) this PR fixes

Contributes:

Testing

  • breaking change only tested with binding tests
  • go.work disabled, task test is green

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Rate limit exceeded

@matthiasbruns has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 47 minutes and 16 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c1f42e7d-7fdb-4689-bf20-2247db993efd

📥 Commits

Reviewing files that changed from the base of the PR and between ec6347f and 3072f34.

📒 Files selected for processing (35)
  • bindings/go/sigstore/doc.go
  • bindings/go/sigstore/integration/integration_test.go
  • bindings/go/sigstore/signing/handler/handler.go
  • bindings/go/sigstore/signing/handler/handler_test.go
  • bindings/go/sigstore/signing/v1alpha1/config.go
  • bindings/go/sigstore/signing/v1alpha1/schemas/SignConfig.schema.json
  • bindings/go/sigstore/signing/v1alpha1/schemas/VerifyConfig.schema.json
  • bindings/go/sigstore/spec/credentials/oidcidentitytoken/scheme.go
  • bindings/go/sigstore/spec/credentials/oidcidentitytoken/v1alpha1/convert.go
  • bindings/go/sigstore/spec/credentials/oidcidentitytoken/v1alpha1/convert_test.go
  • bindings/go/sigstore/spec/credentials/oidcidentitytoken/v1alpha1/oidcidentitytoken.go
  • bindings/go/sigstore/spec/credentials/oidcidentitytoken/v1alpha1/schemas/OIDCIdentityToken.schema.json
  • bindings/go/sigstore/spec/credentials/oidcidentitytoken/v1alpha1/zz_generated.deepcopy.go
  • bindings/go/sigstore/spec/credentials/oidcidentitytoken/v1alpha1/zz_generated.ocm_jsonschema.go
  • bindings/go/sigstore/spec/credentials/oidcidentitytoken/v1alpha1/zz_generated.ocm_type.go
  • bindings/go/sigstore/spec/credentials/trustedroot/scheme.go
  • bindings/go/sigstore/spec/credentials/trustedroot/v1alpha1/convert.go
  • bindings/go/sigstore/spec/credentials/trustedroot/v1alpha1/convert_test.go
  • bindings/go/sigstore/spec/credentials/trustedroot/v1alpha1/schemas/TrustedRoot.schema.json
  • bindings/go/sigstore/spec/credentials/trustedroot/v1alpha1/trustedroot.go
  • bindings/go/sigstore/spec/credentials/trustedroot/v1alpha1/zz_generated.deepcopy.go
  • bindings/go/sigstore/spec/credentials/trustedroot/v1alpha1/zz_generated.ocm_jsonschema.go
  • bindings/go/sigstore/spec/credentials/trustedroot/v1alpha1/zz_generated.ocm_type.go
  • bindings/go/sigstore/spec/identity/signer/v1alpha1/register.go
  • bindings/go/sigstore/spec/identity/signer/v1alpha1/schemas/SigstoreSignerIdentity.schema.json
  • bindings/go/sigstore/spec/identity/signer/v1alpha1/type.go
  • bindings/go/sigstore/spec/identity/signer/v1alpha1/zz_generated.deepcopy.go
  • bindings/go/sigstore/spec/identity/signer/v1alpha1/zz_generated.ocm_jsonschema.go
  • bindings/go/sigstore/spec/identity/signer/v1alpha1/zz_generated.ocm_type.go
  • bindings/go/sigstore/spec/identity/verifier/v1alpha1/register.go
  • bindings/go/sigstore/spec/identity/verifier/v1alpha1/schemas/SigstoreVerifierIdentity.schema.json
  • bindings/go/sigstore/spec/identity/verifier/v1alpha1/type.go
  • bindings/go/sigstore/spec/identity/verifier/v1alpha1/zz_generated.deepcopy.go
  • bindings/go/sigstore/spec/identity/verifier/v1alpha1/zz_generated.ocm_jsonschema.go
  • bindings/go/sigstore/spec/identity/verifier/v1alpha1/zz_generated.ocm_type.go
📝 Walkthrough

Walkthrough

This PR migrates credential handling across Open Component Model Go bindings from untyped map[string]string to strongly-typed runtime.Typed, introducing new OIDCIdentityToken and TrustedRoot credential specifications with v1alpha1 identity consumer types, and refactoring repository and Sigstore handler implementations with comprehensive test coverage updates.

Changes

Unified Credential Typing Migration

Layer / File(s) Summary
Repository credential interface migration
bindings/go/repository/interface.go
ComponentVersionRepositoryProvider, ResourceRepository, and ResourceDigestProcessor method signatures updated from map[string]string to runtime.Typed credentials parameters.
Repository implementations and test mocks
bindings/go/repository/component/fallback/v1/repository.go, bindings/go/repository/component/resolvers/pathmatcher.go, bindings/go/repository/component/fallback/v1/repository_test.go, bindings/go/repository/component/resolvers/pathmatcher_test.go
Fallback and pathmatcher resolvers resolve credentials into runtime.Typed and pass typed values to providers; test mocks updated to match new interface signatures.
Repository module dependencies
bindings/go/repository/go.mod
Go module dependencies bumped for blob, credentials, and descriptor/runtime packages.
OIDCIdentityToken credential specification
bindings/go/sigstore/spec/credentials/oidcidentitytoken/*
New v1alpha1 OIDCIdentityToken type with inline Token and file-based TokenFile fields; includes scheme registration, conversion from Direct/Typed credentials with deprecated snake_case fallback, JSON schema, and autogenerated deepcopy/accessor methods.
TrustedRoot credential specification
bindings/go/sigstore/spec/credentials/trustedroot/*
New v1alpha1 TrustedRoot type with inline TrustedRootJSON and file-based TrustedRootJSONFile fields; includes scheme registration, conversion from Direct/Typed with deprecated keys, JSON schema, and autogenerated deepcopy/accessor methods.
Sigstore signer and verifier identity types
bindings/go/sigstore/spec/identity/signer/v1alpha1/*, bindings/go/sigstore/spec/identity/verifier/v1alpha1/*
Two consumer identity types: SigstoreSignerIdentity with algorithm/signature/issuer/clientID filters and SigstoreVerifierIdentity with algorithm/signature filters; each includes registration, JSON schema, and autogenerated methods.
Sigstore handler sign and verify refactoring
bindings/go/sigstore/signing/handler/handler.go
Handler Sign and Verify methods accept runtime.Typed credentials; implementations convert typed credentials to OIDCIdentityToken/TrustedRoot, extract token/trusted-root fields directly, update trusted-root path resolution, and construct credential consumer identities using v1alpha1 signer/verifier identity types.
Sigstore handler test suite migration
bindings/go/sigstore/signing/handler/handler_test.go
Comprehensive refactoring of handler tests to construct and pass typed OIDCIdentityToken and TrustedRoot credentials, use v1alpha1 signer/verifier identity attribute constants, verify field precedence (inline vs file), and test nil credential handling.
Sigstore integration test updates
bindings/go/sigstore/integration/integration_test.go
Integration tests updated to construct and pass typed OIDCIdentityToken and TrustedRoot credentials across signing/verification scenarios including trusted root file paths, inline JSON, wrong issuer validation, and private infrastructure verification.
Sigstore documentation and configuration
bindings/go/sigstore/doc.go, bindings/go/sigstore/signing/v1alpha1/config.go, bindings/go/sigstore/signing/v1alpha1/schemas/VerifyConfig.schema.json
Package documentation, config field comments, and JSON schema descriptions updated to describe OIDCIdentityToken/TrustedRoot credential structure, clarify keyless verification requirements, private infrastructure use, and trusted-root resolution precedence.
Sigstore module dependencies
bindings/go/sigstore/go.mod, bindings/go/sigstore/integration/go.mod
Go module dependencies updated to pull in versioned runtime, descriptor/runtime, credentials, descriptor/normalisation, descriptor/v2, and signing packages.

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly Related PRs

Suggested Reviewers

  • fabianburth
  • jakobmoellerdev
  • morri-son
  • frewilhelm

🐰 Typed credentials flowing freely now,
From map strings to structured types,
OIDC tokens and trusted roots take their bows,
Handlers refactored, tests aligned bright,
Runtime.Typed brings order to the night!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately describes the main change: migrating repository and sigstore bindings to typed credentials, with the breaking change marker (!) clearly indicated.
Description check ✅ Passed The PR description is directly related to the changeset, explaining what is being migrated (repository and sigstore bindings), why (runtime.Typed credentials migration), and its impact (breaking change).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify

netlify Bot commented May 20, 2026

Copy link
Copy Markdown

Deploy Preview for ocm-website canceled.

Name Link
🔨 Latest commit 3072f34
🔍 Latest deploy log https://app.netlify.com/projects/ocm-website/deploys/6a0eec0ddfb30e00081c9ba6

@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/l Large labels May 20, 2026
@matthiasbruns

Copy link
Copy Markdown
Contributor Author

I will update sigstore stuff when I am back - PR will land tomorrow

@matthiasbruns matthiasbruns force-pushed the feat/702_typed_credentials_repository_sigstore branch from 69c08f7 to c333ffc Compare May 20, 2026 19:23
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/702_typed_credentials_repository_sigstore branch from 95e6258 to d5cd76f Compare May 21, 2026 06:41
matthiasbruns and others added 7 commits May 21, 2026 09:07
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns changed the title feat: migrate repository & sigstore to typed feat: migrate repository & sigstore to typed credentials May 21, 2026
@matthiasbruns matthiasbruns marked this pull request as ready for review May 21, 2026 07:33
@matthiasbruns matthiasbruns requested a review from a team as a code owner May 21, 2026 07:33

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
bindings/go/repository/interface.go (1)

107-114: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update stale credential docs to typed terminology.

Line 110 and Line 113 still mention a “credentials map”, but the interface now takes runtime.Typed. Please align the comments to avoid incorrect implementation assumptions.

Suggested doc update
-    // The credentials map must contain necessary authentication information to access the resource.
+    // The typed credentials must contain necessary authentication information to access the resource.
...
-    // The credentials map must contain necessary authentication information to access the resource.
+    // The typed credentials must contain necessary authentication information to access the resource.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bindings/go/repository/interface.go` around lines 107 - 114, Update the
comments for UploadResource and DownloadResource to stop referring to a
"credentials map" and instead describe the credentials parameter as typed
runtime credentials; specifically, change the phrasing on the UploadResource
comment (above UploadResource(ctx context.Context, res *descriptor.Resource,
content blob.ReadOnlyBlob, credentials runtime.Typed) ...) and the
DownloadResource comment (above DownloadResource(..., credentials runtime.Typed)
...) to say the credentials parameter is a runtime.Typed containing necessary
authentication information to access the resource, so implementers aren’t misled
into expecting a map.
🧹 Nitpick comments (1)
bindings/go/sigstore/spec/credentials/sigstore/v1/convert_test.go (1)

20-120: ⚡ Quick win

Add regression cases for deprecated type values and nil input.

The table covers deprecated property keys but not deprecated type enums (for example OIDCIdentityToken/v1) and not nil input. Adding both cases would lock in backward-compat behavior and panic safety.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bindings/go/sigstore/spec/credentials/sigstore/v1/convert_test.go` around
lines 20 - 120, Add two regression test cases to the tests table in
convert_test.go: one that supplies a runtime.Raw (or runtime.Typed) entry whose
Type is the deprecated type enum (e.g., the older "OIDCIdentityToken/v1" or
whichever deprecated constant your conversion supports) with Data containing the
corresponding JSON and expect it to convert to the same SigstoreCredentials want
value; and another case where input is nil (input: nil) and wantErr is true to
ensure the converter does not panic; place these cases alongside the existing
entries (refer to the tests slice, runtime.Raw usage, and fakeTyped case) so
backward-compat and nil-safety are covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@bindings/go/sigstore/doc.go`:
- Around line 57-65: Update the credential doc headings to use the v1 identity
versions: replace occurrences of "SigstoreSigner/v1alpha1" with
"SigstoreSigner/v1" and "SigstoreVerifier/v1alpha1" with "SigstoreVerifier/v1"
in the doc comment block so the documented identity types match the migrated v1
types and avoid misconfigured credential consumers.

In `@bindings/go/sigstore/spec/credentials/sigstore/v1/convert.go`:
- Around line 37-63: Check for nil and existing SigstoreCredentials before doing
any scheme conversion: in ConvertToSigstoreCredentials first return a clear
error if creds is nil to avoid creds.GetType() panics, then attempt a type
assertion on creds to *SigstoreCredentials and if it succeeds return it directly
(bypassing convertScheme). Only after those early checks proceed with the
existing flow that uses creds.GetType(), convertScheme.TypeForPrototype,
convertScheme.NewObject, and convertScheme.Convert, and keep the existing switch
handling of *v1.DirectCredentials and other types.

---

Outside diff comments:
In `@bindings/go/repository/interface.go`:
- Around line 107-114: Update the comments for UploadResource and
DownloadResource to stop referring to a "credentials map" and instead describe
the credentials parameter as typed runtime credentials; specifically, change the
phrasing on the UploadResource comment (above UploadResource(ctx
context.Context, res *descriptor.Resource, content blob.ReadOnlyBlob,
credentials runtime.Typed) ...) and the DownloadResource comment (above
DownloadResource(..., credentials runtime.Typed) ...) to say the credentials
parameter is a runtime.Typed containing necessary authentication information to
access the resource, so implementers aren’t misled into expecting a map.

---

Nitpick comments:
In `@bindings/go/sigstore/spec/credentials/sigstore/v1/convert_test.go`:
- Around line 20-120: Add two regression test cases to the tests table in
convert_test.go: one that supplies a runtime.Raw (or runtime.Typed) entry whose
Type is the deprecated type enum (e.g., the older "OIDCIdentityToken/v1" or
whichever deprecated constant your conversion supports) with Data containing the
corresponding JSON and expect it to convert to the same SigstoreCredentials want
value; and another case where input is nil (input: nil) and wantErr is true to
ensure the converter does not panic; place these cases alongside the existing
entries (refer to the tests slice, runtime.Raw usage, and fakeTyped case) so
backward-compat and nil-safety are covered.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eb862703-10bb-4478-baad-f7d3bd7d8a9e

📥 Commits

Reviewing files that changed from the base of the PR and between 5369fd2 and ec6347f.

⛔ Files ignored due to path filters (3)
  • bindings/go/repository/go.sum is excluded by !**/*.sum
  • bindings/go/sigstore/go.sum is excluded by !**/*.sum
  • bindings/go/sigstore/integration/go.sum is excluded by !**/*.sum
📒 Files selected for processing (37)
  • bindings/go/repository/component/fallback/v1/repository.go
  • bindings/go/repository/component/fallback/v1/repository_test.go
  • bindings/go/repository/component/resolvers/pathmatcher.go
  • bindings/go/repository/component/resolvers/pathmatcher_test.go
  • bindings/go/repository/go.mod
  • bindings/go/repository/interface.go
  • bindings/go/sigstore/doc.go
  • bindings/go/sigstore/go.mod
  • bindings/go/sigstore/integration/go.mod
  • bindings/go/sigstore/integration/integration_test.go
  • bindings/go/sigstore/signing/handler/handler.go
  • bindings/go/sigstore/signing/handler/handler_test.go
  • bindings/go/sigstore/signing/handler/internal/credentials/credentials.go
  • bindings/go/sigstore/signing/v1alpha1/config.go
  • bindings/go/sigstore/signing/v1alpha1/schemas/VerifyConfig.schema.json
  • bindings/go/sigstore/spec/credentials/sigstore/scheme.go
  • bindings/go/sigstore/spec/credentials/sigstore/v1/convert.go
  • bindings/go/sigstore/spec/credentials/sigstore/v1/convert_test.go
  • bindings/go/sigstore/spec/credentials/sigstore/v1/schemas/SigstoreCredentials.schema.json
  • bindings/go/sigstore/spec/credentials/sigstore/v1/sigstore_credentials.go
  • bindings/go/sigstore/spec/credentials/sigstore/v1/zz_generated.deepcopy.go
  • bindings/go/sigstore/spec/credentials/sigstore/v1/zz_generated.ocm_jsonschema.go
  • bindings/go/sigstore/spec/credentials/sigstore/v1/zz_generated.ocm_type.go
  • bindings/go/sigstore/spec/identity/signer/v1/register.go
  • bindings/go/sigstore/spec/identity/signer/v1/schemas/SigstoreSignerIdentity.schema.json
  • bindings/go/sigstore/spec/identity/signer/v1/type.go
  • bindings/go/sigstore/spec/identity/signer/v1/type_test.go
  • bindings/go/sigstore/spec/identity/signer/v1/zz_generated.deepcopy.go
  • bindings/go/sigstore/spec/identity/signer/v1/zz_generated.ocm_jsonschema.go
  • bindings/go/sigstore/spec/identity/signer/v1/zz_generated.ocm_type.go
  • bindings/go/sigstore/spec/identity/verifier/v1/register.go
  • bindings/go/sigstore/spec/identity/verifier/v1/schemas/SigstoreVerifierIdentity.schema.json
  • bindings/go/sigstore/spec/identity/verifier/v1/type.go
  • bindings/go/sigstore/spec/identity/verifier/v1/type_test.go
  • bindings/go/sigstore/spec/identity/verifier/v1/zz_generated.deepcopy.go
  • bindings/go/sigstore/spec/identity/verifier/v1/zz_generated.ocm_jsonschema.go
  • bindings/go/sigstore/spec/identity/verifier/v1/zz_generated.ocm_type.go
💤 Files with no reviewable changes (1)
  • bindings/go/sigstore/signing/handler/internal/credentials/credentials.go

Comment thread bindings/go/sigstore/doc.go Outdated
Comment thread bindings/go/sigstore/spec/credentials/sigstore/v1alpha1/convert.go Outdated
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/702_typed_credentials_repository_sigstore branch from 94530e0 to 9b13f4f Compare May 21, 2026 07:54
@matthiasbruns

Copy link
Copy Markdown
Contributor Author

versions are now alpha1 instead of v1

@matthiasbruns matthiasbruns changed the title feat: migrate repository & sigstore to typed credentials feat!: migrate repository & sigstore to typed credentials May 21, 2026
@github-actions github-actions Bot added the !BREAKING-CHANGE! Breaking change in API or ocm-cli or spec label May 21, 2026
@matthiasbruns matthiasbruns requested a review from frewilhelm May 21, 2026 11:20
@matthiasbruns matthiasbruns force-pushed the feat/702_typed_credentials_repository_sigstore branch 2 times, most recently from 58c16af to a56b8c6 Compare May 21, 2026 11:22
Comment thread bindings/go/sigstore/signing/v1alpha1/config.go Outdated
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
frewilhelm
frewilhelm previously approved these changes May 21, 2026
morri-son
morri-son previously approved these changes May 21, 2026
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns dismissed stale reviews from morri-son and frewilhelm via 3072f34 May 21, 2026 11:27
@matthiasbruns matthiasbruns merged commit 6c9693c into open-component-model:main May 21, 2026
23 checks passed
@matthiasbruns matthiasbruns deleted the feat/702_typed_credentials_repository_sigstore branch May 21, 2026 11:37
skarlso-release-bot Bot pushed a commit to Skarlso/open-component-model that referenced this pull request May 21, 2026
…nent-model#2586)

#### What this PR does / why we need it
This PR migrates the following bindings to runtime.Typed credentials
- repository
- sigstore

Since we touch central interfaces, this is a breaking change.

For `sigstore`, this PR already introduces typed credentials and
identities and updates all code paths where possible. (identity is
mostly there for documentation, since we delayed the migration to typed
identities)

The migration path can be observed here:
open-component-model#2519

#### Which issue(s) this PR fixes
Contributes:
- open-component-model/ocm-project#1055

#### Testing
- breaking change only tested with binding tests
- go.work disabled, task test is green

---------

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Co-authored-by: Gerald Morrison (SAP) <gerald.morrison@sap.com> 6c9693c
jakobmoellerdev added a commit that referenced this pull request May 22, 2026
)

## Summary

Gate 6 of the phased [ADR 0018 / issue
#1047](open-component-model/ocm-project#1047)
credentials migration. Builds on gates 1–5 (PRs #2580, #2586, #2594,
#2598, #2602).

> **Note:** this branch also contains #2613 (plugin
`CredentialsFromHeader` refactor). Once that merges, this PR will show
only the helm changes.

### helm binding changes

- `cmd/main.go`, `input/method.go`: `ProcessResource`/`ProcessSource` →
`runtime.Typed`
- `digest/digest.go`: `ProcessResourceDigest` → `runtime.Typed`; single
`ConvertCredentials` call replaces two separate conversions
- `repository/resource/resource_repository.go`:
`DownloadResource`/`UploadResource` → `runtime.Typed`; `var _
repository.ResourceRepository` assertion restored
- `transformation/get_helm_chart.go`: use upstream typed
`ResourceRepository` interface; delete `transformation/credentials.go`
- `spec/credentials/v1/convert.go`: new
`ConvertCredentials(runtime.Typed) (*HelmHTTPCredentials,
*OCICredentials, error)` — single scheme-based conversion returning both
types
- `spec/credentials/scheme.go`: package-level `Scheme` for helm
credentials
- `spec/credentials/v1/helm_credentials.go`: remove deprecated exported
constants and `FromDirectCredentials` (now private)
- `go.mod`: `plugin` → v0.0.16, `blob` → v0.0.13, `repository` → v0.0.9;
no replace directives

## Test plan

- [ ] `cd bindings/go/helm && go build ./... && go test ./...` (cmd/*
requires `task build` for plugin binary)
- [ ] `grep -rn "map\[string\]string" bindings/go/helm/` returns no
credential parameter usages

Refs: #1047

Signed-off-by: Jakob Möller <contact@jakob-moeller.com>
jakobmoellerdev added a commit that referenced this pull request May 26, 2026
…entials (gate 7) (#2616)

#### What this PR does / why we need it

Gate 7 of the typed credentials migration (ocm-project#1047).

Migrates `bindings/go/transfer` and `kubernetes/controller` to use
`runtime.Typed` credentials instead of `map[string]string`.

**bindings/go/transfer:**
- Bump `blob→v0.0.13`, `credentials→v0.0.12`, `oci→v0.0.43`,
`repository→v0.0.9`
- Update OCI identity import path: `oci/spec/credentials/identity/v1` →
`oci/spec/identity/v1`

**kubernetes/controller:**
- `resolveResourceCredentials` and `VerifyResource` return
`runtime.Typed` instead of `map[string]string`
- Replace `map[string]string` RSA credential literals with
`rsacredentialsv1.RSACredentials` structs
- Update import aliases for `oci/spec/credentials` and
`oci/spec/identity/v1`
- `GetComponentVersionRepository` call sites updated to pass
`runtime.Typed` credentials

#### Which issue(s) this PR fixes

Contributes:
- open-component-model/ocm-project#1047
- open-component-model/ocm-project#1055
- open-component-model/ocm-project#1056
- open-component-model/ocm-project#1057

#### Binding release order

| Gate | PRs | Modules | Status |
|------|-----|---------|--------|
| 1 | ✅ #2580 | blob, signing, rsa | merged |
| 2 | ✅ #2586 | repository, sigstore | merged |
| 3 | ✅ #2594 | oci | merged |
| 4 | ✅ #2598 | constructor | merged |
| 5 | ✅ #2602 | plugin, input/dir, input/file, input/utf8 | merged |
| 6 | ✅ #2612 | helm | merged |
| 7 | **this PR** | transfer, controller | 👈 |
| 8 | PR 8 | cli | — |

---------

Signed-off-by: Jakob Möller <contact@jakob-moeller.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Co-authored-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns mentioned this pull request May 26, 2026
5 tasks
matthiasbruns added a commit that referenced this pull request May 26, 2026
On-behalf-of: SAP <matthias.bruns@sap.com>

<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
Final PR of the breaking change chain for the credential migration.
This PR updated the CLI.

#### Which issue(s) this PR fixes
Fixed: open-component-model/ocm-project#1056

| Gate | PRs | Modules | Status |
|------|-----|---------|--------|
| 1 | ✅ #2580 | blob, signing, rsa | merged |
| 2 | ✅ #2586 | repository, sigstore | merged |
| 3 | ✅ #2594 | oci | merged |
| 4 | ✅ #2598 | constructor | merged |
| 5 | ✅ #2602 | plugin, input/dir, input/file, input/utf8 | merged |
| 6 | ✅ #2612 | helm | merged |
| 7 | ✅  #2616 | transfer, controller | merged |
| 8 | **this PR** | cli | 👈 |

#### Testing

##### How to test the changes

##### Verification

- [ ] I have added/updated tests for my changes (see [Test
Requirements](../CONTRIBUTING.md#test-requirements))
- [x] Tests pass locally (`task test` and `task test/integration` if
applicable)
- [ ] If touching multiple modules, `go work` is enabled (see `go.work`)
- [x] My changes do not decrease test coverage
- [ ] I have tested the changes locally by running `ocm`

---------

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!BREAKING-CHANGE! Breaking change in API or ocm-cli or spec kind/feature new feature, enhancement, improvement, extension size/l Large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants