Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes SSH public key auth, misc document clean-up #295

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

msheiny
Copy link

@msheiny msheiny commented Jan 1, 2025

What this does

This PR

Testing

  1. Made the following changes to my nautobot config:
+++ b/development/nautobot_config.py
@@ -152,6 +152,8 @@ PLUGINS_CONFIG = {
                 "extras": {
                     "fast_cli": False,
                     "read_timeout_override": 30,
+                    "use_keys": True,
+                    "key_file": "/source/.ssh_test/id_rsa",
                 },
             },
         },
  1. Created an ssh rsa key at .ssh_test/id_rsa in this repo
  2. Spun-up a containerlabs instance of an arista ceos and enabled SSH public key auth using that public key
  3. Created a secretsgroup where i just specified the username (i also tried setting the password to a random value as suggested in the docs, but that seemed kinda pointless so I modified the docs accordingly)
  4. Ran a job against the arista device and confirmed that login was successful

@msheiny msheiny marked this pull request as ready for review January 1, 2025 00:43
@msheiny msheiny added the bug Something isn't working label Jan 1, 2025
@@ -236,20 +238,22 @@ def _parse_credentials(credentials):
access_type=SecretsGroupAccessTypeChoices.TYPE_GENERIC,
secret_type=SecretsGroupSecretTypeChoices.TYPE_PASSWORD,
)
try:
secret = credentials.get_secret_value(
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropped secret as it was not being utilized in any of the downstream code in this package. and i didnt see any signs that this specific function was being referenced in any other nautobot code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSH keypair auth does not work with the SSOTSyncDevices job
1 participant