Giter VIP home page Giter VIP logo

get-jwks's Introduction

get-jwks

ci

Fetch utils for JWKS keys

Installation

npm install get-jwks

Usage

Options

const https = require('node:https')
const buildGetJwks = require('get-jwks')

const getJwks = buildGetJwks({
  max: 100,
  ttl: 60 * 1000,
  timeout: 5000,
  issuersWhitelist: ['https://example.com'],
  checkIssuer: (issuer) => {
    return issuer === 'https://example.com'
  },
  providerDiscovery: false,
  agent: new https.Agent({
    keepAlive: true,
  }),
})
  • max: Max items to hold in cache. Defaults to 100.
  • ttl: Milliseconds an item will remain in cache. Defaults to 60s.
  • timeout: Specifies how long it should wait to retrieve a JWK before it fails. The time is set in milliseconds. Defaults to 5s.
  • issuersWhitelist: Array of allowed issuers. By default all issuers are allowed.
  • allowedDomains: This has been deprecated and replaced with issuersWhitelist.
  • checkIssuer: Optional user defined function to validate a token's domain.
  • providerDiscovery: Indicates if the Provider Configuration Information is used to automatically get the jwks_uri from the OpenID Provider Discovery Endpoint. This endpoint is exposing the Provider Metadata. With this flag set to true the domain will be treated as the OpenID Issuer which is the iss property in the token. Defaults to false. Ignored if jwksPath is specified.
  • jwksPath: Specify a relative path to the jwks_uri. Example /otherdir/jwks.json. Takes precedence over providerDiscovery. Optional.
  • agent: The custom agent to use for requests, as specified in node-fetch documentation. Defaults to null.

max and ttl are provided to lru-cache.

getJwk

const buildGetJwks = require('get-jwks')

const getJwks = buildGetJwks()

const jwk = await getJwks.getJwk({
  domain: 'https://example.com/',
  alg: 'token_alg',
  kid: 'token_kid',
})

