nestjs / typeorm

TypeORM module for Nest framework (node.js) 🍇

Home Page:https://nestjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Connection Pooling - Revalidation of connection based on new AUTH token

panbhatt opened this issue · comments

I'm submitting a...


[ ] Regression 
[ ] Bug report
[ X] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

We are working with Azure SQL via TYPEORM (connecting via MSI AUTH). The token seems to expire after every 4 hours. this means that all the connections present in the connection pool are invalid( we can see the logs that when we try to execute a query via a pooled connection, it throws an error saying TOKEN UNAuthorized.
Since we have to get token via hitting an external URL is there is a way this can be automated rather then just restarting the application. Azure SQL nodejs driver is TEDIOUSJS. This is driving us nuts as i dont think this should be handled in the code and should be a part of TEDIOUSJS in case this rotation of MSI Token needs to be handled.

Expected behavior

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Nest version: X.Y.Z

 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

Please, report this issue in the typeorm repository. https://github.com/typeorm/typeorm