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] Send remote address in TACACS+ authorization message. #12190

Merged
merged 9 commits into from
Nov 1, 2022

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Sep 27, 2022

Send remote address in TACACS+ authorization message.

Why I did it

TACACS+ authorization message not send remote address to server side.

How I did it

Send remote address in TACACS+ authorization message.

How to verify it

Pass all E2E test.
Create new test case to validate remote address been send to server side.

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

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

Description for the changelog

Send remote address in TACACS+ authorization message.

Ensure to add label/tag for the feature raised. example - PR#2174 where, Generic Config and Update feature has been labelled as GCU.

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 Sep 27, 2022

Will create E2E test case in sonic-mgmt repo with another PR.

@liuh-80
Copy link
Contributor Author

liuh-80 commented Oct 9, 2022

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80
Copy link
Contributor Author

liuh-80 commented Oct 9, 2022

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80
Copy link
Contributor Author

liuh-80 commented Oct 17, 2022

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80 liuh-80 force-pushed the dev/liuh/improve-tacacs-address branch from d030fcb to 1c25f25 Compare October 21, 2022 03:14
@liuh-80 liuh-80 marked this pull request as ready for review October 21, 2022 07:15
@liuh-80 liuh-80 requested a review from qiluo-msft October 21, 2022 07:15
+/*
+ * Get environment variable first part by name and delimiters
+ */
+int get_environment_variable_first_part(char* dst, socklen_t size, const char* name, const char* delimiters)
Copy link
Collaborator

@qiluo-msft qiluo-msft Oct 28, 2022

Choose a reason for hiding this comment

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

get_environment_variable_first_part

all the functions return values are not well defined in function level comment.

You have some choices:

  1. use well defined name enum/constants
  2. define meaning of the number in function level comment. #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, add constants for return values.

@liuh-80 liuh-80 merged commit 2626573 into sonic-net:master Nov 1, 2022
yxieca pushed a commit that referenced this pull request Nov 10, 2022
Send remote address in TACACS+ authorization message.

#### Why I did it
TACACS+ authorization message not send remote address to server side.

#### How I did it
Send remote address in TACACS+ authorization message.

#### How to verify it
Pass all E2E test.
Create new test case to validate remote address been send to server side.

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

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205

#### Description for the changelog
Send remote address in TACACS+ authorization message.

#### Ensure to add label/tag for the feature raised. example - [PR#2174](sonic-net/sonic-utilities#2174) where, Generic Config and Update feature has been labelled as GCU.

#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
-->

#### A picture of a cute animal (not mandatory but encouraged)
qiluo-msft pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Apr 6, 2023
…7702)

**What I did**
Add UT to check TACACS will send remote address to server.

**Why I did it**
nss-tacplus add a patch to send remote address to server with this PR:sonic-net/sonic-buildimage#12190

To protect the patch, add this UT to check TACACS will send remote address to server.

**How I verified it**
Pass all UT.
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.

3 participants