Calling the asynchronous function getJwk will fetch the JSON Web Key, and verify if any of the public keys matches the provided alg (if any) and kid values. It will cache the matching key so if called again it will not make another request to retrieve a JWKS. It will also use a cache to store stale values which is used in case of errors as a fallback mechanism.

  • domain: A string containing the domain (e.g. https://www.example.com/, with or without trailing slash) from which the library should fetch the JWKS. If providerDiscovery flag is set to false get-jwks will add the JWKS location (.well-known/jwks.json) to form the final url (ie: https://www.example.com/.well-known/jwks.json) otherwise the domain will be treated as tthe openid issuer and the retrival will be done via the Provider Discovery Endpoint.
  • alg: The alg header parameter is an optional parameter that represents the cryptographic algorithm used to secure the token. You will find it in your decoded JWT.
  • kid: The kid is a hint that indicates which key was used to secure the JSON web signature of the token. You will find it in your decoded JWT.

getPublicKey

const buildGetJwks = require('get-jwks')

const getJwks = buildGetJwks()

const publicKey = await getJwks.getPublicKey({
  domain: 'https://exampe.com/',
  alg: 'token_alg',
  kid: 'token_kid',
})

Calling the asynchronous function getPublicKey will run the getJwk function to retrieve a matching key, then convert it to a PEM public key. It requires the same arguments as getJwk.

Integration Examples

This library can be easily used with other JWT libraries.

@fastify/jwt

@fastify/jwt is a Json Web Token plugin for Fastify.

The following example includes a scenario where you'd like to varify a JWT against a valid JWK on any request to your Fastify server. Any request with a valid JWT auth token in the header will return a successful response, otherwise will respond with an authentication error.

const Fastify = require('fastify')
const fjwt = require('@fastify/jwt')
const buildGetJwks = require('get-jwks')

const fastify = Fastify()
const getJwks = buildGetJwks()

fastify.register(fjwt, {
  decode: { complete: true },
  secret: (request, token, callback) => {
    const {
      header: { kid, alg },
      payload: { iss },
    } = token
    getJwks
      .getPublicKey({ kid, domain: iss, alg })
      .then(publicKey => callback(null, publicKey), callback)
  },
})

fastify.addHook('onRequest', async (request, reply) => {
  await request.jwtVerify()
})

fastify.listen(3000)

fast-jwt

fast-jwt is a fast JSON Web Token implementation.

The following example shows how to use JWKS in fast-jwt via get-jwks.

const { createVerifier } = require('fast-jwt')
const buildGetJwks = require('get-jwks')

// well known url of the token issuer
// often encoded as the `iss` property of the token payload
const domain = 'https://...'

const getJwks = buildGetJwks({ issuersWhitelist: [...]})

// create a verifier function with key as a function
const verifyWithPromise = createVerifier({
  key: async function ({ header }) {
    const publicKey = await getJwks.getPublicKey({
      kid: header.kid,
      alg: header.alg,
      domain,
    })
    return publicKey
  },
})

const payload = await verifyWithPromise(token)

get-jwks's People

Contributors

bredikhin avatar conor909 avatar dependabot[bot] avatar eugenio-oddone avatar fdawgs avatar grantmorrison avatar guilhermelimak avatar ilteoood avatar jack-robson avatar jackmurdoch avatar jeremysharp avatar mahenrique94 avatar marco-ippolito avatar mariosimou avatar mcollina avatar melkornemesis avatar mjvmroz avatar nigelhanlon avatar optic-release-automation[bot] avatar p16 avatar paganwinter avatar pigulla avatar radomird avatar ramonmulia avatar renovate-bot avatar sameer-coder avatar shogunpanda avatar simoneb avatar tobsenll avatar williamlines avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

get-jwks's Issues

Release pending!

Pending commits since release v4.3.0

Unreleased commits have been found which are pending release, please publish the changes.

  • 52163a9 chore: use major version of notify release action
  • ed0e26d Bump nearform/github-action-notify-release from 1.2.7 to 1.2.8 (#104)
  • e18609c Bump fastify/github-action-merge-dependabot from 2.7.1 to 3.0.2 (#102)
  • 677bf47 chore: add node 16 to ci
  • ee5c356 Bump fastify/github-action-merge-dependabot from 2.7.0 to 2.7.1 (#100)
  • c714cfa Bump fastify/github-action-merge-dependabot from 2.6.0 to 2.7.0 (#97)
  • 462d072 Bump actions/setup-node from 2.4.1 to 2.5.0 (#96)
  • d6c68d5 Bump fastify-jwt from 3.2.1 to 4.0.0 (#95)
  • ec9ca60 Bump actions/cache from 2.1.6 to 2.1.7 (#94)
  • 7f58436 Bump fastify/github-action-merge-dependabot from 2.5.0 to 2.6.0 (#92)
  • 532647c Bump sinon from 11.1.2 to 12.0.0 (#90)
  • 6965b03 Bump actions/checkout from 2.3.5 to 2.4.0 (#89)
  • b44de86 Bump actions/checkout from 2.3.4 to 2.3.5 (#86)

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.1.1

Based on the following commits, a minor release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

  • 267eacc feat: configure timeout via options parameter (#223)
  • 138b447 chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 (#220)
  • d9cbd8e chore: update dependabot config (#218)
  • 73bb075 chore(deps): bump lru-cache from 9.1.2 to 10.0.0 (#216)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

deduplicate retrieval calls

If the cache is empty or expired and we receive 10 calls for the same cacheKey, we should not fetch/retrieve the same keys 10 times, but only one.

You can achieve this by putting a Promise in the cache.

Enable NPM Provenance

Integration with beta NPM Provenance integration when publishing new versions to NPM registry.

Release pending!

Pending commits since release v8.0.3

Based on the following commits, a minor release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.5

Based on the following commits, a patch release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

  • 05904c1 ci: update notify-release action permissions (#200)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.0

Unreleased commits have been found which are pending release, please publish the changes.

  • ddebb23 chore: release trigger added to notify-release workflow (#164)
  • a869935 chore: nvmrc content to lts/* (#163)
  • 78536c5 chore(deps-dev): bump tsd from 0.23.0 to 0.24.0 (#162)
  • e21cd12 chore: removed optional github token (#161)
  • a71ca45 chore(deps-dev): bump tsd from 0.22.0 to 0.23.0 (#159)

If you close the issue as Not Planned

  • This notification will be snoozed and a new issue will be recreated after stale-days have passed.

Issue generated by github-actions-notify-release.

Support non standard JWKS paths

Hi,

is it possible to update plugins options to allow passing a custom path to the remote JWKS keys? Currently it always points to .well-known/jwks.json which does not work for every project.

Will be glad to help with the PR.
Thanks for this cool library.

Release pending!

Pending commits since release v8.1.1

Based on the following commits, a patch release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

  • d9cbd8e chore: update dependabot config (#218)
  • 73bb075 chore(deps): bump lru-cache from 9.1.2 to 10.0.0 (#216)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.3

Based on the following commits, a minor release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

  • 4d62f02 chore(deps-dev): bump tsd from 0.27.0 to 0.28.0 (#190)
  • ba0b4a3 chore(deps-dev): bump typescript from 4.9.5 to 5.0.2 (#189)
  • 3508cc6 chore(deps): bump lru-cache from 7.18.3 to 8.0.0 (#188)
  • 2f9cb70 chore(deps-dev): bump tsd from 0.26.1 to 0.27.0 (#186)
  • 3418d90 chore(deps-dev): bump tsd from 0.25.0 to 0.26.0 (#185)
  • e176d31 feat: update notify-release config (#180)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.3

Based on the following commits, a minor release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.1

Unreleased commits have been found which are pending release, please publish the changes.

  • 0dae78f chore(deps-dev): bump tsd from 0.24.1 to 0.25.0 (#172)
  • e77cbd0 chore(deps-dev): bump sinon from 14.0.2 to 15.0.0 (#171)
  • f73ec17 chore(deps-dev): bump fast-jwt from 1.7.2 to 2.0.0 (#168)

If you close the issue as Not Planned

  • This notification will be snoozed and a new issue will be recreated after 7 days have passed.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.6

Based on the following commits, a minor release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.3

Based on the following commits, a minor release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.5

Based on the following commits, a patch release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

  • 05904c1 ci: update notify-release action permissions (#200)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.3

Based on the following commits, a minor release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

  • 2f9cb70 chore(deps-dev): bump tsd from 0.26.1 to 0.27.0 (#186)
  • 3418d90 chore(deps-dev): bump tsd from 0.25.0 to 0.26.0 (#185)
  • e176d31 feat: update notify-release config (#180)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Timeout issue fetching JKWs

I came across a timeout issue when my backend was fetching the JWKs keys using this library. As far as I can see, the timeout is strictly set to 5 seconds, which sometimes may not be enough.

I assume the easiest change is to include the timeout property in the options object and pass it down in the fetch call within retrieveJwk function.

I can raise a PR if it needs.

Using the `n` prop in a JWK

After introducing the jwk-to-pem package to format the keys for use with cognito and other auth service providers, we rely on the n property on a JWKS key. The n property contains the value for the RSA public key and is represented as a Base64urlUInt-encoded value. The following note has been taken from the RSA Public Keys spec regarding the n property:

Note that implementers have found that some cryptographic libraries
prefix an extra zero-valued octet to the modulus representations they
return, for instance, returning 257 octets for a 2048-bit key, rather
than 256. Implementations using such libraries will need to take
care to omit the extra octet from the base64url-encoded
representation.

We'll need to confirm the jwk-to-pem package handles this to support any services that may need it, or any of our own future implementations.

Release pending!

Pending commits since release v4.2.0

Unreleased commits have been found which are pending release, please publish the changes.

  • 877223d feat: Add support for `agent` option. [#78] (#81)
  • 3d0ca14 Bump actions/setup-node from 2.4.0 to 2.4.1 (#80)
  • d20c500 Bump fastify/github-action-merge-dependabot from 2.4.0 to 2.5.0 (#79)
  • 55e3eef Bump fastify/github-action-merge-dependabot from 2.3.0 to 2.4.0 (#76)
  • 348af57 Bump fastify/github-action-merge-dependabot from 2.2.0 to 2.3.0 (#75)
  • 3cd50b2 Bump actions/setup-node from 2.3.2 to 2.4.0 (#74)
  • e2227ce Bump actions/setup-node from 2.3.0 to 2.3.2 (#73)
  • a9db119 Bump actions/setup-node from 2.2.0 to 2.3.0 (#72)
  • a09272a Bump fastify/github-action-merge-dependabot from 2.1.1 to 2.2.0 (#71)
  • 484b93b Bump nearform/github-action-notify-release from 1.2.6 to 1.2.7 (#69)
  • 3f75f43 Bump actions/setup-node from 2.1.5 to 2.2.0 (#70)
  • e5c0223 Bump nearform/github-action-notify-release from 1.2.5 to 1.2.6 (#68)
  • ca6b176 Bump fastify-jwt from 2.5.0 to 3.0.0 (#67)
  • 23da490 Bump nearform/github-action-notify-release from 1.2.3 to 1.2.5 (#66)
  • 77ce82f Bump fastify/github-action-merge-dependabot from 2.1.0 to 2.1.1 (#65)
  • 5295009 Bump actions/cache from 2.1.5 to 2.1.6 (#64)
  • 5eb6ab6 Bump nearform/github-action-notify-release from 1.2.2 to 1.2.3 (#63)
  • f4a7cd2 Bump fastify/github-action-merge-dependabot from 2.0.0 to 2.1.0 (#62)
  • 1dfefc7 Bump sinon from 10.0.1 to 11.0.0 (#61)
  • 24dc846 Bump nearform/github-action-notify-release from 1.2.1 to 1.2.2 (#60)
  • 660d598 chore: remove quotes from dependabot.yml file
  • 9a26ad3 Bump nearform/github-action-notify-release from 1.1.0 to 1.2.1 (#59)
  • 14cac3c Bump nearform/github-action-notify-release from v1.0.1 to v1.1.0 (#58)
  • 9d692c9 bumped notify-release version (#56)
  • 85ec9e4 Notify release workflow (#53)
  • 4c60102 Docs update - JWKS example (#51)
  • c30b1b5 Bump actions/cache from v2.1.4 to v2.1.5 (#50)
  • 14e4be8 chore: bump tap to 15.0.2 (#49)

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.1

Unreleased commits have been found which are pending release, please publish the changes.

  • f73ec17 chore(deps-dev): bump fast-jwt from 1.7.2 to 2.0.0 (#168)

If you close the issue as Not Planned

  • This notification will be snoozed and a new issue will be recreated after stale-days have passed.

Issue generated by github-actions-notify-release.

jwks Endpoint is not configurable and hardcoded

We are using keycloak and the jwks_uri points not to .well-known/jwks.json but to another uri.

This line is hardcoding it

const response = await fetch(`${normalizedDomain}.well-known/jwks.json`, {

As far as I understand is that "jwks_uri" is a required property and should be used in the retrieveJwk.

Will try to setup a PR for that

Release pending!

Pending commits since release v8.0.2

Unreleased commits have been found which are pending release, please publish the changes.

  • ecdbbb1 chore(deps-dev): bump jsonwebtoken from 8.5.1 to 9.0.0 (#176)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Feature request: More specific errors

Currently, get-jwks throws generic instances of Error and all details are "hidden" in the message (and are thus not easily accessible). This is problematic because it lumps together all errors that can potentially occur:

  • upstream errors (e.g., the discovery endpoint returns a 503)
  • errors caused by the library itself (not really an issue here as far as I can tell)
  • downstream errors (errors for which arguably the client is responsible, e.g. JWK_NOT_FOUND)

This matters because the HTTP status code returned to the client should indicate the root cause and be 502, 500 and 400 (or 401), respectively. Mapping this correctly is currently not feasible.

I propose to use the code property to convey that information. We could, at least in part, use the keys in the message mapping for that. Defining a new error class, say JwksError, might also be beneficial to simplify user land code.

I'm more than happy to whip up a PR if you are in principle willing to add such a feature.

Release pending!

Unreleased commits have been found which are pending release, please publish the changes.

Following are the commits:
Issue: Notify release workflow (#53)

  • notify release workflow added
    Co-authored-by: Sameer Srivastava [email protected]
    Author: Sameer Srivastava

Issue: Docs update - JWKS example (#51)

  • JWKS example updated in docs
  • fast-jwt integration test updated
    Co-authored-by: Sameer Srivastava [email protected]
    Author: Sameer Srivastava

Issue: Bump actions/cache from v2.1.4 to v2.1.5 (#50)

Bumps actions/cache from v2.1.4 to v2.1.5.

Signed-off-by: dependabot[bot] [email protected]

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Author: dependabot[bot]

Issue: chore: bump tap to 15.0.2 (#49)

  • chore: bump tap to 15.0.2

  • fix: move tap to devDependencies

  • fix: deprecation warnings
    Author: Jack Murdoch

Issue: Bumped v4.2.0
Author: Simone Busoli

Release pending!

Unreleased commits have been found which are pending release, please publish the changes.

Following are the commits:
Issue: Notify release workflow (#53)

  • notify release workflow added
    Co-authored-by: Sameer Srivastava [email protected]
    Author: Sameer Srivastava

Issue: Docs update - JWKS example (#51)

  • JWKS example updated in docs
  • fast-jwt integration test updated
    Co-authored-by: Sameer Srivastava [email protected]
    Author: Sameer Srivastava

Issue: Bump actions/cache from v2.1.4 to v2.1.5 (#50)

Bumps actions/cache from v2.1.4 to v2.1.5.

Signed-off-by: dependabot[bot] [email protected]

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Author: dependabot[bot]

Issue: chore: bump tap to 15.0.2 (#49)

  • chore: bump tap to 15.0.2

  • fix: move tap to devDependencies

  • fix: deprecation warnings
    Author: Jack Murdoch

Issue: Bumped v4.2.0
Author: Simone Busoli

Release pending!

Pending commits since release v8.0.1

Unreleased commits have been found which are pending release, please publish the changes.

  • 0dae78f chore(deps-dev): bump tsd from 0.24.1 to 0.25.0 (#172)
  • e77cbd0 chore(deps-dev): bump sinon from 14.0.2 to 15.0.0 (#171)
  • f73ec17 chore(deps-dev): bump fast-jwt from 1.7.2 to 2.0.0 (#168)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.1.1

Based on the following commits, a patch release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

  • 73bb075 chore(deps): bump lru-cache from 9.1.2 to 10.0.0 (#216)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v5.0.0

Unreleased commits have been found which are pending release, please publish the changes.

  • 9ae083b chore(deps-dev): bump @types/lru-cache from 5.1.1 to 7.4.0 (#120)
  • 4cda2f1 chore(deps): bump actions/setup-node from 2 to 3.0.0 (#118)
  • e26bb57 Added type definitions and tests for types (#115)
  • 90dd538 chore(deps-dev): bump sinon from 12.0.1 to 13.0.0 (#112)
  • b5c26f2 fix: updating pull request event (#111)
  • 7141dd4 chore: create .github/workflows/check-linked-issues.yml

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.1.1

Based on the following commits, a patch release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

  • 138b447 chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 (#220)
  • d9cbd8e chore: update dependabot config (#218)
  • 73bb075 chore(deps): bump lru-cache from 9.1.2 to 10.0.0 (#216)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.3

Based on the following commits, a minor release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

use stale on fail

If we fail to fetch() the URL, it is better to use a stale key if it is missing.

Release pending!

Pending commits since release v8.0.4

Based on the following commits, a patch release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

  • 2210fff chore(deps): bump lru-cache from 8.0.5 to 9.0.0 (#197)
  • d3d40dd switch the org for github-action-notify-release (#198)
  • a9e9079 switch the org and fix permissions for github-action-notify-release (#196)
  • 7c53383 ci: update check-linked-issues job permissions (#194)
  • 0c8a48b switch the org for optic-release-automation-action (#193)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Refactor to a factory, embed cache

I recommend the following refactoring:

const buildJwksFetch = require('jwks-fetch')

const jwksFetch = buildJwks({
  cache: {
    max: 100, // max number of items in the cache
    ttl: 60 * 1000 // 1 minute
  }
})

cosnt secret = await jwksFetch({
  domain: 'https://exampe.com/',
  alg: 'token_alg',
  kid: 'token_kid'
})

jwksFetch.clear() / / reset the cache

I would recommend using https://www.npmjs.com/package/tiny-lru instead of node-cache.

Release pending!

Pending commits since release v8.0.5

Based on the following commits, a patch release is recommended.

Unreleased commits have been found which are pending release, please publish the changes.

  • 05904c1 ci: update notify-release action permissions (#200)

If you close the issue as Not Planned

  • The notification will be snoozed for 7 days, starting when the issue is closed. After this period has passed, a new notification issue will be created the next time this action is run.

Issue generated by github-actions-notify-release.

Release pending!

Pending commits since release v8.0.1

Unreleased commits have been found which are pending release, please publish the changes.

  • f73ec17 chore(deps-dev): bump fast-jwt from 1.7.2 to 2.0.0 (#168)

If you close the issue as Not Planned

  • This notification will be snoozed and a new issue will be recreated after 7 have passed.

Issue generated by github-actions-notify-release.

Remove test folder from published package

Since package.json does not contain the files property, all the files from the repo get published to npm, as can be seen here.

This includes the test folder, along with a dummy private key used for unit tests.

This causes image/container scanning tools to report vulnerabilities stating that the image contains private keys, when this package is added as a dependency to an image.

This can be avoided by adding a files property to package.json as below:

  "files": [
    "src"
  ],

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.