Closed rifen closed 2 years ago
FWIW, the following does work on 3.10 and the current version of NAPALM:
import ssl
from napalm.eos import EOSDriver
ctx = ssl.create_default_context()
ctx.set_ciphers("DEFAULT")
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
with EOSDriver("ceos", "eos", "eos", optional_args={"context": ctx}) as d:
print(d.get_facts())
@bewing What do you think we should do here?
The main two options I see:
FYI, the SSL issue also goes away in newer versions of EOS (i.e. they default to better security settings than older versions).
I am going to close this as I don't think there is any action to take. The fix above let's you workaround this issue.
Here is another workaround you can do (entirely via Arista device configuration):
security pki key generate rsa 2048 self-signed.key
security pki certificate generate self-signed self-signed.crt key self-signed.key validity 365 parameters common-name bogus.domain.com country US state CA locality SF organization BigCo organization-unit OPS
config term
management security
ssl profile selfSignedSSLProfile
certificate self-signed.crt key self-signed.key
management api http-commands
protocol https ssl profile selfSignedSSLProfile
Solution courtesy this Reddit thread:
https://www.reddit.com/r/Arista/comments/wnm3m0/eos_and_nornirnapalmpyeapi_default_cipher_suite/
Anyone figure out a way to make the playbook listed idempotent? Haven't found a CLI command that exposes the current key length.
I guess you could just gate on the presence of the protocol https ssl profile selfSignedSSLProfile
line, and/or tie it in with ACME type of solution to have real signed certs
I pushed this part out via NAPALM-ansible and it looks idempotent (full config replace though)
management security
ssl profile selfSignedSSLProfile
certificate self-signed.crt key self-signed.key
management api http-commands
protocol https ssl profile selfSignedSSLProfile
I did the other two security pki
commands as one offs though using netmiko-tools.
I did run into a bit of a strange error on the config change using napalm-ansible.Incomplete read (44 bytes)
would show up in the output (sometimes), but the config change would go through.
Description of Issue/Question
With Python 10+ the strength of the TLS stack is stronger. You have 2 options it seems:
Our team doesn't make the calls to be able to use option 1 and option 2 NAPALM seems to not support (at least that I am aware of)
eapi supporting documentation: https://pyeapi.readthedocs.io/_/downloads/en/develop/pdf/ (Page 28)
Our pyeapi implementation:
Did you follow the steps from https://github.com/napalm-automation/napalm#faq
(Place an
x
between the square brackets where applicable)Setup
napalm version
(Paste verbatim output from
pip freeze | grep napalm
between quotes below)Network operating system version
(Paste verbatim output from
show version
- or equivalent - between quotes below)Steps to Reproduce the Issue
Error Traceback
(Paste the complete traceback of the exception between quotes below)