hvac/v1/__init__.py
def _generate_vault_request(self, role, vault_host):
        """
        Generate a signed sts:GetCallerIdentity request to validate identify of the client.
        The Vault server reconstructs the query and forwards it to STS service to authenticate
        the client. See https://www.vaultproject.io/docs/auth/aws.html for more.

        :param role: Role of this lambda
        :return: Request body
        """

        client = boto3.client('sts')
        operation_model = client._service_model.operation_model('GetCallerIdentity')
        request_dict = client._convert_to_request_dict({}, operation_model)
        request_dict['headers']['X-Vault-AWS-IAM-Server-ID'] = vault_host
        request = client._endpoint.create_request(request_dict, operation_model)

        return {
            'iam_http_request_method': request.method,
            'iam_request_url': self._base64encode(request.url),
            'iam_request_body': self._base64encode(request.body),
            'iam_request_headers': self._base64encode(json.dumps(self._prep_for_serialization(dict(request.headers)))),
            'role': role,
        }

        Generate a signed sts:GetCallerIdentity request to validate identify of the client.
        The Vault server reconstructs the query and forwards it to STS service to authenticate
        the client. See https://www.vaultproject.io/docs/auth/aws.html for more.

        :param role: Role of this lambda
        :return: Request body
        
Generate a signed sts:GetCallerIdentity request to validate identify of the client.
The Vault server reconstructs the query and forwards it to STS service to authenticate
the client.
Generate a signed sts : GetCallerIdentity request to validate identify of the client . The Vault server reconstructs the query and forwards it to STS service to authenticate the client .
def _generate_vault_request(self, role, vault_host):
        client = boto3.client('sts')
        operation_model = client._service_model.operation_model('GetCallerIdentity')
        request_dict = client._convert_to_request_dict({}, operation_model)
        request_dict['headers']['X-Vault-AWS-IAM-Server-ID'] = vault_host
        request = client._endpoint.create_request(request_dict, operation_model)
        return {
            'iam_http_request_method': request.method,
            'iam_request_url': self._base64encode(request.url),
            'iam_request_body': self._base64encode(request.body),
            'iam_request_headers': self._base64encode(json.dumps(self._prep_for_serialization(dict(request.headers)))),
            'role': role,
        }
def _generate_vault_request ( self , role , vault_host ) : client = boto3 . client ( 'sts' ) operation_model = client . _service_model . operation_model ( 'GetCallerIdentity' ) request_dict = client . _convert_to_request_dict ( { } , operation_model ) request_dict [ 'headers' ] [ 'X-Vault-AWS-IAM-Server-ID' ] = vault_host request = client . _endpoint . create_request ( request_dict , operation_model ) return { 'iam_http_request_method' : request . method , 'iam_request_url' : self . _base64encode ( request . url ) , 'iam_request_body' : self . _base64encode ( request . body ) , 'iam_request_headers' : self . _base64encode ( json . dumps ( self . _prep_for_serialization ( dict ( request . headers ) ) ) ) , 'role' : role , }
Generate a signed sts:GetCallerIdentity request to validate identify of the client.
Generate a signed sts : GetCallerIdentity request to validate identify of the client .
"""
        Generate a signed sts:GetCallerIdentity request to validate identify of the client.
        The Vault server reconstructs the query and forwards it to STS service to authenticate
        the client. See https://www.vaultproject.io/docs/auth/aws.html for more.

        :param role: Role of this lambda
        :return: Request body
        """
None
self
role
Role of this lambda
Role of this lambda
vault_host