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

Client Auth is not working in telemetry (dial-in mode) #13142

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dockers/docker-sonic-telemetry/telemetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ TELEMETRY_ARGS+=" --port $PORT"
CLIENT_AUTH=$(echo $GNMI | jq -r '.client_auth')
if [ -z $CLIENT_AUTH ] || [ $CLIENT_AUTH == "false" ]; then
TELEMETRY_ARGS+=" --allow_no_client_auth"
else
TELEMETRY_ARGS+=" --client_auth $CLIENT_AUTH"
Copy link
Contributor

@ganglyu ganglyu Jan 4, 2023

Choose a reason for hiding this comment

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

https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/yang-models/sonic-telemetry.yang#L57
client_auth is a flag used for requiring client auth, but you are using it as client auth type?

Copy link
Author

Choose a reason for hiding this comment

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

Closing this PR. And will open a new PR addressing the comments

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you want to address PR comments, better to keep this PR open, and push new commit in the same PR. So the comment will have enough context and easy to track.

Copy link
Author

Choose a reason for hiding this comment

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

Client Authentication Argument in Telemetry dialin server (https://github.com/sonic-net/sonic-gnmi/blob/master/telemetry/telemetry.go) accepts jwt,password,certification. Made changes in telemetry.sh script to accept the different client authentication modes.

fi

LOG_LEVEL=$(echo $GNMI | jq -r '.log_level')
Expand Down
Loading