File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
driver/src/main/java/oracle/nosql/driver/iam Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
88- Allow application to retry a QueryRequest if it gets a timeout exception and the query only does reads
99- Cloud only: Updated OCI regions
1010
11+ ### Fixed
12+ - Cloud only: Fixed an issue where a long running applications using SignatureProvider
13+ with resource principal may encounter NotAuthenticated error after several minutes even
14+ if authentication succeed for the first requests.
15+
1116## [ 5.3.6] 2022-08-23
1217
1318### Added
Original file line number Diff line number Diff line change @@ -887,7 +887,14 @@ synchronized SignatureDetails getSignatureDetailsInternal(boolean isRefresh)
887887 long nowPlus = System .currentTimeMillis () + 60_000L ;
888888 String date = createFormatter ().format (new Date (nowPlus ));
889889 String keyId = provider .getKeyId ();
890- if (provider instanceof InstancePrincipalsProvider ) {
890+
891+ /*
892+ * Security token based providers may refresh the security token
893+ * and associated private key in above getKeyId() method, reload
894+ * private key to PrivateKeyProvider to avoid a mismatch, which
895+ * will create an invalid signature, cause authentication error.
896+ */
897+ if (provider instanceof SecurityTokenBasedProvider ) {
891898 privateKeyProvider .reload (provider .getPrivateKey (),
892899 provider .getPassphraseCharacters ());
893900 }
You can’t perform that action at this time.
0 commit comments