Comments (11)
No, its correct. node >=12.0.0 is the described minimal version for its keyobject and crypto api additions and with node 12 come private class fields which i’m glad to have available as a side effect.
from jose.
However, you just have to accept that as a result your library might not be used.
And I'm okay with that, fully expected that. If one cannot / doesn't want to use node 12 yet, there are long time available and popular alternatives, I'm not hiding the fact this is >=12.0.0
, just like i'm fully declaring one cannot use this transpiled in a browser since the API just isn't there in webcrypto either.
I could split myself in two and there would still be no way to get these new APIs in older versions of node since they require minimal version of OpenSSL that is higher than what older node versions can be built with, hence the crypto
maintainers chose to go the way of making this semver-major in node with no way to backport.
from jose.
It is the current stable release line and a future LTS. Its features (not just the available syntax) are mentioned to be the prerequisite in the readme.
from jose.
No there is not. APIs were added in 11.6.0 and 12.0.0.
https://github.com/lambci/node-custom-lambda you can run node 12 in lambda
from jose.
#37 https://v8.dev/features/class-fields
from jose.
That version is not current stable version. @panva
from jose.
@panva currently lambda's support stops at node 10.
https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html
Is there a way to use your library in node v10?
from jose.
For those wondering, Node v12 won't be LTS until Nov 22, 2019 (see schedule).
Also, the Node website states "Production applications should only use Active LTS or Maintenance LTS releases." It would be good to call that out so people aren't upgrading their productions environments thinking they are outdated.
from jose.
@tysonmatanich while that may be true there’s nothing against targetting the current release line for new features, such as is the case of this library.
The CI that runs daily also runs with the most recent current version on multiple platforms (e.g. mac, windows, linux) as well as the nightly release. With the current release line there are no breaking changes to stable apis and the same cadence of security fixes.
The crypto API also recommends the use KeyObjects over the old way of passing PEM formatted keys for all available operations for both security and performance reasons.
from jose.
@panva i'm totally on board with your reasoning. however, you just have to accept that as a result your library might not be used. I found it to be simpler and less thought provoking to use a combination of node-jose and jsonwebtoken instead of upgrading my lambda layers. also notice there is a cold boot penalty for doing so (at least for now). so my solution is in package.json "@types/jsonwebtoken": "^8.3.2", "@types/node-jose": "^1.1.0", "jsonwebtoken": "^8.5.1", "node-jose": "^1.1.3",
and a little bit of code on top.
from jose.
I've made @panva/jose compatible with lts/dubnium, it is now being tested with Node.js ^10.13.0 || >=12.0.0
and Electron ^6.0.0
It is not without caveats, but they are acceptable.
- Importing X.509 certificates and handling x5c is only supported when Node.js >= 12.0.0 runtime is detected
- OKP keys are only supported when Node.js >= 12.0.0 runtime is detected
from jose.
Related Issues (20)
- Check for `jwk.oth` should also check for `null` value HOT 2
- CryptoKey is not extractable HOT 1
- JWKS Timeout : request timed out HOT 1
- Cannot read properties of undefined (reading 'base64url') HOT 7
- Claims validation should not mutate incoming `requiredClaims` array HOT 6
- jose importSPKI error TypeError: "spki" must be SPKI formatted string HOT 2
- Bun: Export named 'diffieHellman' not found in module 'crypto'. HOT 1
- Maybe slightly tweak the exports? HOT 4
- createLocalJWKSet should not generate a TS error when called with immutable input HOT 2
- Signature verification works in Node.js but fails in Cloudflare Workers HOT 1
- Cloudflare: The requested module 'node:crypto' does not provide an export named 'constants' HOT 5
- Support for AWS Lambda LLRT Runtime HOT 1
- `msw` is unable to intercept JWKS request in node environment due to namespace (`* as`) import HOT 1
- [Usage with Vitest/JSDOM] payload must be an instance of Uint8Array HOT 2
- Reference error: Key is not defined HOT 1
- JWT decryption does not support IVs longer than encryption key length for GCM HOT 9
- Minor error in example #112 HOT 1
- Signature validation fails when using mutliple JWKS endpoints HOT 8
- 5.6.0 normalizePrivateKey HOT 3
- HMAC key data must not be empty HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jose.