summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-12 02:37:47 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-12 02:37:47 +0000
commit8abc3f56b0eb354b156351708f75ba8ef81117f6 (patch)
tree0c0ad843c42baad56d025a376e7f0823b7317e6a
parentcddf9f1f2d8ab11378b48bb2e546a7469c19bee5 (diff)
automatic import of python-cloudauthz
-rw-r--r--.gitignore1
-rw-r--r--python-cloudauthz.spec371
-rw-r--r--sources1
3 files changed, 373 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..042061c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cloudauthz-0.6.0.tar.gz
diff --git a/python-cloudauthz.spec b/python-cloudauthz.spec
new file mode 100644
index 0000000..3cb39f5
--- /dev/null
+++ b/python-cloudauthz.spec
@@ -0,0 +1,371 @@
+%global _empty_manifest_terminate_build 0
+Name: python-cloudauthz
+Version: 0.6.0
+Release: 1
+Summary: Implements means of authorization delegation on cloud-based resource providers.
+License: MIT
+URL: https://github.com/galaxyproject/cloudauthz
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/65/46/639ff537ab106ae3fd16a60b949d983acf78d8e065cb3454df340b4e1724/cloudauthz-0.6.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+Requires: python3-adal
+
+%description
+# CloudAuthz
+
+## Installation
+Install the latest release from PyPi:
+
+ pip install cloudauthz
+
+
+## Example
+
+CloudAuthz can authorize access to [Amazon Web Services (AWS)](#amazon-web-services), [Microsoft Azure](#microsoft-azure), and [Google Cloud Platform (GCP)](#google-cloud-platform). An example for each provider is given in the following.
+
+- ### Amazon Web Services
+
+ ```python
+ from cloudauthz import *
+
+ cloudauthz = CloudAuthz()
+ config = {
+ "id_token": " ... ",
+ "role_arn": " ... "
+ }
+ credentials = cloudauthz.authorize("aws", config)
+ ```
+
+ The `credentials` object is a dictionary as the following:
+
+ ```json
+ {
+ "SecretAccessKey": " ... ",
+ "SessionToken": " ... ",
+ "Expiration": "2019-05-28T02:12:45Z",
+ "AccessKeyId": " ... "
+ }
+ ```
+
+- ### Microsoft Azure
+
+ ```python
+ from cloudauthz import *
+
+ cloudauthz = CloudAuthz()
+ config = {
+ "tenant_id": " ... ",
+ "client_id": " ... ",
+ "client_secret": " ... "
+ }
+ credentials = cloudauthz.authorize("azure", config)
+ ```
+
+ The `credentials` object is a dictionary as the following:
+
+ ```json
+ {
+ "expiresIn": 3599,
+ "_authority": "https://login.microsoftonline.com/TENANT_ID",
+ "resource": "https://storage.azure.com/",
+ "tokenType": "Bearer",
+ "expiresOn": "2018-06-28 12:30:24.895661",
+ "isMRRT": true,
+ "_clientId": " ... ",
+ "accessToken": " ... ",
+ }
+ ```
+
+- ### Google Cloud Platform
+
+ ```python
+ from cloudauthz import *
+
+ cloudauthz = CloudAuthz()
+ config = {
+ "project_id": "...",
+ "private_key_id": "...",
+ "private_key": "...",
+ "client_email": "...",
+ "client_id": "..."
+ }
+ credentials = cloudauthz.authorize("gcp", config)
+ ```
+
+ The `credentials` object is a dictionary containing the following keys:
+
+ ```json
+ {
+ "type": "service_account",
+ "project_id": "...",
+ "private_key_id": "...",
+ "private_key": "...",
+ "client_email": "...",
+ "client_id": "...",
+ "auth_uri": "https://accounts.google.com/o/oauth2/auth",
+ "token_uri": "https://oauth2.googleapis.com/token",
+ "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
+ "client_x509_cert_url": "..."
+ }
+ ```
+
+
+
+
+%package -n python3-cloudauthz
+Summary: Implements means of authorization delegation on cloud-based resource providers.
+Provides: python-cloudauthz
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-cloudauthz
+# CloudAuthz
+
+## Installation
+Install the latest release from PyPi:
+
+ pip install cloudauthz
+
+
+## Example
+
+CloudAuthz can authorize access to [Amazon Web Services (AWS)](#amazon-web-services), [Microsoft Azure](#microsoft-azure), and [Google Cloud Platform (GCP)](#google-cloud-platform). An example for each provider is given in the following.
+
+- ### Amazon Web Services
+
+ ```python
+ from cloudauthz import *
+
+ cloudauthz = CloudAuthz()
+ config = {
+ "id_token": " ... ",
+ "role_arn": " ... "
+ }
+ credentials = cloudauthz.authorize("aws", config)
+ ```
+
+ The `credentials` object is a dictionary as the following:
+
+ ```json
+ {
+ "SecretAccessKey": " ... ",
+ "SessionToken": " ... ",
+ "Expiration": "2019-05-28T02:12:45Z",
+ "AccessKeyId": " ... "
+ }
+ ```
+
+- ### Microsoft Azure
+
+ ```python
+ from cloudauthz import *
+
+ cloudauthz = CloudAuthz()
+ config = {
+ "tenant_id": " ... ",
+ "client_id": " ... ",
+ "client_secret": " ... "
+ }
+ credentials = cloudauthz.authorize("azure", config)
+ ```
+
+ The `credentials` object is a dictionary as the following:
+
+ ```json
+ {
+ "expiresIn": 3599,
+ "_authority": "https://login.microsoftonline.com/TENANT_ID",
+ "resource": "https://storage.azure.com/",
+ "tokenType": "Bearer",
+ "expiresOn": "2018-06-28 12:30:24.895661",
+ "isMRRT": true,
+ "_clientId": " ... ",
+ "accessToken": " ... ",
+ }
+ ```
+
+- ### Google Cloud Platform
+
+ ```python
+ from cloudauthz import *
+
+ cloudauthz = CloudAuthz()
+ config = {
+ "project_id": "...",
+ "private_key_id": "...",
+ "private_key": "...",
+ "client_email": "...",
+ "client_id": "..."
+ }
+ credentials = cloudauthz.authorize("gcp", config)
+ ```
+
+ The `credentials` object is a dictionary containing the following keys:
+
+ ```json
+ {
+ "type": "service_account",
+ "project_id": "...",
+ "private_key_id": "...",
+ "private_key": "...",
+ "client_email": "...",
+ "client_id": "...",
+ "auth_uri": "https://accounts.google.com/o/oauth2/auth",
+ "token_uri": "https://oauth2.googleapis.com/token",
+ "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
+ "client_x509_cert_url": "..."
+ }
+ ```
+
+
+
+
+%package help
+Summary: Development documents and examples for cloudauthz
+Provides: python3-cloudauthz-doc
+%description help
+# CloudAuthz
+
+## Installation
+Install the latest release from PyPi:
+
+ pip install cloudauthz
+
+
+## Example
+
+CloudAuthz can authorize access to [Amazon Web Services (AWS)](#amazon-web-services), [Microsoft Azure](#microsoft-azure), and [Google Cloud Platform (GCP)](#google-cloud-platform). An example for each provider is given in the following.
+
+- ### Amazon Web Services
+
+ ```python
+ from cloudauthz import *
+
+ cloudauthz = CloudAuthz()
+ config = {
+ "id_token": " ... ",
+ "role_arn": " ... "
+ }
+ credentials = cloudauthz.authorize("aws", config)
+ ```
+
+ The `credentials` object is a dictionary as the following:
+
+ ```json
+ {
+ "SecretAccessKey": " ... ",
+ "SessionToken": " ... ",
+ "Expiration": "2019-05-28T02:12:45Z",
+ "AccessKeyId": " ... "
+ }
+ ```
+
+- ### Microsoft Azure
+
+ ```python
+ from cloudauthz import *
+
+ cloudauthz = CloudAuthz()
+ config = {
+ "tenant_id": " ... ",
+ "client_id": " ... ",
+ "client_secret": " ... "
+ }
+ credentials = cloudauthz.authorize("azure", config)
+ ```
+
+ The `credentials` object is a dictionary as the following:
+
+ ```json
+ {
+ "expiresIn": 3599,
+ "_authority": "https://login.microsoftonline.com/TENANT_ID",
+ "resource": "https://storage.azure.com/",
+ "tokenType": "Bearer",
+ "expiresOn": "2018-06-28 12:30:24.895661",
+ "isMRRT": true,
+ "_clientId": " ... ",
+ "accessToken": " ... ",
+ }
+ ```
+
+- ### Google Cloud Platform
+
+ ```python
+ from cloudauthz import *
+
+ cloudauthz = CloudAuthz()
+ config = {
+ "project_id": "...",
+ "private_key_id": "...",
+ "private_key": "...",
+ "client_email": "...",
+ "client_id": "..."
+ }
+ credentials = cloudauthz.authorize("gcp", config)
+ ```
+
+ The `credentials` object is a dictionary containing the following keys:
+
+ ```json
+ {
+ "type": "service_account",
+ "project_id": "...",
+ "private_key_id": "...",
+ "private_key": "...",
+ "client_email": "...",
+ "client_id": "...",
+ "auth_uri": "https://accounts.google.com/o/oauth2/auth",
+ "token_uri": "https://oauth2.googleapis.com/token",
+ "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
+ "client_x509_cert_url": "..."
+ }
+ ```
+
+
+
+
+%prep
+%autosetup -n cloudauthz-0.6.0
+
+%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-cloudauthz -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed Apr 12 2023 Python_Bot <Python_Bot@openeuler.org> - 0.6.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..2bfe390
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+5d271d6ddc90d6be7526305bd19ebb6f cloudauthz-0.6.0.tar.gz