summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-05 04:51:55 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-05 04:51:55 +0000
commitd5378fd420bdde93902e45d47fc67c9444959f0a (patch)
tree500fffdac96019b020a4ecca34e2513cb6249d1d
parent10eabdb147f1330a9f3e68a56e7fd78a92b31fd7 (diff)
automatic import of python-keyvaultlibopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-keyvaultlib.spec335
-rw-r--r--sources1
3 files changed, 337 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..856fd2f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/keyvaultlib-1.1.4.tar.gz
diff --git a/python-keyvaultlib.spec b/python-keyvaultlib.spec
new file mode 100644
index 0000000..408717c
--- /dev/null
+++ b/python-keyvaultlib.spec
@@ -0,0 +1,335 @@
+%global _empty_manifest_terminate_build 0
+Name: python-keyvaultlib
+Version: 1.1.4
+Release: 1
+Summary: A KeyVault client wrapper that helps transition between using ADAL (Active Directory Authentication Libraries) and MSI (Managed Service Identity) as a token provider
+License: MIT License
+URL: https://github.com/dany74q/keyvaultlib
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/46/38/e486dd59a52711ea23813b367874e7d06b92c73ca7356ba1bf672d512756/keyvaultlib-1.1.4.tar.gz
+BuildArch: noarch
+
+Requires: python3-msrestazure
+Requires: python3-azure-keyvault
+Requires: python3-azure-common
+Requires: python3-six
+Requires: python3-urllib3
+
+%description
+# keyvaultlib
+A KeyVault client wrapper that helps transition between using ADAL (Active Directory Authentication Libraries) and MSI (Managed Service Identity) as a token provider.
+Moreover, this library provides support for User-Assigned identities (MSI) and non-public (e.g. Government) Azure clouds.
+
+# What is KeyVault ?
+Key Vault is an Azure managed cloud service that allows you to securely store secrets in a variety of forms:
+- Credentials
+- Connection Strings
+- Private Keys and Certificates in various formats
+- ...
+
+It provides auditing and integrates easily with AAD (Azure-Active-Directory) for user or application based authorization.
+More about KeyVault can be found in the following link:
+https://docs.microsoft.com/en-us/azure/key-vault/key-vault-overview
+
+# What is ADAL (Active Directory Authentication Libraries) ?
+ADAL are a set of libraries provided by the AAD (Azure-Active-Directory) team in a variety of programming languages
+that allows one to easily interact with their cloud active directory.
+For example, the libraries could be used for authentication and authorization with Azure resources
+
+More about ADAL can be found in the following link:
+https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-libraries
+
+# What is MSI (Managed-Service-Identity) ?
+MSI was created to ease the authentication flow for Azure services, while providing a per-VM granularity of control.
+Once MSI is enabled on your VM, your virtual machine will be assigned an application or user client ID,
+with which you could easily receive access tokens for Azure resources, which you may then authorize your VM to use.
+It also saves the need to store your service principal information on disk, or worse, in your code base.
+
+More about MSI can be found in the following link:
+https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/overview
+
+# How to use this wrapper effectively ?
+This KeyVault client was created for reducing the small code duplication involving the use of either MSI or ADAL / Service Principal Credentials.
+A common use case being - having part of your code running on Azure VMs while another part running on your local machine or VM,
+where MSI is not accessible.
+
+# Example
+First, install the library via:
+
+$> pip install keyvaultlib
+
+Next, import KeyVaultOAuthClient and choose your authentication strategy;
+
+Currently supported: Using Service Principal credentials for ADAL or MSI
+
+```python
+from keyvaultlib.key_vault import KeyVaultOAuthClient
+
+# MSI Example
+client = KeyVaultOAuthClient(use_msi=True)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+
+# MSI - User Assigned Identity example
+client = KeyVaultOAuthClient(use_msi=True, client_id='my_user_assigned_client_id')
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+
+# ADAL / SPN Example
+client = KeyVaultOAuthClient(
+ client_id='my_user_or_app_client_id',
+ client_secret='my_user_or_app_client_secret',
+ tenant_id='my_AAD_tenant_id'
+)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+
+# Setting retry counts for request-throttling (Default is 5)
+client = KeyVaultOAuthClient(
+ client_id='my_user_or_app_client_id',
+ client_secret='my_user_or_app_client_secret',
+ tenant_id='my_AAD_tenant_id'
+)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret', throttling_retry_attempts=2)
+
+# Using government / non-public Azure Clouds Example:
+from msrestazure.azure_cloud import AZURE_US_GOV_CLOUD
+
+client = KeyVaultOAuthClient(
+ client_id='my_user_or_app_client_id',
+ client_secret='my_user_or_app_client_secret',
+ tenant_id='my_AAD_tenant_id',
+ cloud=AZURE_US_GOV_CLOUD
+)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+```
+
+
+
+
+%package -n python3-keyvaultlib
+Summary: A KeyVault client wrapper that helps transition between using ADAL (Active Directory Authentication Libraries) and MSI (Managed Service Identity) as a token provider
+Provides: python-keyvaultlib
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-keyvaultlib
+# keyvaultlib
+A KeyVault client wrapper that helps transition between using ADAL (Active Directory Authentication Libraries) and MSI (Managed Service Identity) as a token provider.
+Moreover, this library provides support for User-Assigned identities (MSI) and non-public (e.g. Government) Azure clouds.
+
+# What is KeyVault ?
+Key Vault is an Azure managed cloud service that allows you to securely store secrets in a variety of forms:
+- Credentials
+- Connection Strings
+- Private Keys and Certificates in various formats
+- ...
+
+It provides auditing and integrates easily with AAD (Azure-Active-Directory) for user or application based authorization.
+More about KeyVault can be found in the following link:
+https://docs.microsoft.com/en-us/azure/key-vault/key-vault-overview
+
+# What is ADAL (Active Directory Authentication Libraries) ?
+ADAL are a set of libraries provided by the AAD (Azure-Active-Directory) team in a variety of programming languages
+that allows one to easily interact with their cloud active directory.
+For example, the libraries could be used for authentication and authorization with Azure resources
+
+More about ADAL can be found in the following link:
+https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-libraries
+
+# What is MSI (Managed-Service-Identity) ?
+MSI was created to ease the authentication flow for Azure services, while providing a per-VM granularity of control.
+Once MSI is enabled on your VM, your virtual machine will be assigned an application or user client ID,
+with which you could easily receive access tokens for Azure resources, which you may then authorize your VM to use.
+It also saves the need to store your service principal information on disk, or worse, in your code base.
+
+More about MSI can be found in the following link:
+https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/overview
+
+# How to use this wrapper effectively ?
+This KeyVault client was created for reducing the small code duplication involving the use of either MSI or ADAL / Service Principal Credentials.
+A common use case being - having part of your code running on Azure VMs while another part running on your local machine or VM,
+where MSI is not accessible.
+
+# Example
+First, install the library via:
+
+$> pip install keyvaultlib
+
+Next, import KeyVaultOAuthClient and choose your authentication strategy;
+
+Currently supported: Using Service Principal credentials for ADAL or MSI
+
+```python
+from keyvaultlib.key_vault import KeyVaultOAuthClient
+
+# MSI Example
+client = KeyVaultOAuthClient(use_msi=True)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+
+# MSI - User Assigned Identity example
+client = KeyVaultOAuthClient(use_msi=True, client_id='my_user_assigned_client_id')
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+
+# ADAL / SPN Example
+client = KeyVaultOAuthClient(
+ client_id='my_user_or_app_client_id',
+ client_secret='my_user_or_app_client_secret',
+ tenant_id='my_AAD_tenant_id'
+)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+
+# Setting retry counts for request-throttling (Default is 5)
+client = KeyVaultOAuthClient(
+ client_id='my_user_or_app_client_id',
+ client_secret='my_user_or_app_client_secret',
+ tenant_id='my_AAD_tenant_id'
+)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret', throttling_retry_attempts=2)
+
+# Using government / non-public Azure Clouds Example:
+from msrestazure.azure_cloud import AZURE_US_GOV_CLOUD
+
+client = KeyVaultOAuthClient(
+ client_id='my_user_or_app_client_id',
+ client_secret='my_user_or_app_client_secret',
+ tenant_id='my_AAD_tenant_id',
+ cloud=AZURE_US_GOV_CLOUD
+)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+```
+
+
+
+
+%package help
+Summary: Development documents and examples for keyvaultlib
+Provides: python3-keyvaultlib-doc
+%description help
+# keyvaultlib
+A KeyVault client wrapper that helps transition between using ADAL (Active Directory Authentication Libraries) and MSI (Managed Service Identity) as a token provider.
+Moreover, this library provides support for User-Assigned identities (MSI) and non-public (e.g. Government) Azure clouds.
+
+# What is KeyVault ?
+Key Vault is an Azure managed cloud service that allows you to securely store secrets in a variety of forms:
+- Credentials
+- Connection Strings
+- Private Keys and Certificates in various formats
+- ...
+
+It provides auditing and integrates easily with AAD (Azure-Active-Directory) for user or application based authorization.
+More about KeyVault can be found in the following link:
+https://docs.microsoft.com/en-us/azure/key-vault/key-vault-overview
+
+# What is ADAL (Active Directory Authentication Libraries) ?
+ADAL are a set of libraries provided by the AAD (Azure-Active-Directory) team in a variety of programming languages
+that allows one to easily interact with their cloud active directory.
+For example, the libraries could be used for authentication and authorization with Azure resources
+
+More about ADAL can be found in the following link:
+https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-libraries
+
+# What is MSI (Managed-Service-Identity) ?
+MSI was created to ease the authentication flow for Azure services, while providing a per-VM granularity of control.
+Once MSI is enabled on your VM, your virtual machine will be assigned an application or user client ID,
+with which you could easily receive access tokens for Azure resources, which you may then authorize your VM to use.
+It also saves the need to store your service principal information on disk, or worse, in your code base.
+
+More about MSI can be found in the following link:
+https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/overview
+
+# How to use this wrapper effectively ?
+This KeyVault client was created for reducing the small code duplication involving the use of either MSI or ADAL / Service Principal Credentials.
+A common use case being - having part of your code running on Azure VMs while another part running on your local machine or VM,
+where MSI is not accessible.
+
+# Example
+First, install the library via:
+
+$> pip install keyvaultlib
+
+Next, import KeyVaultOAuthClient and choose your authentication strategy;
+
+Currently supported: Using Service Principal credentials for ADAL or MSI
+
+```python
+from keyvaultlib.key_vault import KeyVaultOAuthClient
+
+# MSI Example
+client = KeyVaultOAuthClient(use_msi=True)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+
+# MSI - User Assigned Identity example
+client = KeyVaultOAuthClient(use_msi=True, client_id='my_user_assigned_client_id')
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+
+# ADAL / SPN Example
+client = KeyVaultOAuthClient(
+ client_id='my_user_or_app_client_id',
+ client_secret='my_user_or_app_client_secret',
+ tenant_id='my_AAD_tenant_id'
+)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+
+# Setting retry counts for request-throttling (Default is 5)
+client = KeyVaultOAuthClient(
+ client_id='my_user_or_app_client_id',
+ client_secret='my_user_or_app_client_secret',
+ tenant_id='my_AAD_tenant_id'
+)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret', throttling_retry_attempts=2)
+
+# Using government / non-public Azure Clouds Example:
+from msrestazure.azure_cloud import AZURE_US_GOV_CLOUD
+
+client = KeyVaultOAuthClient(
+ client_id='my_user_or_app_client_id',
+ client_secret='my_user_or_app_client_secret',
+ tenant_id='my_AAD_tenant_id',
+ cloud=AZURE_US_GOV_CLOUD
+)
+secret = client.get_secret_with_key_vault_name('my-key-vault', 'my-secret')
+```
+
+
+
+
+%prep
+%autosetup -n keyvaultlib-1.1.4
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-keyvaultlib -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.4-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..73316ff
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+041accf5112aba6e4b119b016c8a2914 keyvaultlib-1.1.4.tar.gz