Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1018 Bytes

wrapping.rst

File metadata and controls

56 lines (39 loc) · 1018 Bytes

Wrapping

Unwrap

Is Sealed

hvac.api.system_backend.Seal.is_sealed

Examples

sys_wrapping

client.sys.enable_auth_method(

method_type='approle', path='approle-test',

)

sys_wrapping

import hvac

client = hvac.Client(url='https://127.0.0.1:8200') client.write( path="auth/approle-test/role/testrole", ) result = client.write( path='auth/approle-test/role/testrole/secret-id', wrap_ttl="10s", )

unwrap_response = client.sys.unwrap(

token=result['wrap_info']['token'],

) print('Unwrapped approle role token secret id accessor: "%s"' % unwrap_response['data']['secret_id_accessor'])

Example output:

sys_wrapping

Unwrapped approle role token secret id accessor: "..."

sys_wrapping

client.sys.disable_auth_method(

path='approle-test',

)