diff --git a/package.json b/package.json index 4eb474d..230da71 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "./build/src/index.js", "types": "./build/src/index.d.ts", "engines": { - "node": ">=14.0.0" + "node": ">=15.0.0" }, "repository": "google/node-gtoken", "scripts": { @@ -21,7 +21,6 @@ "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", - "predocs-test": "npm run docs", "prelint": "cd samples; npm link ../; npm install", "precompile": "gts clean" }, @@ -40,15 +39,14 @@ "license": "MIT", "dependencies": { "gaxios": "^6.0.0", - "jws": "^4.0.0" + "jose": "^5.9.6" }, "devDependencies": { "@babel/plugin-proposal-private-methods": "^7.18.6", - "cheerio": "1.0.0-rc.12", - "@types/jws": "^3.1.0", "@types/mocha": "^9.0.0", "@types/node": "^20.0.0", "c8": "^9.0.0", + "cheerio": "1.0.0-rc.12", "gts": "^5.0.0", "jsdoc": "^4.0.0", "jsdoc-fresh": "^3.0.0", diff --git a/src/index.ts b/src/index.ts index 6e12ac7..71aadf3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,13 +1,14 @@ -/** +/*! * Copyright 2018 Google LLC * - * Distributed under MIT license. - * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. */ import * as fs from 'fs'; import {GaxiosOptions, GaxiosPromise, request, GaxiosError} from 'gaxios'; -import * as jws from 'jws'; +import * as jose from 'jose'; import * as path from 'path'; import {promisify} from 'util'; @@ -327,11 +328,16 @@ export class GoogleToken { }, additionalClaims ); - const signedJWT = jws.sign({ - header: {alg: 'RS256'}, - payload, - secret: this.key, - }); + + if (!this.key) throw new Error('Missing key!'); + + const alg = 'RS256'; + const privateKey = await jose.importPKCS8(this.key, alg); + + const signedJWT = await new jose.SignJWT(payload) + .setProtectedHeader({alg}) + .sign(privateKey); + try { const r = await this.transporter.request({ method: 'POST', diff --git a/test/assets/key b/test/assets/key index c0f101c..1220f31 100644 --- a/test/assets/key +++ b/test/assets/key @@ -1,6 +1,6 @@ { "private_key_id": "exampleprivatekeyid", - "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQDnKHOGLUthrSiZ73RA7OGuVj4gAgw7QhLK5PecVk/jLAYgtiA+\nlZKgVOMQjGSAH3J3WDVdJNP2AjaMPb93EOIOAGVdz9Olwh0BKYHmPIgqRHjCw4Il\nyPJIkoBkeTpUXxJl46R6cdeXOzAJal2fxom3yUqvkXsJ9+owREa3WwaZdwIDAQAB\nAoGBAM6Mlq2OS4077Muf64EYKZBd/6UaL1PD9obVkWtgtIGJFPClzKoffKVHNJ3U\n1PinIOEDMKvJ/JwV3ifyBOOfclzdhwQId3Stvr2/7Y0O+sTxQ8bNPu7FuXeiEVg8\ncc2g2r1gzrieK1F+innPIzON8uwhRfnGYUBjgVlAqjSUmeIBAkEA+0Nmm2lYW8yZ\nffukkdiYOUANytg6u4u2Y8NTgKSqjdhUu2FZw+RK5mGFnT9qTR5/hJHEOl8l5GxP\nhxU+Ck1AUwJBAOuEBa+J7hyBvHMZXWFZT4sLIyF8nGnVGKMWnwoqvijm1vtxvXDN\nCh6vxbe6UK2R2wNQcU0yzaw+qVVhFXBGrc0CQAzWAKPn2c+2wBCjjmC1A/HIx+uY\n6Ec0d/jYvadQwjXE229HJeLQAtOKH91MpA2UhUcsey3QNotYzSdFeonkMGkCQBUK\na3OeT/6N/KcPyg7rarbSXOYd+t9doWDYoYbIAMsorGY0aCdOuiu5qmFarOCE2ls2\ncZjjBAryYjB1hvPL7LUCQC8d8Y1v7z6oS2tMZukAcUUlu38K5dwysdgY3dhgmNWl\nNPyXxhPIogoPsSRFbS4PjJpNUFqRY/GTNO/btmBXvts\u003d\n-----END RSA PRIVATE KEY-----\n", + "private_key": "-----BEGIN PRIVATE KEY-----.\nMIIG/AIBADANBgkqhkiG9w0BAQEFAASCBuYwggbiAgEAAoIBgQ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WAQHHUeSkzrnbyiddn5WMZ6cR4F6EFtIrCe\nyaEEwvEbGzvhyvZNR7zmdDL8OuCwaRROfXbmkt74y+RtzoKbvijO3GF3HAYajq1j\ncX9bKY+V2IP78Vq2ZPwoLhhfoSrbStLCKoWt4CtBHJFSbHRzZdqYAcKGii7gi13F\nSS6U0xS9WbDu6ofdBs7pjc82SLI8gpq6aOcsIh2166lBbXMvVuDCpenNwngOyt2v\nnNui0fpicrQ2Mo913tVIwA==\n-----END PRIVATE KEY-----\n", "client_email": "email@developer.gserviceaccount.com", "client_id": "example.apps.googleusercontent.com", "type": "service_account" diff --git a/test/assets/key-no-email.json b/test/assets/key-no-email.json index fba359f..83cbe79 100644 --- a/test/assets/key-no-email.json +++ b/test/assets/key-no-email.json @@ -1,6 +1,6 @@ { "private_key_id": "exampleprivatekeyid", - "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQDnKHOGLUthrSiZ73RA7OGuVj4gAgw7QhLK5PecVk/jLAYgtiA+\nlZKgVOMQjGSAH3J3WDVdJNP2AjaMPb93EOIOAGVdz9Olwh0BKYHmPIgqRHjCw4Il\nyPJIkoBkeTpUXxJl46R6cdeXOzAJal2fxom3yUqvkXsJ9+owREa3WwaZdwIDAQAB\nAoGBAM6Mlq2OS4077Muf64EYKZBd/6UaL1PD9obVkWtgtIGJFPClzKoffKVHNJ3U\n1PinIOEDMKvJ/JwV3ifyBOOfclzdhwQId3Stvr2/7Y0O+sTxQ8bNPu7FuXeiEVg8\ncc2g2r1gzrieK1F+innPIzON8uwhRfnGYUBjgVlAqjSUmeIBAkEA+0Nmm2lYW8yZ\nffukkdiYOUANytg6u4u2Y8NTgKSqjdhUu2FZw+RK5mGFnT9qTR5/hJHEOl8l5GxP\nhxU+Ck1AUwJBAOuEBa+J7hyBvHMZXWFZT4sLIyF8nGnVGKMWnwoqvijm1vtxvXDN\nCh6vxbe6UK2R2wNQcU0yzaw+qVVhFXBGrc0CQAzWAKPn2c+2wBCjjm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tXNmEPK2vuXLSsZ+921KdcodKFzVOn+DWuKv+toEHzSu8UkMsRgeWU0Tn1\nnpabvfCuetSXwQKBwGmIjOjyWYI2M90u5qenknRVDNeyAktKtRjLaFF8vQVHhQTr\nMKspdrtcNcvPs6A/8FdCLFt/NzU+2s2ZQo5o6LyrszTIGVbcEFUmlaFRxUkPVBTn\nX57c2jocDoAnX6h5EbZPp7TFgiPdPMM+iZs7XA7lN4Fr4MuhqHjhPGgeCEFUuFpq\nqF/wLbWMijonU6BiTTsvVY/j/560/HsIg29GIgs8/WY/X6xNjdA+UUK7qrpOzj/R\nK8hw0Wy8GDseubWawQKBwG+JAF1+PWAQHHUeSkzrnbyiddn5WMZ6cR4F6EFtIrCe\nyaEEwvEbGzvhyvZNR7zmdDL8OuCwaRROfXbmkt74y+RtzoKbvijO3GF3HAYajq1j\ncX9bKY+V2IP78Vq2ZPwoLhhfoSrbStLCKoWt4CtBHJFSbHRzZdqYAcKGii7gi13F\nSS6U0xS9WbDu6ofdBs7pjc82SLI8gpq6aOcsIh2166lBbXMvVuDCpenNwngOyt2v\nnNui0fpicrQ2Mo913tVIwA==\n-----END PRIVATE KEY-----\n", "client_id": "example.apps.googleusercontent.com", "type": "service_account" } diff --git a/test/assets/key.json b/test/assets/key.json index c0f101c..1220f31 100644 --- a/test/assets/key.json +++ b/test/assets/key.json @@ -1,6 +1,6 @@ { "private_key_id": "exampleprivatekeyid", - "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQDnKHOGLUthrSiZ73RA7OGuVj4gAgw7QhLK5PecVk/jLAYgtiA+\nlZKgVOMQjGSAH3J3WDVdJNP2AjaMPb93EOIOAGVdz9Olwh0BKYHmPIgqRHjCw4Il\nyPJIkoBkeTpUXxJl46R6cdeXOzAJal2fxom3yUqvkXsJ9+owREa3WwaZdwIDAQAB\nAoGBAM6Mlq2OS4077Muf64EYKZBd/6UaL1PD9obVkWtgtIGJFPClzKoffKVHNJ3U\n1PinIOEDMKvJ/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pAxDdizatf9hEr9NwMDF9htORZOoLGgqifTnLPUWCI\nmnrZk/ERDjhCjdz8A4hOhV2nklKOjklJ+jkSVyoGS3A1Mm0K2EwTx7MNqfXY7/vL\nZcW+tS/j2QKBwEQ7nKgjaUarxiabMkw1LELsh9VhBoW1YnVKDcPt8EbfJiRxf6Za\nqZObimvmnE1Avt43Aci032/PoVwMxupbwJQzqUOOE3zXGMAzhzJlk20NDaxZEVgm\nLTk10bu+UTbMDxBRmM+7Zmi1MrgZGwtrf2rSAwkUzGSupNy8r+uSWN1H6q8wk+Ot\nXaOsLhtXNmEPK2vuXLSsZ+921KdcodKFzVOn+DWuKv+toEHzSu8UkMsRgeWU0Tn1\nnpabvfCuetSXwQKBwGmIjOjyWYI2M90u5qenknRVDNeyAktKtRjLaFF8vQVHhQTr\nMKspdrtcNcvPs6A/8FdCLFt/NzU+2s2ZQo5o6LyrszTIGVbcEFUmlaFRxUkPVBTn\nX57c2jocDoAnX6h5EbZPp7TFgiPdPMM+iZs7XA7lN4Fr4MuhqHjhPGgeCEFUuFpq\nqF/wLbWMijonU6BiTTsvVY/j/560/HsIg29GIgs8/WY/X6xNjdA+UUK7qrpOzj/R\nK8hw0Wy8GDseubWawQKBwG+JAF1+PWAQHHUeSkzrnbyiddn5WMZ6cR4F6EFtIrCe\nyaEEwvEbGzvhyvZNR7zmdDL8OuCwaRROfXbmkt74y+RtzoKbvijO3GF3HAYajq1j\ncX9bKY+V2IP78Vq2ZPwoLhhfoSrbStLCKoWt4CtBHJFSbHRzZdqYAcKGii7gi13F\nSS6U0xS9WbDu6ofdBs7pjc82SLI8gpq6aOcsIh2166lBbXMvVuDCpenNwngOyt2v\nnNui0fpicrQ2Mo913tVIwA==\n-----END PRIVATE KEY-----\n", "client_email": "email@developer.gserviceaccount.com", "client_id": "example.apps.googleusercontent.com", "type": "service_account" diff --git a/test/assets/key.pem b/test/assets/key.pem index e7e07d7..08cd0fc 100644 --- a/test/assets/key.pem +++ b/test/assets/key.pem @@ -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