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

[202205] [TACACS] Improve per-command authorization performance by read passwd entry with getpwent #16659

Merged
merged 2 commits into from
Oct 14, 2023

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Sep 22, 2023

Improve per-command authorization performance by read passwd entry with getpwent.
This is manually cherry-pick PR for #16460

Why I did it

Currently per-command authorization will check if user is remote user with getpwnam API, which will trigger tacplus-nss for authentication with TACACS server.
But this is not necessary because when user login the user information already add to local passwd file.
Use getpwent API can directly read from passwd file, this will improve per-command authorization performance.

Work item tracking
  • Microsoft ADO: 25104723

How I did it

Improve per-command authorization performance by read passwd entry with getpwent.

How to verify it

Pass all UT.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

  • master-16460.356317-6c3424111

Description for the changelog

Improve per-command authorization performance by read passwd entry with getpwent.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@liuh-80
Copy link
Contributor Author

liuh-80 commented Oct 12, 2023

Close and reopen for rebuild and test again

@liuh-80 liuh-80 closed this Oct 12, 2023
@liuh-80 liuh-80 reopened this Oct 12, 2023
@liuh-80
Copy link
Contributor Author

liuh-80 commented Oct 12, 2023

Close this PR for now, the failed UT actually found a corner case issue, will send update later.

@liuh-80 liuh-80 closed this Oct 12, 2023
@liuh-80
Copy link
Contributor Author

liuh-80 commented Oct 12, 2023

PR updated

@liuh-80 liuh-80 reopened this Oct 12, 2023
@yxieca yxieca merged commit cd64b60 into sonic-net:202205 Oct 14, 2023
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.

3 participants