Skip to content

Support alternate password for PTF container (#16457)#104

Merged
Javier-Tan merged 1 commit intoAzure:202405from
wangxin:msft-202405-ptf-alt-pwd
Feb 23, 2025
Merged

Support alternate password for PTF container (#16457)#104
Javier-Tan merged 1 commit intoAzure:202405from
wangxin:msft-202405-ptf-alt-pwd

Conversation

@wangxin
Copy link

@wangxin wangxin commented Feb 21, 2025

Cherry-pick sonic-net/sonic-mgmt#16457 to 202405 branch.

What is the motivation for this PR?
The PTF container is always using default password. If the PTF container is on same bridge with the host server's management IP, then it is easily accessible from other host servers. This is not secure enough. We need to support alternate password for the PTF container and password rotation.

How did you do it?
This change improved the ansible related code to support accessing the PTF containers using the multi_ssh_pass ansible plugin. Then we can specify alternate passwords for the PTF container. When alternate passwords are specified, the default password of PTF container is updated after PTF creation.

How did you verify/test it?
Tested remove-topo/add-topo/restart-ptf on KVM and physical testbed.

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

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

Documentation

What is the motivation for this PR?
The PTF container is always using default password. If the PTF container is on same bridge with the host server's management IP, then it is easily accessible from other host servers. This is not secure enough. We need to support alternate password for the PTF container and password rotation.

How did you do it?
This change improved the ansible related code to support accessing the PTF containers using the multi_ssh_pass ansible plugin. Then we can specify alternate passwords for the PTF container. When alternate passwords are specified, the default password of PTF container is updated after PTF creation.

How did you verify/test it?
Tested remove-topo/add-topo/restart-ptf on KVM and physical testbed.
Copy link

@Javier-Tan Javier-Tan left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @wangxin

@Javier-Tan Javier-Tan merged commit 6f9655e into Azure:202405 Feb 23, 2025
3 checks passed
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.

2 participants