Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: RSA Encryption #1607

Open
Olf42bur opened this issue Dec 11, 2015 · 29 comments
Open

Feature Request: RSA Encryption #1607

Olf42bur opened this issue Dec 11, 2015 · 29 comments
Assignees
Labels
encryption feature Initiative All feature requests that will be taken up as a new initiative product/runtime sandbox

Comments

@Olf42bur
Copy link

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
Copy link
Contributor

a85 commented Dec 13, 2015

Looking into this. Added this as a feature request.

@a85 a85 added the feature label Dec 13, 2015
@a85 a85 added transfer and removed transfer labels Jan 28, 2016
@vivaladan
Copy link

This would be a really useful feature for me.

@Olf42bur
Copy link
Author

Olf42bur commented Oct 8, 2016

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
Copy link

+1 also, would love support for this

@abrahambosch
Copy link

+1 for asymmetric cryptography

@ihommani
Copy link

ihommani commented Nov 2, 2017

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
Copy link

+1 for asymmetric cryptography

@kurtulussahin
Copy link

+1

3 similar comments
@Shifty-kek
Copy link

+1

@devwlw
Copy link

devwlw commented Mar 22, 2018

+1

@turkoz
Copy link

turkoz commented Mar 28, 2018

+1

@loveiset
Copy link

+1, really need this

@kingwrcy
Copy link

kingwrcy commented Apr 8, 2018

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

@iuriiismirnov
Copy link

One for me, please

@rikimod
Copy link

rikimod commented May 4, 2018

+1, really needed

@runev
Copy link

runev commented Jun 6, 2018

+1

1 similar comment
@nguyenthinam
Copy link

+1

@a85 a85 self-assigned this Jun 29, 2018
@loveiset
Copy link

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

@nguyenthinam
Copy link

nguyenthinam commented Jul 1, 2018

I found another solution here while waiting postman support.

  1. Load Crypto Library for RS256
pm.globals.set("jsrsasign-js", responseBody);
  1. 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
Copy link

ylaguna commented Jul 18, 2018

+1

2 similar comments
@gebonadio
Copy link

+1

@AdamHeidfeld
Copy link

+1

@tanmoy-git
Copy link

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

@irishelp
Copy link

+1
Waiting for official

@maxcoffer
Copy link

+1

@morrisond91
Copy link

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
Copy link

aantono commented Apr 29, 2020

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!!!

@saswatds saswatds added this to Pending triage in Runtime Triage and Development via automation Jul 21, 2020
@saswatds saswatds moved this from Pending triage to Later in Runtime Triage and Development Jul 21, 2020
@klnlakshmi
Copy link

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

@giridharvc7 giridharvc7 added the Initiative All feature requests that will be taken up as a new initiative label Apr 19, 2021
@WarGreyGon
Copy link

Still no update on this? 😥

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

This feature will be REALLY REALLY usefull

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encryption feature Initiative All feature requests that will be taken up as a new initiative product/runtime sandbox
Projects
Sandbox/Runtime
Suggestions
Development

No branches or pull requests