Skip to content

Fix credential consumer identity issues #916

@fabianburth

Description

@fabianburth

Description
When trying to use the ocm k8s toolkit, several issues in the underlying libraries credential management were discovered.

  1. The ComponentVersionRepository and ResourceRepository in oci package set OCIRepository as consumer identity instead of OCIRegistry. This is unintended. We have to change this.
  2. If either the consumer identity defined in the graph or the one used to try to resolve credentials from the graph contains a scheme scheme, we do not match. Here, we should be more flexibel. Therefore, we might want to default scheme to https in the matcher if not set.
  3. Currently, we also mismatch if the scheme: oci and scheme: https (although oci is always resolved as https). So, as an UX improvement, we can be more lenient and allow that to match.
  4. Currently, some GetConsumerIdentity() methods default some identity properties (such as scheme: oci), even though the actual url did not contain a scheme at all. We should remove this defaulting to avoid confusing mismatches. Currently, such defaulting happens in the IdentityFromOCIRepository() in the blob transformers. Have a look at the PR closed as duplicate.

Done Criteria

  • correct the website section again (https://ocm.software/dev/docs/how-to/migrate-legacy-credentials/)
  • correct pathprefix replacements (you need to add */** glob patterns, if it is an actual prefix)
  • Code has been reviewed by other team members
  • Analysis of existing tests (Unit and Integration)
  • Unit Tests created for new code or existing Unit Tests updated
  • Integration Test Suite updated (includes deletion of existing unnecessary Integration Test and/or creation of new ones if required)
  • Enduser Documentation updated (if applicable)
  • Internal technical Documentation created/updated (if applicable)
  • Successful demonstration in Review

Metadata

Metadata

Labels

area/ipceiImportant Project of Common European Interestkind/tasksmall task, normally part of feature or epic

Type

No fields configured for Task.

Projects

Status
🔍 Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions