
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
ionoscloud-container-registry
Advanced tools
Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls.
The IONOS Cloud SDK for Python provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. It is designed for developers who are building applications in Python. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.
Requirements:
Since this package is hosted on Pypi you can install it by using:
pip install ionoscloud-container-registry
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/ionos-cloud/sdk-python-container-registry.git
Note: you may need to run pip
with root permission: sudo pip install git+https://github.com/ionos-cloud/sdk-python-container-registry.git
Then import the package:
import ionoscloud_container_registry
Install via Setuptools.
python setup.py install --user
or sudo python setup.py install
to install the package for all users
Then import the package:
import ionoscloud_container_registry
NOTE: The Python SDK does not support Python 2. It only supports Python >= 3.5.
The username and password or the authentication token can be manually specified when initializing the SDK client:
configuration = ionoscloud_container_registry.Configuration(
username='YOUR_USERNAME',
password='YOUR_PASSWORD',
token='YOUR_TOKEN'
)
client = ionoscloud_container_registry.ApiClient(configuration)
Environment variables can also be used. This is an example of how one would do that:
import os
configuration = ionoscloud_container_registry.Configuration(
username=os.environ.get('IONOS_USERNAME'),
password=os.environ.get('IONOS_PASSWORD'),
token=os.environ.get('IONOS_TOKEN')
)
client = ionoscloud_container_registry.ApiClient(configuration)
Warning: Make sure to follow the Information Security Best Practices when using credentials within your code or storing them in a file.
You can use http proxies by setting the following environment variables:
IONOS_HTTP_PROXY
- proxy URLIONOS_HTTP_PROXY_HEADERS
- proxy headersEach line in IONOS_HTTP_PROXY_HEADERS
represents one header, where the header name and value is separated by a colon. Newline characters within a value need to be escaped. See this example:
Connection: Keep-Alive
User-Info: MyID
User-Group: my long\nheader value
Base URL for the HTTP operation can be changed in the following way:
import os
configuration = ionoscloud_container_registry.Configuration(
username=os.environ.get('IONOS_USERNAME'),
password=os.environ.get('IONOS_PASSWORD'),
host=os.environ.get('IONOS_API_URL'),
server_index=None,
)
client = ionoscloud_container_registry.ApiClient(configuration)
You can enable certificate pinning if you want to bypass the normal certificate checking procedure, by doing the following:
Set env variable IONOS_PINNED_CERT=<insert_sha256_public_fingerprint_here>
You can get the sha256 fingerprint most easily from the browser by inspecting the certificate.
All URIs are relative to https://api.ionos.com/containerregistries
Class | Method | HTTP request | Description |
---|---|---|---|
ArtifactsApi | registries_artifacts_get | GET /registries/{registryId}/artifacts | Retrieve all Artifacts by Registry |
ArtifactsApi | registries_repositories_artifacts_find_by_digest | GET /registries/{registryId}/repositories/{repositoryName}/artifacts/{digest} | Retrieve Artifact |
ArtifactsApi | registries_repositories_artifacts_get | GET /registries/{registryId}/repositories/{repositoryName}/artifacts | Retrieve all Artifacts by Repository |
ArtifactsApi | registries_repositories_artifacts_vulnerabilities_get | GET /registries/{registryId}/repositories/{repositoryName}/artifacts/{digest}/vulnerabilities | Retrieve all Vulnerabilities |
LocationsApi | locations_get | GET /locations | Get container registry locations |
NamesApi | names_check_usage | HEAD /names/{name} | Get container registry name availability |
RegistriesApi | registries_delete | DELETE /registries/{registryId} | Delete registry |
RegistriesApi | registries_find_by_id | GET /registries/{registryId} | Get a registry |
RegistriesApi | registries_get | GET /registries | List all container registries |
RegistriesApi | registries_patch | PATCH /registries/{registryId} | Update the properties of a registry |
RegistriesApi | registries_post | POST /registries | Create container registry |
RegistriesApi | registries_put | PUT /registries/{registryId} | Create or replace a container registry |
RepositoriesApi | registries_repositories_delete | DELETE /registries/{registryId}/repositories/{repositoryName} | Delete repository |
RepositoriesApi | registries_repositories_find_by_name | GET /registries/{registryId}/repositories/{repositoryName} | Retrieve Repository |
RepositoriesApi | registries_repositories_get | GET /registries/{registryId}/repositories | Retrieve all Repositories |
TokensApi | registries_tokens_delete | DELETE /registries/{registryId}/tokens/{tokenId} | Delete token |
TokensApi | registries_tokens_find_by_id | GET /registries/{registryId}/tokens/{tokenId} | Get token information |
TokensApi | registries_tokens_get | GET /registries/{registryId}/tokens | List all tokens for the container registry |
TokensApi | registries_tokens_patch | PATCH /registries/{registryId}/tokens/{tokenId} | Update token |
TokensApi | registries_tokens_post | POST /registries/{registryId}/tokens | Create token |
TokensApi | registries_tokens_put | PUT /registries/{registryId}/tokens/{tokenId} | Create or replace token |
VulnerabilitiesApi | vulnerabilities_find_by_id | GET /vulnerabilities/{vulnerabilityId} | Retrieve Vulnerability |
All URIs are relative to https://api.ionos.com/containerregistries
FAQs
Python SDK for the ionoscloud-container-registry API
We found that ionoscloud-container-registry demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.