You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some authentication protocols expire authentication tokens unless they are refreshed. RabbitMQ supports this via the update-secret operation. amqplib was recently updated to support this, so it would be nice to add something similar to Rascal, along the following lines
broker.updateSecret(vhost,secret,reason,cb)
behind the scenes the broker would have to find the correct vhost and call vhost.updateSecret(secret, reason, cb). In turn the vhost would have to call connection.updateSecret(secret, reason, cb)
We need to make the secret semi-permanent, so that if a connection is dropped, Rascal will use the latest secret to reconnect.
Finally we need to consider what to do if the connection had already been dropped. Ideally we would abort (or immediately repeat) any in progress reconnection, using the new token.
Here's how...
Change tasks/createConnection to prefer a secret from the vhost configuration to the connection password
Add broker.updateSecret(vhost, secret, reason, cb). This looks up the vhost and calls vhost.updateSecret as below
Add vhost.updateSecret(secret, reason, cb).
Update the vhost config with the new secret.
If there is a connection, calls connection.updateSecret(secret, reason, cb)
If there is not a connection, registers a listener for the "connect" event, and calls connection.updateSecret(secret, reason, cb) once connected.
The text was updated successfully, but these errors were encountered:
Some authentication protocols expire authentication tokens unless they are refreshed. RabbitMQ supports this via the update-secret operation. amqplib was recently updated to support this, so it would be nice to add something similar to Rascal, along the following lines
behind the scenes the broker would have to find the correct vhost and call
vhost.updateSecret(secret, reason, cb)
. In turn the vhost would have to callconnection.updateSecret(secret, reason, cb)
We need to make the secret semi-permanent, so that if a connection is dropped, Rascal will use the latest secret to reconnect.
Finally we need to consider what to do if the connection had already been dropped. Ideally we would abort (or immediately repeat) any in progress reconnection, using the new token.
Here's how...
The text was updated successfully, but these errors were encountered: