Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

akeyless-cloud-id

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

akeyless-cloud-id

AKEYLESS Cloud ID Retriever

  • 0.2.3
  • PyPI
  • Socket score

Maintainers
1

######################## 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

Keywords

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc