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

Adding support for RADIUS test cases in sonic-mgmt #16475

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

Conversation

dt-nexthop
Copy link

@dt-nexthop dt-nexthop commented Jan 13, 2025

Description of PR
Add RADIUS test cases to sonic-mgmt and add a RADIUS Server to the pft docker image. The following situations are covered

Testing a user with Privl 15 is allowed access
Testing a user with Priv 1 is allowed access
Testing that a user added to the correct Linux groups based on Priv level provided by RADIUS server
Testing that a user is only able to run commands that they have access to based on Priv level
Testing RADIUS statistics
Testing setting source-interface
Testing that an unauthorized user is not permitted access
Added needed fixures to:

Spin up RADIUS server on ptf
Add/Remove required RADIUS configuration needed for tests

Fixes #16471

Type of change
Bug fix
Testbed and Framework(new/improvement)
Test case(new/improvement)
Back port request
202012
202205
202305
202311
[X ] 202405
Approach
What is the motivation for this PR?
There are currently no RADIUS tests in sonic-mgmt; this helps close that gap.

How did you do it?
The PRs to add the freeRADIUS package to ptf is covered in these PRs:
sonic-net/sonic-buildimage#21307

How did you verify/test it?
Running this test suite on both T0 and T1 topologies:

radius/test_radius_auth.py::test_radius_rw_user[usschq-eswdut-t001-None] PASSED [ 16%]
radius/test_radius_auth.py::test_radius_ro_user[usschq-eswdut-t001-None] PASSED [ 33%]
radius/test_radius_auth.py::test_radius_command_auth[usschq-eswdut-t001-None] PASSED [ 50%]
radius/test_radius_auth.py::test_radius_fallback[usschq-eswdut-t001-None] PASSED [ 66%]
radius/test_radius_auth.py::test_radius_failed_auth[usschq-eswdut-t001-None] PASSED [ 83%]
radius/test_radius_auth.py::test_radius_source_ip[usschq-eswdut-t001-None] FAILED [100%]
The last test case is failing due to:

sonic-net/sonic-buildimage#21386

The PRs to add the freeRADIUS package to ptf is covered in these PRs:
sonic-net/sonic-buildimage#21307

Any platform specific information?
None

Supported testbed topology if it's a new test case?
Any

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Test Gap][RADIUS][Any]Add initial RADIUS test cases
2 participants