@vizamodo/aws-sts-core 0.4.28 → 0.4.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sts/issue.js +2 -10
- package/package.json +1 -1
package/dist/sts/issue.js
CHANGED
|
@@ -85,16 +85,8 @@ export async function issueAwsCredentials(input) {
|
|
|
85
85
|
const { roleArn, profileArn, trustAnchorArn, region, certBase64, privateKeyPkcs8Base64, profile, forceRefresh, } = input;
|
|
86
86
|
const sessionTtl = resolveSessionTtlByProfile(profile);
|
|
87
87
|
const normalizedCert = normalizeCert(certBase64);
|
|
88
|
-
// ---- DER serial extraction (
|
|
89
|
-
|
|
90
|
-
if (cachedCertSerialDec && cachedCertSerialSource === normalizedCert) {
|
|
91
|
-
certSerialDec = cachedCertSerialDec;
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
certSerialDec = parseCertSerialDec(normalizedCert); // throws InternalError on bad DER
|
|
95
|
-
cachedCertSerialDec = certSerialDec;
|
|
96
|
-
cachedCertSerialSource = normalizedCert;
|
|
97
|
-
}
|
|
88
|
+
// ---- DER serial extraction (no isolate cache — avoid stale bug) ----
|
|
89
|
+
const certSerialDec = parseCertSerialDec(normalizedCert);
|
|
98
90
|
const cacheKey = `${region}|${roleArn}|${profileArn}|${trustAnchorArn}|${certSerialDec}`;
|
|
99
91
|
return getCachedOrFetch(cacheKey, async () => {
|
|
100
92
|
// ---- Build SigV4 request (moved inside fetcher) ----
|