Skip to content

feat: 1047 typed credentials - full migration path#2599

Closed
jakobmoellerdev wants to merge 29 commits into
open-component-model:mainfrom
jakobmoellerdev:feat/1047_typed_credentials_phase_3_consumers
Closed

feat: 1047 typed credentials - full migration path#2599
jakobmoellerdev wants to merge 29 commits into
open-component-model:mainfrom
jakobmoellerdev:feat/1047_typed_credentials_phase_3_consumers

Conversation

@jakobmoellerdev

@jakobmoellerdev jakobmoellerdev commented May 21, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it

This PR basically migrates the whole code-base to the final state of credentials including cli and controllers.

  • updates all interfaces that used credentials map[string]string
  • updates plugin boundary auth parsing
  • updates all consumers and cross references
  • updates cli & controllers
  • updates all tests and integration tests
  • cleans up deprecated consts and helper functions
  • adds a util to convert runtime.Typed into typed credentials in the bindings where needed
  • introduces typed credentials in sigstore

Which issue(s) this PR fixes

Contributes:

Binding release order

Dependency graph (changed → changed only):

blob → (none)
signing → (none)
rsa → (none)
sigstore → signing
repository → blob, credentials
oci → blob, credentials, repository
constructor → blob, credentials, oci, repository
plugin → blob, constructor, credentials, repository, signing
input/dir → blob, constructor, credentials, repository
input/file → blob, constructor, credentials, repository
input/utf8 → blob, constructor, credentials, repository
helm → blob, constructor, credentials, oci, plugin, repository
transfer → blob, credentials, helm, oci, repository, signing

PR plan:

Gate PRs Modules Can review in parallel
1 ✅ PR 1 (#2580) blob, signing, rsa ✅ (3 modules)
2 ✅ PR 2 (#2586) repository, sigstore ✅ (2 modules)
3 PR 3 (#2594) oci
4 PR 4 (#2598) constructor
5 PR 5 (#2602) plugin, input/dir, input/file, input/utf8 ✅ (4 modules)
6 PR 6 (#2612) helm
7 PR 7 transfer, controller ✅ (2 modules)
8 PR 8 cli

@netlify

netlify Bot commented May 21, 2026

Copy link
Copy Markdown

Deploy Preview for ocm-website failed. Why did it fail? →

Name Link
🔨 Latest commit 3e75ee6
🔍 Latest deploy log https://app.netlify.com/projects/ocm-website/deploys/6a0feedc58356f0007f850fe

@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 52cd831c-b6b6-4a5c-b6c2-a1b6bacd73e7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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.

@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/l Large labels May 21, 2026
piotrjanik added a commit to piotrjanik/open-component-model that referenced this pull request May 21, 2026
… into feat/1043

The branch had merged main mid-way through the credentials
map[string]string -> runtime.Typed migration, leaving the Go workspace
internally inconsistent and unable to build (cli and kubernetes/controller).

Merging open-component-model#2599
("feat: 1047 typed credentials - full migration path") brings the
completed migration so all binding modules agree on the credentials API.

Conflicts (all in bindings/go/constructor, migration-only, resolved in
favour of open-component-model#2599):
- construct.go            provider.ResolveTyped -> provider.Resolve
- construct_resource_test.go  mockCredentialProvider.Resolve returns runtime.Typed
- go.mod / go.sum         credentials v0.0.11 -> v0.0.12

Verified: `go build ./...` is clean for cli and kubernetes/controller;
`go vet` is clean for the bindings/go/oci/integration module.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jakobmoellerdev added a commit that referenced this pull request May 22, 2026
…credentials (gate 5) (#2602)

## Summary

Gate 5 of the typed credentials migration (#1047). Migrates `plugin`,
`constructor`, and `input/*` modules from `map[string]string` to
`runtime.Typed` credentials.

This continues the series started in gates 1-4 (blob, signing, rsa,
repository, sigstore, oci, constructor published as PR #2598).

### Modules changed

| Module | Change |
|--------|--------|
| `bindings/go/constructor` | `Resolver.Resolve` return type
`map[string]string` → `runtime.Typed`; bump credentials v0.0.11→v0.0.12
|
| `bindings/go/input/dir` | `ProcessResource`/`ProcessSource`
credentials param `map[string]string` → `runtime.Typed` |
| `bindings/go/input/file` | same |
| `bindings/go/input/utf8` | same |
| `bindings/go/plugin` | All contract interfaces, registry
implementations, handlers, converters, test plugins |

### Key design decisions

- **Client side** (`toCredentials`): `nil` credentials → sends `"{}"`
JSON to preserve valid Authorization header format
- **Server side** (handlers): deserialize Authorization header into
`&runtime.Raw{}` since concrete type is unknown at HTTP boundary
- **`plugin/go.mod`**: uses `replace` directive pointing to local
`../constructor` (gate 5 constructor not yet released as module tag)

### Related issues
- Part of #1047 (typed credentials migration)
- Supersedes draft PR #2599

## Test plan

- [x] `go build ./...` passes in all 5 affected modules  
- [x] `go test ./...` passes in `constructor`, `input/dir`,
`input/file`, `input/utf8`
- [x] `go test ./...` passes in `plugin` (96 files changed, all
registry/handler/flow tests pass)
- [ ] Integration tests with downstream modules (gates 6-8 not yet
migrated)

---------

Signed-off-by: Jakob Möller <contact@jakob-moeller.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>

# Conflicts:
#	bindings/go/plugin/manager/registries/componentversionrepository/handlers.go
#	bindings/go/plugin/manager/registries/componentversionrepository/implementations.go
#	bindings/go/plugin/manager/registries/componentversionrepository/implementations_test.go
#	bindings/go/plugin/manager/registries/input/implementations_test.go
#	bindings/go/plugin/manager/registries/input/registry_test.go
#	bindings/go/plugin/manager/registries/resource/contract.go
#	bindings/go/plugin/manager/registries/resource/endpoints_function.go
#	bindings/go/plugin/manager/registries/resource/implementations.go
#	bindings/go/plugin/manager/registries/resource/implementations_test.go
#	bindings/go/plugin/manager/registries/resource/registry_test.go
#	bindings/go/plugin/manager/registries/signinghandler/handlers_test.go
#	bindings/go/plugin/manager/registries/signinghandler/implementations.go
#	bindings/go/plugin/manager/registries/signinghandler/implementations_test.go
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
matthiasbruns and others added 7 commits May 22, 2026 07:50
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
Update oci module from v0.0.40/v0.0.41 to v0.0.43 in cli, cli/integration,
transfer, and helm modules. Also remove intermediate FromDirectCredentials
and FromTyped helpers from oci/spec/credentials/v1/oci_credentials.go that
referenced deleted symbols; ConvertToOCICredentials in convert.go is the
correct public API.

On-behalf-of: @SAP <jakob.moeller@sap.com>
@jakobmoellerdev jakobmoellerdev force-pushed the feat/1047_typed_credentials_phase_3_consumers branch from af0664b to 3e75ee6 Compare May 22, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature new feature, enhancement, improvement, extension size/l Large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants