ocm-accessmethods
On this page
Description
Access methods are used to handle the access to the content of artifacts described in a component version. Therefore, an artifact entry contains an access specification describing the access attributes for the dedicated artifact.
The following list describes the supported access methods, their versions
and specification formats.
Typically there is special support for the CLI artifact add commands.
The access method specification can be put below the access field.
If always requires the field type describing the kind and version
shown below.
- Access type - git- This method implements the access of the content of a git commit stored in a Git repository. - The following versions are supported: - Version - v1alpha1- The type specific specification fields are: - repoUrlstring- Repository URL with or without scheme. 
- ref(optional) string- Original ref used to get the commit from 
- commitstring- The sha/id of the git commit 
 
 - Options used to configure fields: - –accessRepository,- –commit,- –reference
- Access type - gitHub- This method implements the access of the content of a git commit stored in a GitHub repository. - The following versions are supported: - Version - v1- The type specific specification fields are: - repoUrlstring- Repository URL with or without scheme. 
- ref(optional) string- Original ref used to get the commit from 
- commitstring- The sha/id of the git commit 
 
 - Options used to configure fields: - –accessHostname,- –accessRepository,- –commit
- Access type - helm- This method implements the access of a Helm chart stored in a Helm repository. - The following versions are supported: - Version - v1- The type specific specification fields are: - helmRepositorystring- Helm repository URL. 
- helmChartstring- The name of the Helm chart and its version separated by a colon. 
- versionstring- The version of the Helm chart if not specified as part of the chart name. 
- caCertstring- An optional TLS root certificate. 
- keyringstring- An optional keyring used to verify the chart. 
 - It uses the consumer identity type HelmChartRepository with the fields for a hostpath identity matcher (see ocm get credentials). 
 - Options used to configure fields: - –accessRepository,- –accessVersion,- –package
- Access type - localBlob- This method is used to store a resource blob along with the component descriptor on behalf of the hosting OCM repository. - Its implementation is specific to the implementation of OCM repository used to read the component descriptor. Every repository implementation may decide how and where local blobs are stored, but it MUST provide an implementation for this method. - Regardless of the chosen implementation the attribute specification is defined globally the same. - The following versions are supported: - Version - v1- The type specific specification fields are: - localReferencestring- Repository type specific location information as string. The value may encode any deep structure, but typically just an access path is sufficient. 
- mediaTypestring- The media type of the blob used to store the resource. It may add format information like - +taror- +gzip.
- referenceName(optional) string- This optional attribute may contain identity information used by other repositories to restore some global access with an identity related to the original source. - For example, if an OCI artifact originally referenced using the access method - ociArtifactis stored during some transport step as local artifact, the reference name can be set to its original repository name. An import step into an OCI based OCM repository may then decide to make this artifact available again as regular OCI artifact.
- globalAccess(optional) access method specification- If a resource blob is stored locally, the repository implementation may decide to provide an external access information (independent of the OCM model). - For example, an OCI artifact stored as local blob can be additionally stored as regular OCI artifact in an OCI registry. - This additional external access information can be added using a second external access method specification. 
 
 - Options used to configure fields: - –globalAccess,- –hint,- –mediaType,- –reference
- Access type - maven- This method implements the access of a Maven artifact in a Maven repository. - The following versions are supported: - Version - v1- The type specific specification fields are: - repoUrlstring- URL of the Maven repository 
- groupIdstring- The groupId of the Maven artifact 
- artifactIdstring- The artifactId of the Maven artifact 
- versionstring- The version name of the Maven artifact 
- classifierstring- The optional classifier of the Maven artifact 
- extensionstring- The optional extension of the Maven artifact 
 
 - Options used to configure fields: - –accessRepository,- –accessVersion,- –artifactId,- –classifier,- –extension,- –groupId
- Access type - none- dummy resource with no access 
- Access type - npm- This method implements the access of an NPM package in an NPM registry. - The following versions are supported: - Version - v1- The type specific specification fields are: - registrystring- Base URL of the NPM registry. 
- packagestring- The name of the NPM package 
- versionstring- The version name of the NPM package 
 
 - Options used to configure fields: - –accessRepository,- –accessVersion,- –package
- Access type - ociArtifact- This method implements the access of an OCI artifact stored in an OCI registry. - The following versions are supported: - Version - v1- The type specific specification fields are: - imageReferencestring- OCI image/artifact reference following the possible docker schemes: - <repo>/<artifact>:<digest>@<tag>
- [<port>]/<repo path>/<artifact>:<version>@<tag> 
 
 
 - Options used to configure fields: - –reference
- Access type - ociBlob- This method implements the access of an OCI blob stored in an OCI repository. - The following versions are supported: - Version - v1- The type specific specification fields are: - imageReferencestring- OCI repository reference (this artifact name used to store the blob). 
- mediaTypestring- The media type of the blob 
- digeststring- The digest of the blob used to access the blob in the OCI repository. 
- sizeinteger- The size of the blob 
 
 - Options used to configure fields: - –digest,- –mediaType,- –reference,- –size
- Access type - ocm- This method implements the access of any resource artifact stored in an OCM repository. Only repository types supporting remote access should be used. - The following versions are supported: - Version - v1- The type specific specification fields are: - ocmRepositoryjson- The repository spec for the OCM repository 
- componentstring- (Optional) The name of the component. The default is the own component. 
- versionstring- (Optional) The version of the component. The default is the own component version. 
- resourceRefrelative resource ref- The resource reference of the denoted resource relative to the given component version. 
 - It uses the consumer identity and credentials for the intermediate repositories and the final resource access. 
 - Options used to configure fields: - –accessComponent,- –accessRepository,- –accessVersion,- –identityPath
- Access type - s3- This method implements the access of a blob stored in an S3 bucket. - The following versions are supported: - Version - v1- The type specific specification fields are: - region(optional) string- OCI repository reference (this artifact name used to store the blob). 
- bucketstring- The name of the S3 bucket containing the blob 
- keystring- The key of the desired blob 
- version(optional) string- The key of the desired blob 
- mediaType(optional) string- The media type of the content 
 
- Version - v2- The type specific specification fields are: - region(optional) string- OCI repository reference (this artifact name used to store the blob). 
- bucketNamestring- The name of the S3 bucket containing the blob 
- objectKeystring- The key of the desired blob 
- version(optional) string- The key of the desired blob 
- mediaType(optional) string- The media type of the content 
 
 - Options used to configure fields: - –accessVersion,- –bucket,- –mediaType,- –reference,- –region
- Access type - wget- This method implements access to resources stored on an http server. - The following versions are supported: - Version - v1- The - urlis the url pointing to the http endpoint from which a resource is downloaded. The- mimeTypecan be used to specify the MIME type of the resource.- This blob type specification supports the following fields: - urlstring
 - This REQUIRED property describes the url from which the resource is to be downloaded. - mediaTypestring
 - This OPTIONAL property describes the media type of the resource to be downloaded. If omitted, ocm tries to read the mediaType from the Content-Type header of the http response. If the mediaType cannot be set from the Content-Type header as well, ocm tries to deduct the mediaType from the URL. If that is not possible either, the default media type is defaulted to application/octet-stream. - headermap[string][]string
 - This OPTIONAL property describes the http headers to be set in the http request to the server. - verbstring
 - This OPTIONAL property describes the http verb (also known as http request method) for the http request. If omitted, the http verb is defaulted to GET. - body[]byte
 - This OPTIONAL property describes the http body to be included in the request. - noredirectbool
 - This OPTIONAL property describes whether http redirects should be disabled. If omitted, it is defaulted to false (so, per default, redirects are enabled). 
 - Options used to configure fields: - –body,- –header,- –mediaType,- –noredirect,- –url,- –verb