-
Notifications
You must be signed in to change notification settings - Fork 42
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
Updating SuperStream Connection Access Token #340
Comments
@simone-fariselli will follow this issue. |
Hi @Gsantomaggio, internal async Task UpdateSecret()
{
var saslHandshakeResponse =
await Request<SaslHandshakeRequest, SaslHandshakeResponse>(corr => new SaslHandshakeRequest(corr))
.ConfigureAwait(false);
_logger?.LogDebug("Sasl mechanism: {Mechanisms}", saslHandshakeResponse.Mechanisms);
var saslData = Encoding.UTF8.GetBytes($"\0{Parameters.UserName}\0{Parameters.Password}");
var authResponse =
await Request<SaslAuthenticateRequest, SaslAuthenticateResponse>(corr =>
new SaslAuthenticateRequest(corr, Parameters.AuthMechanism.ToString().ToUpperInvariant(),
saslData))
.ConfigureAwait(false);
ClientExceptions.MaybeThrowException(authResponse.ResponseCode, Parameters.UserName);
} which should handle the change of secret (i.e of the access_token). I get an applicative timeout and the following error log from the server:
I'm missing something. |
@simone-fariselli Make sure to use 3.13 (alpha or RC). There's a test in the stream Java client suite. The server PR that adds support to update a secret in a stream connection is in 3.13: rabbitmq/rabbitmq-server#9187. |
Note the token update should be done transparently in the background. Getting a new token (by calling a specific |
dove via #342 |
Discussed in #334
Originally posted by lngvivek December 13, 2023
We are using SuperStream dotnet client version 1.7.2
For Authentication with Rabbit, we are using IdenitityServer Acces Token. It works perfectly on initial connection. However once the access toke expires, we were looking for something UpdateSecret (as used to be in Queue based sdk) on Connection object so that our connection is updated with lastest Access token. Could not find any such option for updating token to RabbitMQ.Stream.Client.StreamSystem. Could anyone pls suggest on how to refresh the token?
The text was updated successfully, but these errors were encountered: