Skip to main content

AKEYLESS Cloud ID Retriever

Project description

######################## Akeyless Python Cloud Id ########################

Retrieves cloud identity

Currently, AWS, GCP and Azure clouds are supported. In order to get cloud identity you should import this package and call the relevant method per your chosen CSP:

  • AWS: "generate" (If no aws access id/key and token are provided they will be retrieved automatically from the default session.)
  • GCP: "generateGcp"
  • Azure: "generateAzure"

Minimum requirements

  • Python 3.5+
  • urllib3 >= 1.15
  • requests

Optional Dependencies

  • boto3
  • google-auth
  • azure-identity

Installation

.. code:: pip install akeyless-python-cloud-id

AWS:

To install with AWS:

.. code::

pip install akeyless-python-cloud-id[aws]

The following additional packages will be installed:

  • boto3

GCP:

To install with GCP:

.. code::

pip install akeyless-python-cloud-id[gcp]

The following additional packages will be installed:

  • google-auth

To install with Azure:

.. code::

pip install akeyless-python-cloud-id[azure]

The following additional packages will be installed:

  • azure-identity

Usage


Such code can be used, for example, in order to retrieve secrets from Akeyless as part of AWS Code Pipeline:

.. code:: pip install git+https://github.com/akeylesslabs/akeyless-python-sdk

import akeyless_api_gateway
from akeyless_cloud_id import CloudId

configuration = akeyless_api_gateway.Configuration()
configuration.host="http://<api-gateway-host>:<port>"

api_instance = akeyless_api_gateway.DefaultApi(akeyless_api_gateway.ApiClient(configuration))

cloud_id = CloudId()
# for AWS use:
id = cloud_id.generate()
# For Azure use:
id = cloud_id.generateAzure()
# For GCP use:
id = cloud_id.generateGcp()

access_id = event['CodePipeline.job']['data']['actionConfiguration']['configuration']['UserParameters']

auth_response = api_instance.auth(access_id, access_type="aws_iam", cloud_id=id)
token = auth_response.token

postgresPassword = api_instance.get_secret_value("PostgresPassword", token)

License


This SDK is distributed under the Apache License, Version 2.0_ see LICENSE.txt for more information.

.. _Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akeyless_cloud_id-0.3.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

akeyless_cloud_id-0.3.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file akeyless_cloud_id-0.3.1.tar.gz.

File metadata

  • Download URL: akeyless_cloud_id-0.3.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for akeyless_cloud_id-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6844136fe473afbedc9ca3db28da5c0b01d8dcab22f6b9dd43fe042a27dbf299
MD5 ae8f8aec44b57fbb414ceadf14d43deb
BLAKE2b-256 03f1617bd6d68a9790e28951844ac72cf608b986d726af0c18ec9d34beb22f15

See more details on using hashes here.

File details

Details for the file akeyless_cloud_id-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for akeyless_cloud_id-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39c01ff73546c9d6a7d5d7bd0e24f8b8db22788b386771ecc93ce9dd5aeabf3d
MD5 069bc1b4f5349317c86e3928a3eb15c1
BLAKE2b-256 7846319872e34b08fa5cd6c53f0236ee0dd939cd99b966e6c55227cac337ebcd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page