Can you UNRevoke a OAuth 2.0 Client Credentials se...
# suitescript
d
Can you UNRevoke a OAuth 2.0 Client Credentials setup?
We have a client that had some rouge employee revoke an integration
Its part of a SuiteApp, and the integration record is distributed in it
e
Yes you can revoke the certificate
d
@Eric B, I'm trying to UNrevoke
a
I don't think so you just have to issue new ones
e
Once a certificate is revoked it cannot be used again. You will need to upload a new certificate and send the new key to them to use for the JWT.
👍 1
d
Oh geez, really? So, this would affect all the other customers ? Since I have to regenerate a new set of keys?
I mean, the integration server's private key would need to be updated ... and so would everyone else's public key. Have I got that right?
b
you can use the same private key to generate a certificate
d
Oh? This I didn't know. So, the other customers would not be affected?
b
you still need a new certificiate/public key
but the private key used by your server can remain the same
d
Well, I can't get this to work. When I run
openssl pkey -in ./private.pem -pubout -out ./public.pem
When I try and use the new public.key, NetSuite says
Copy code
*OAuth 2.0 Client Credentials Error*
Unable to parse provided x509 certificate.
I think this is above my pay grade.
b
you use opsenssl req without -newkey and instead use -key
d
Lemme give er a go
Ok, that works'ish. Now the issue is the client will get a NEW Certificate ID (which will be different from everyone elses). So, I'm in the same boat. The integration server can retain its private key, the need to update its CertID to get an NS AccessToken.
b
again, you still need a new certificate for netsuite
d
So, I'm understanding. What I'm working towards is ..
Let's say I have an install base of 10 netsuite accounts with my SuiteApp. I have a node server that is going to talk to these accounts via ClientCreds. I generate my cert/keys. I retain the private key and distribute the public keys. At this point, I can connect to all 10 netsuite accounts.
Now, I have 1 customer who accidentally revokes , and now loses connectivity. I'm trying to figure out a way to help that customer regain access, without affecting the other 9
Should I assume (support) the fact that each install could have a unique CertID?
b
yes
d
Cool. So each NetSuite install, I'll store the NS AccountID AND the generated CertID.
@battk, thanks for stepping in. Always appreciated.