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

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

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.2.3.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: akeyless_cloud_id-0.2.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for akeyless_cloud_id-0.2.3.tar.gz
Algorithm Hash digest
SHA256 76ff6fca42c618183c0f0c1418973b27154e1d2428cb391dba32a329e8fed4f2
MD5 5ffc183622bd3cd0b071ad3153c6410e
BLAKE2b-256 d03c06fdf7d87d5bf87702b20a35e54f8a137c2f1a4dc82b544b67602fb7b1eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: akeyless_cloud_id-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for akeyless_cloud_id-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e122ff0c1060686db2f229093b920b2ba70c495779058f1b9a540a85e2643dbe
MD5 a40bbbce1af41ddd17aebc4e1edb4783
BLAKE2b-256 c18cc158c962ee9bdf62a6e4cc60afa53a231968d69411fd3dc9c5127343b16d

See more details on using hashes here.

Supported by

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