Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/keystoneauth1/identity/v3/__pycache__/k2k.cpython-39.pyc
Ðазад
a s�h� � @ sr d dl Zd dlZd dlmZ d dlmZ d dlmZ d dlm Z d dlm Z d dlmZ dZ G d d � d e j�ZdS )� N)�access)� exceptions)�base)� federation)�plugin)�session)�Keystone2Keystonec s� e Zd ZdZdZdZdZddddddddddd� eje e je e je e je e je e je e je e je e je eed�� fd d �Z ee e d�dd ��Zeje d�dd�Zeje e ejd�dd�Zejejd�dd�Z� ZS )r aR Plugin to execute the Keystone to Keyestone authentication flow. In this plugin, an ECP wrapped SAML assertion provided by a keystone Identity Provider (IdP) is used to request an OpenStack unscoped token from a keystone Service Provider (SP). :param base_plugin: Auth plugin already authenticated against the keystone IdP. :type base_plugin: keystoneauth1.identity.v3.base.BaseAuth :param service_provider: The Service Provider ID as returned by ServiceProviderManager.list() :type service_provider: str z/auth/OS-FEDERATION/saml2/ecpi. i/ NT) �trust_id�system_scope� domain_id�domain_name� project_id�project_name�project_domain_id�project_domain_name�reauthenticate�include_catalog)�base_plugin�service_providerr r r r r r r r r r c s2 t � jd||||||| | ||d� || _|| _d S )N� )�auth_urlr r r r r r r r r r )�super�__init__�_local_cloud_plugin�_sp_id) �selfr r r r r r r r r r r r �� __class__� ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/keystoneauth1/identity/v3/k2k.pyr 3 s �zKeystone2Keystone.__init__)r �returnc C s* d}||v r|� |�nt|�}|d|� S )a~ Return auth_url of the remote Keystone Service Provider. Remote cloud's auth_url is an endpoint for getting federated unscoped token, typically that would be ``https://remote.example.com:5000/v3/OS-FEDERATION/identity_providers/ <idp>/protocols/<protocol_id>/auth``. However we need to generate a real auth_url, used for token scoping. This function assumes there are static values today in the remote auth_url stored in the Service Provider attribute and those can be used as a delimiter. If the sp_auth_url doesn't comply with standard federation auth url the function will simply return whole string. :param auth_url: auth_url of the remote cloud :type auth_url: str :returns: auth_url of remote cloud where a token can be validated or scoped. :rtype: str z/OS-FEDERATION/N)�index�len)�clsr ZPATTERN�idxr r r �_remote_auth_urlT s z"Keystone2Keystone._remote_auth_url)r r c C s� ddgd| j �|�id�dd| jiid�i}dtjd�}d d i}|j| j|| j ||ddd�}|js�d }||j|j d� }t �|��|js�t � |��t|j�S )N�auth�token�id)�methodsr'