postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.87k stars 841 forks source link

Allow to use Node.js crypto library in the sandbox #3646

Open JoseExposito opened 7 years ago

JoseExposito commented 7 years ago

App Details:

Postman for Mac
Version 5.3.0
OS X 10.11.6 / x64

Feature Request:

This is not a bug report, just a feature request.

It'd be nice if Node's crypto module could be accessible from the sandbox.

I'm trying to generate a ES256 JWT token before each request in my collection but CryptoJS does not implement the ECDSA algorithm. Also, crypto implements much more functionality that CryptoJS and I'm sure there are many use cases where this feature will be useful.

Thanks a lot for your excellent work on Postman 😄

harryi3t commented 7 years ago

@JoseExposito I am glad that you like our product so much :) Adding support for crypto is already on our roadmap. Will keep you posted.

Thank you for your patience.

frankiedrake commented 7 years ago

Also waiting for crypto :D Thanks!

EskoCruz commented 6 years ago

Same 😃

pburgr commented 6 years ago

mee too

davidschwab commented 6 years ago

@harryi3t @kamalaknn Postman/Newman is an awesome platform, but this too is a blocker for RSA support. Exposing the native node.js crypto module would solve, any ETA?

FYI - this issue looks similar.

Update: In case anyone else can do the same, I worked around this by creating an external microservice to create the needed signed JWT using the RS256 algorithm.

kingwrcy commented 6 years ago

+1,please support RSA encrypt/decrypt/sign/verify。

brugr9 commented 6 years ago

+1: crypto.createHmac('sha1', pm.apiToken)

Ruku1590 commented 6 years ago

When can we expect this to be available?

runev commented 6 years ago

+1

speaud commented 6 years ago

I agree that it'd be great to integrate NodeJS and it's packages with PM.

In this case you could possibly use the builtin sandbox crypto-js package - https://www.getpostman.com/docs/v6/postman/scripts/postman_sandbox

JagpreetKaur commented 6 years ago

When this will be available? Need to use cryto so many times

runev commented 6 years ago

This - or at least something which allows us to create RSA-SHA256 signatures based on draft-cavage-http-signatures-10 has to be added.

We've currently had to develop a minor reverse proxy app in Node, which we use to dispatch all Postman requests through to be able to set the Signature header - only because Postman doesn't support RSA-SHA256 using CryptoJS.

It's a pain.

logiiiiiiiii commented 6 years ago

+1

hodga commented 6 years ago

+1

anhthang commented 5 years ago

+1

msutormin commented 5 years ago

2 years passed and still no crypto. Sadly it doesn't seem like a high priority feature.

BoCsA commented 5 years ago

+1

joseviro commented 5 years ago

+1

nery commented 4 years ago

+1

Lukazar commented 4 years ago

+1

thoys commented 4 years ago

+1

andrew-property-xyz commented 4 years ago

Need crypto in sandbox. All google cloud APIs require OAuth2 tokens signed using RS256. The workaround of using eval(pm.globals.get('jsrsasign-js')) does not work for me. Completely stumped and now looking at other tools to deliver automated testing of my APIs. Clearly this is not a priority and would love to understand the thinking behind supporting crypto-js when RS256 is so commonly used...

arlemi commented 4 years ago

@andrew-property-xyz There are a few options to import external libraries, see:

andrew-property-xyz commented 4 years ago

Hi Arlemi - thanks for getting back to me. With a little more perseverance, I managed to resolve the issue I was having and now have the 'jsrsasign-js' library imported and working. Whose idea was it to have both an underscore and a hyphen in our language...! ;) (it wasn't quite as simple as that but it was the first hurdle)

arlemi commented 4 years ago

Glad you got it working @andrew-property-xyz ! If you have a code sample/collection to share I'm sure people in this thread would also be grateful. 😄

secure12 commented 3 years ago

4 years passed and still no crypto in Postman... nice...

d-lach commented 2 years ago

This is a joke.

muhaimincs commented 2 years ago

what a joke

ga250182 commented 2 years ago

When we can expect crypto lib made available in postman

a-badalyan commented 2 years ago

21.10.2022 ping

pbmzero commented 1 year ago

Not having the crypto library easily importable makes it hard to consume soap wss-v1.1 spec because the UsernameTokenProfile requires sha-1 encrypt the authentication headers wsse:Nonce :
https://www.oasis-open.org/committees/download.php/13392/wss-v1.1-spec-pr-UsernameTokenProfile-01.htm

The SOAP API vendor I'm consuming actually recommended instead use testing framework rather than postman for this reason

mtubul commented 1 year ago

any updates reagrding the ability to load crypto module? need it since i am using WebAuthn module which using the crypto module under the hood and i was highly happy if we had it

karelbilek commented 1 year ago

Related to #2678 but honestly I don't think it will ever be fixed

karelbilek commented 1 year ago

What did work for me:

then you can actually use the API of the library, as described here

https://kjur.github.io/jsrsasign/

I am not sure if the API you want is there though; maybe you can find another library

khiem20tc commented 1 year ago

Need to use "crypto" build-in node in Sandbox Postman to create signature authentication for APIs. Have any suggestions for replacement solutions?

lachlanritchie1 commented 10 months ago

@davidschwab how did you create the external microservice you mentioned here? If you can point us to us some exmaples that would be great. Thank you.

@harryi3t @kamalaknn Postman/Newman is an awesome platform, but this too is a blocker for RSA support. Exposing the native node.js crypto module would solve, any ETA?

FYI - this issue looks similar.

Update: In case anyone else can do the same, I worked around this by creating an external microservice to create the needed signed JWT using the RS256 algorithm.

YannMathieu commented 10 months ago

@khiem20tc Take a look at https://gist.github.com/aroemen/91d4368cf5714f5d32ea5bdb53d221f9. I have been able to use it for Auth0 Private Key JWT machine to machine authentication.

foliv57 commented 1 week ago

Hi, any news on that feature request ? "crypto-js" is now discontinued, meaning that having access to NodeJS crypto module becomes a must-have for any modern encryption. Thank you