-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add support for auth in URL #670
Conversation
thanks @Mrxx99 could you please force push signed commits? it#s CNCF requirement we have the commits signed. sorry about the inconvenience :-( |
we have a few flaky tests especially on Windows but I can check if you can let me know which tests aren't passing for you |
17d7d1f
to
ef8b414
Compare
@mtmk commit is signed now |
The test ist |
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.
couple of minor comments.
ah, you need nats-server.exe in your PATH |
I have, I figured this out, otherwise most tests would fail. |
fyi failing tests might be flappers. I'll rerun them. |
@Mrxx99 just added a few tests and did a minor fix in URL user-password rewrite. |
Redact passwords and tokens at the `NatsUri` level to preserve the original URIs, especially when used in WebSocket connections. This change aims to maintain backward compatibility and prevent disruptions in WebSocket connections that may rely on tokens or user-password pairs for proxy-level authentication.
Modified the NatsUri class to store the redacted URI as a string instead of a Uri object. This change simplifies the ToString method and ensures that sensitive information like user credentials is consistently redacted for logging purposes. Redacted string is created once in the ctor and avoiding Uri.ToString() calls being made everytime it's needed.
@Mrxx99 I moved redaction to NatsUri class to keep the original URLs since I suspect some people might be using this to go through WebSocket proxies. |
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.
LGTM thanks @Mrxx99
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.
LGTM
* Add support for auth in URL (#670)
* Add support for auth in URL (#670)
@mtmk As discussed, here is the PR for support for Auth in URL, I also made it to support token in URL, since if it works with username + password, I think users would also expect for it to work with a token.
Aspire PR that will uses this: dotnet/aspire#6259
Note: some Serializer unit test were already failing before I made changes.