Skip to content

decrypt

Note

Always use the FQCN (Fully Qualified Collection Name) arista.avd.decrypt when using this plugin.

Decrypt supported EOS passwords.

Synopsis

The filter is used to decrypt supported EOS passwords into clear text.

Note - For now this filter only supports decryption from type 7 and not type 8a for OSPF and BGP passwords.

Parameters

Argument Type Required Default Value Restrictions Description
_input string True None Encrypted EOS password.
passwd_type string True None Valid values:
- bgp
- ospf_simple
- ospf_message_digest
Type of password to decrypt.
bgp and ospf_simple requires the password and key inputs.
ospf_message_digest requires the password, key, hash_algorithm, key_id inputs.
key string True None Encryption key. The value depends on the type of password.
For BGP passwords the key is the Neighbor IP or the BGP Peer Group Name in EOS.
For OSPF passwords the key is the interface name e.g., <code>Ethernet1</code>.
hash_algorithm string optional None Valid values:
- md5
- sha1
- sha256
- sha384
- sha512
Hash algorithm to use with passwd_type="ospf_message_digest".
key_id integer optional None Min value: 1
Max value: 255
Key ID to use with passwd_type="ospf_message_digest".

Examples

---
- # Decrypt BGP password for peer group "IPv4-UNDERLAY-PEERS"
  cleartext: "{{ encrypted_password | arista.avd.decrypt(passwd_type='bgp', key='IPv4-UNDERLAY-PEERS') }}"

- # Decrypt OSPF simple password for interface "Ethernet1"
  cleartext: "{{ encrypted_password | arista.avd.decrypt(passwd_type='ospf_simple', key='Ethernet1') }}"

- # Decrypt OSPF message digest password for Ethernet1, MD5 and key id 1
  cleartext: "{{ encrypted_password | arista.avd.decrypt(passwd_type='ospf_message_digest', key='Ethernet1', hash_algorithm='md5', key_id='1') }}"

Return Values

Name Type Description
_value string Decrypted cleartext password.

Authors

  • Arista Ansible Team (@aristanetworks)