aws / amazon-neptune-jdbc-driver

Amazon Neptune JDBC Driver by Amazon Web Services
https://aws.amazon.com/neptune/
Apache License 2.0
23 stars 13 forks source link

Replace AuthTokens.basic with NeptuneAuthToken in OpenCypher #259

Closed ryn5 closed 7 months ago

ryn5 commented 7 months ago

Summary

Automatical renewal of AWS Signature v4 authentication tokens is currently not supported, which means that after the signature expires (often in 5 minutes), the driver will fail to authenticate, and subsequent requests will fail.

Description

This change updates the implementation of InternalAuthToken to NeptuneAuthToken, taken from AWS Neptune documentation, so that the signature can be automatically renewed even if the connection is broken.

Related Issue

258

Additional Reviewers

xiazcy commented 7 months ago

This is a workaround to resolve token refresh issue that was brought up in https://github.com/aws/amazon-neptune-jdbc-driver/issues/258, specific to Neo4j driver 4.4+. Note that this will resolve cases where the connection was broken and the driver has to reconnect, and thus re-authenticate, with expired token after 5min.