SovereignCloudStack / issues

This repository is used for issues that are cross-repository or not bound to a specific repository.
https://github.com/orgs/SovereignCloudStack/projects/6
2 stars 1 forks source link

Automation of hostname settings, SSH configuration, and root access on SONiC #725

Open matofeder opened 2 hours ago

matofeder commented 2 hours ago

In addition to the general configuration and FRR configuration, certain aspects of the system require automated configuration, including:

Investigate the best approach for managing these configurations. Should they be managed through NetBox, automated using Ansible, or handled by another solution?

matofeder commented 2 hours ago

After reviewing public discussions (SONiC matrix channel) and SONiC documentation, I found that different approaches are used for automating these configurations:

  1. Ansible & ZTP: Users automate tasks like managing SSH and user configurations using Ansible. Some also leverage Zero Touch Provisioning (ZTP) for initial configurations of SSHD, followed by Ansible for ongoing user management.

  2. NetBox: This tool is generally not used for such tasks, as its primary use cases differ from direct configuration management.

  3. RADIUS or TACACS+: A more robust approach involves integrating with RADIUS or TACACS+ for Authentication, Authorization, and Accounting (AAA). SONiC supports both protocols, making it possible to manage SSH access through a centralized RADIUS or TACACS+ server. This setup could include SSH access using username/password, or even public-private key pairs when combined with LDAP or Active Directory (AD) integration.

Proposal: While the RADIUS/TACACS+ approach offers a more centralized solution, it introduces additional dependencies like setting up RADIUS or TACACS+ servers (and possibly LDAP/AD). A more straightforward initial approach might be to use Ansible, potentially alongside ZTP, for automating the configuration process.

scoopex commented 47 minutes ago

I also think that an initial configuration would still be within the scope of Netbox, but the management of the life cycle of users would be better not realized in Netbox as this can be done better by Ansible, for example.

I suggest the following as initial provisioning within ZTP:

In my opinion, this is actually a missing feature in SONiC that cannot be mapped into the system via JSON configuration. But I think that this is not in the scope of our project (maybe this would be worth a Feature request)