How to use the hvac.api.secrets_engines.Transit function in hvac

To help you get started, we’ve selected a few hvac examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hvac / hvac / hvac / v1 / __init__.py View on Github external
        new_method=api.secrets_engines.Transit.sign_data,
    )
    def transit_sign_data(self, name, input_data, key_version=None, algorithm=None, context=None, prehashed=None,
                          mount_point='transit', signature_algorithm='pss'):
        """POST //sign/(/)

        :param name:
        :type name:
        :param input_data:
        :type input_data:
        :param key_version:
        :type key_version:
        :param algorithm:
        :type algorithm:
        :param context:
        :type context:
        :param prehashed:
github hvac / hvac / hvac / v1 / __init__.py View on Github external
        new_method=api.secrets_engines.Transit.export_key,
    )
    def transit_export_key(self, name, key_type, version=None, mount_point='transit'):
        """GET //export//(/)

        :param name:
        :type name:
        :param key_type:
        :type key_type:
        :param version:
        :type version:
        :param mount_point:
        :type mount_point:
        :return:
        :rtype:
        """
        if version is not None:
github hvac / hvac / hvac / v1 / __init__.py View on Github external
        new_method=api.secrets_engines.Transit.hash_data,
    )
    def transit_hash_data(self, hash_input, algorithm=None, output_format=None, mount_point='transit'):
        """POST //hash(/)

        :param hash_input:
        :type hash_input:
        :param algorithm:
        :type algorithm:
        :param output_format:
        :type output_format:
        :param mount_point:
        :type mount_point:
        :return:
        :rtype:
        """
        if algorithm is not None:
github hvac / hvac / hvac / v1 / __init__.py View on Github external
        new_method=api.secrets_engines.Transit.generate_random_bytes,
    )
    def transit_generate_rand_bytes(self, data_bytes=None, output_format=None, mount_point='transit'):
        """POST //random(/)

        :param data_bytes:
        :type data_bytes:
        :param output_format:
        :type output_format:
        :param mount_point:
        :type mount_point:
        :return:
        :rtype:
        """
        if data_bytes is not None:
            url = '/v1/{0}/random/{1}'.format(mount_point, data_bytes)
        else:
github hvac / hvac / hvac / v1 / __init__.py View on Github external
        new_method=api.secrets_engines.Transit.verify_signed_data,
    )
    def transit_verify_signed_data(self, name, input_data, algorithm=None, signature=None, hmac=None, context=None,
                                   prehashed=None, mount_point='transit', signature_algorithm='pss'):
        """POST //verify/(/)

        :param name:
        :type name:
        :param input_data:
        :type input_data:
        :param algorithm:
        :type algorithm:
        :param signature:
        :type signature:
        :param hmac:
        :type hmac:
        :param context:
github hvac / hvac / hvac / v1 / __init__.py View on Github external
        new_method=api.secrets_engines.Transit.encrypt_data,
    )
    def transit_encrypt_data(self, name, plaintext, context=None, key_version=None, nonce=None, batch_input=None,
                             key_type=None, convergent_encryption=None, mount_point='transit'):
        """POST //encrypt/

        :param name:
        :type name:
        :param plaintext:
        :type plaintext:
        :param context:
        :type context:
        :param key_version:
        :type key_version:
        :param nonce:
        :type nonce:
        :param batch_input:
github hvac / hvac / hvac / v1 / __init__.py View on Github external
        new_method=api.secrets_engines.Transit.generate_data_key,
    )
    def transit_generate_data_key(self, name, key_type, context=None, nonce=None, bits=None, mount_point='transit'):
        """POST //datakey//

        :param name:
        :type name:
        :param key_type:
        :type key_type:
        :param context:
        :type context:
        :param nonce:
        :type nonce:
        :param bits:
        :type bits:
        :param mount_point:
        :type mount_point:
github hvac / hvac / hvac / v1 / __init__.py View on Github external
        new_method=api.secrets_engines.Transit.list_keys,
    )
    def transit_list_keys(self, mount_point='transit'):
        """GET //keys?list=true

        :param mount_point:
        :type mount_point:
        :return:
        :rtype:
        """
        url = '/v1/{0}/keys?list=true'.format(mount_point)
        return self._adapter.get(url).json()
github hvac / hvac / hvac / v1 / __init__.py View on Github external
        new_method=api.secrets_engines.Transit.delete_key,
    )
    def transit_delete_key(self, name, mount_point='transit'):
        """DELETE //keys/

        :param name:
        :type name:
        :param mount_point:
        :type mount_point:
        :return:
        :rtype:
        """
        url = '/v1/{0}/keys/{1}'.format(mount_point, name)
        return self._adapter.delete(url)
github hvac / hvac / hvac / v1 / __init__.py View on Github external
        new_method=api.secrets_engines.Transit.generate_hmac,
    )
    def transit_generate_hmac(self, name, hmac_input, key_version=None, algorithm=None, mount_point='transit'):
        """POST //hmac/(/)

        :param name:
        :type name:
        :param hmac_input:
        :type hmac_input:
        :param key_version:
        :type key_version:
        :param algorithm:
        :type algorithm:
        :param mount_point:
        :type mount_point:
        :return:
        :rtype: