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.83k stars 838 forks source link

Feature Request: RSA Encryption #1607

Open Olf42bur opened 8 years ago

Olf42bur commented 8 years ago

Hello Postman!

I need to encrypt an object with RSA 2048 method thanks to my public key to perform my complete test procedure with postman.

In the CryptoJS library it seems that there is only symmetric methods proposed.

What do you think about adding this really popular encryption method ?

Because right now, I'm a little bit stuck :/

Thank you in advance, Florian

a85 commented 8 years ago

Looking into this. Added this as a feature request.

vivaladan commented 8 years ago

This would be a really useful feature for me.

Olf42bur commented 8 years ago

Still no plan to add an RSA library ? :(

I will need to make a separate node.js just to do this encryption, postman will be dependent to an other app :(

glennkidd commented 7 years ago

+1 also, would love support for this

abrahambosch commented 7 years ago

+1 for asymmetric cryptography

ihommani commented 6 years ago

This is indeed needed. Google for instance uses SHA256withRSA to sign JWT. So to mimic all the authentication flow through Postman this is mandatory.

selfboot commented 6 years ago

+1 for asymmetric cryptography

kurtulussahin commented 6 years ago

+1

Shifty-kek commented 6 years ago

+1

devwlw commented 6 years ago

+1

turkoz commented 6 years ago

+1

loveiset commented 6 years ago

+1, really need this

kingwrcy commented 6 years ago

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

iuriiismirnov commented 6 years ago

One for me, please

rikimod commented 6 years ago

+1, really needed

runev commented 6 years ago

+1

nguyenthinam commented 6 years ago

+1

loveiset commented 6 years ago

I figure out a temporary solution, may this be helpful for you. project RSAForPostman

nguyenthinam commented 6 years ago

I found another solution here while waiting postman support.

  1. Load Crypto Library for RS256
  2. Use SHA256withRSA to sign JWT in your Authentication request. Paste the following script in Pre-request Script (Don't forget to update payload by your info):
    
    var navigator = {}; //fake a navigator object for the lib
    var window = {}; //fake a window object for the lib
    eval(pm.globals.get("jsrsasign-js")); //import javascript jsrsasign

var currentTime = +new Date(); // the current time in milliseconds var issuedAtTimeSeconds = currentTime/1000; var expirationTimeSeconds = currentTime/1000 + 3600;

var header = {"alg" : "RS256","typ" : "JWT"}; var payload = { "iss" : pm.environment.get("ServiceAccount"),
"scope" : pm.environment.get("Scope"), "aud" : pm.environment.get("TokenUrl"), "exp" : Math.ceil(expirationTimeSeconds), "iat" : Math.ceil(issuedAtTimeSeconds) };

var privateKey = pm.environment.get("PrivateKey"); var sHeader = JSON.stringify(header); var sPayload = JSON.stringify(payload);

var sJWT = KJUR.jws.JWS.sign(header.alg, sHeader, sPayload, privateKey);

console.log(sHeader); console.log(sPayload); console.log(sJWT);

pm.environment.set("jwt_token", sJWT);


I'm using this solution to access Google APIs by service account. Completely success!
ylaguna commented 6 years ago

+1

gebonadio commented 6 years ago

+1

AdamHeidfeld commented 6 years ago

+1

tanmoy-git commented 6 years ago

Any ETA on when it will be integrated? Its a needed feature.

irishelp commented 5 years ago

+1 Waiting for official

maxcoffer commented 5 years ago

+1

morrisond91 commented 5 years ago

I have a similar solution to nguyenthinam, except my only is only for RSA signature creation.

solution can be found here: https://github.com/morrisond91/PostmanRsaSupport/blob/master/README.md

aantono commented 4 years ago

Any update on this? It's been open for 5 years, would be nice to get this much needed feature supported! It is very vital to have, given the high emergence of HTTP Signature auth methods. I see that Postman supports AWS Signature as a pre-defined authentication method, which internally uses the RSA component to sign the requests, so the code must already be there, just needs to be exposed to the pre-script environment to be able to get called from there!!!

klnlakshmi commented 4 years ago

Any update on this request? If it comes out of the box from postman itself instead of depending on some external library, it will be good

WarGreyGon commented 2 years ago

Still no update on this? 😥

Is there any blocker or something preventing this feature to be implemented?

This feature will be REALLY REALLY usefull

Ibnu-Alinsani commented 2 days ago

+1