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

Upgrade Auto-generated token from HS256 #834

Closed
VuNhat opened this issue Feb 27, 2020 · 5 comments
Closed

Upgrade Auto-generated token from HS256 #834

VuNhat opened this issue Feb 27, 2020 · 5 comments

Comments

@VuNhat
Copy link

VuNhat commented Feb 27, 2020

Hi guys, currently we are building a public chatbot that is using Azure Signalr Service.
We observed that the auto-generated token to azure signalr service is using HS256, which result in a failed pen-test from the client.
I'm wondering if there is any guidance to customize the JWT for negotiation step, using stronger algo. Please advise, thank you

@vicancy
Copy link
Member

vicancy commented Mar 3, 2020

Currently, it is not customizable. If HS256 is weak, which one would you recommend? Shall we directly update the SecurityAlgorithm to make it stronger instead of making it customizable?

credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256);

@VuNhat
Copy link
Author

VuNhat commented Mar 3, 2020

hi @vi
I think anything stronger than RS256 should be fine, no need to be customizable. But my concern is, as we are sending this token in the url and not header, will a longer token failed to send?

@vicancy
Copy link
Member

vicancy commented Mar 3, 2020

How about HS512? Yes, that will make the URL longer, for HTTP/1.1, or C# clients, the max URI length is 12K, that sounds enough if you don't have too many claims passing to the service.

@VuNhat
Copy link
Author

VuNhat commented Mar 4, 2020

Yes that should be good enough. Thank!

@vicancy
Copy link
Member

vicancy commented Mar 4, 2020

Thanks for the confirmation, we will provide an option to choose between HS256 and HS512 then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants