-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
base: master
Are you sure you want to change the base?
Client Auth is not working in telemetry (dial-in mode) #13142
Conversation
…ode) Root-Cause: Client Authentication read from redis db is not passed to telemetry script in docker startup What I did: Included client_auth option in telemetry args to be passed to telemetry gnmi script
Thanks for the contribution! |
@@ -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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
…n modes (like password,jwt) available in Telemetry.
Why I did it
Client Auth option is not working in telemetry (dial-in mode). Client Authentication value read from redis db is not passed to telemetry script in docker startup. Modified YANG models to accept other client authentication modes (like password,jwt) available in Telemetry.
How I did it
Included client_auth option in telemetry arguments and modified yang models
How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
When an valid client_auth is present in config db (json file), same is passed as an argument to dial-in server startup script and also enable users to configure other authentication modes like password,jwt
Dependent Merge Requests:
sonic-net/sonic-host-services#76
sonic-net/sonic-gnmi#152