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

tacacs management vrf changes #2217

Merged
merged 1 commit into from
Dec 4, 2018
Merged

tacacs management vrf changes #2217

merged 1 commit into from
Dec 4, 2018

Conversation

kannankvs
Copy link
Collaborator

  • What I did
    Enhanced the tacacs PAM module & NSS module to parse and process the "vrfname" and to setsockopt using SO_BINDTODEVICE for "mgmt" interface.

  • How I did it
    The optional parameter "--use-mgmt-vrf" used while configuring "tacacs server" results in configuring the DB with vrfname as "mgmt". Files "files/image_config/hostcfgd/common-auth-sonic.j2" and "files/image_config/hostcfgd/tacplus_nss_conf.j2" are modified to read this optional parameter and update the PAM & NSS configuration files "/etc/pam.d/common-auth" and "/etc/tacplus_nss.conf" respectively with the vrfname.
    After enhancing the code for NSS in the file nss_tacplus.c for parsing the vrfname and passing it to the connect library function "tac_connect_single", git patch "0003-management-vrf-support.patch" was generated and checked in.
    Similarly PAM code is also enhanced to parse and pass vrfname to the connect library function. PAM library code (libtac2) is also enhanced to do the actual SO_BINDTODEVICE in libtac/lib/connect.c for the "mgmt" vrfname. Git patch "0004-management-vrf-support.patch" was generated with all these PAM changes.
    src/tacacs/Makefile is enhanced to use these enhanced patches for PAM & NSS.

  • How to verify it
    Configure aaa to use "tacacs+", have a tacacs+ server connected in management network and verify that SSH authentication happens with the mgmt interface when --use-mgmt-vrf is enabled.
    Tested it along with the command "config tacacs --use-mgmt-vrf 10.11.55.40" and verified that the passed parameter "vrfname" is there in /etc/sonic/config_db.json file under TACPLUS_SERVER. Verified that "show tacacs" displays the newly configured vrfname for the server IP.
    Verified that the /etc/tacplus_nss.conf and /etc/pam.d/common-auth configuration files contain the "mgmt" vrfname when --use-mgmt-vrf is enabled.
    Changed the "aaa" config to use tacacs+ and verified that the SSH login uses the management interface to connect to the tacacs+ server and authenticates the user.
    Captured packets on management interface to verify the tacacs+ packets flow.

Executed another test case without management vrf (no "mgmt" vrf created, no separation of data and mgmt vrf) and confirmed that it works fine as it is today (note that --use-mgmt-vrf is not used in this test case).

@msftclas
Copy link

msftclas commented Oct 31, 2018

CLA assistant check
All CLA requirements met.

@lguohan lguohan requested a review from taoyl-ms November 1, 2018 06:58
@lguohan lguohan merged commit a9a7ce1 into sonic-net:master Dec 4, 2018
mssonicbld added a commit that referenced this pull request Aug 17, 2023
…atically (#16183)

#### Why I did it
src/sonic-utilities
```
* 46b32daa - (HEAD -> 202211, origin/202211) [kdump] Fix API to read the current running image (#2217) (14 hours ago) [rajendra-dendukuri]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants