Generating an RSA Keypair

Does anyone know how to properly generate an RSA Keypair to output a public key? I’m trying to integrate with Box’s JWT-OAuth2 authentication method and after a lot of time spent with the documentation and the errors I’m getting back from the API Connector, I think this is the only thing I’m not doing right. It’s possible this integration is just not supported, but I feel like I’m very close.

Feel free to see what I’m up to here: https://docs.box.com/v2.0/docs/app-auth

The only thing I’m asking for help with is the RSA Keypair. It seems to involve terminals that I don’t know a thing about. I’m able to do every other thing on this page except this. I tried. I downloaded the Cygwin stuff and got pretty far, but am not able to produce the actual RSA public key.

I even downloaded a public key from Bubble’s advanced API settings. Box seemed to like that and verify it, but then when it came to the actual call, I get the following error, which I’m 97% certain has everything to do with the public key. I just need to encode it properly. Someone with a little more code know-how… please help.

I haven’t tried this API, but maybe these suggestions will help …

OpenSSL is not one of that packages that gets installed by default with Cygwin. The important part of install is choosing OpenSSL as one of the packages you install

Another option is to install VirtualBox, download one of the linux live ISOs, boot a virtual machine from it, open a terminal (like a command line prompt), and the openssl will likely work there. Hmmm, cygwin does sound like an easier option …

This does look like the right format. The problem will be working out how to get Bubble to sign the right bits to create the token, which is what the OAuth2 part of the API connector is supposed to do …

1 Like

This looks like it might do the job simply.

http://travistidwell.com/jsencrypt/demo/

1 Like

Thanks, guys. I will be jumping on these today. Really, really appreciate it. @NigelG I don’t know how you found that generator. Fingers crossed it works…

This topic was automatically closed after 70 days. New replies are no longer allowed.