Docebo - Setting up OAuth JWT Bearer grant type - Public key is invalid

我的未来我决定 提交于 2019-12-11 17:49:31

问题


I tried to set up an OAuth 2.0 client on API Credentials page in Docebo with JWT Bearer grant type and upload a Public Key that is used to verify the signature of incoming assertion (JWT Bearer token). Docebo shows an error that Public Key is invalid (see an image 1 below).

I tried the following certificate file formats with public keys. Docebo doesn't accept them:

  1. Base-64 encoded X.509 (.CER)
  2. DER encoded binary X.509 (.CER)

Instructions from Docebo - APIs Authentication do not specify the file format too.

In which format Docebo accepts a Public Key for JWT Bearer grant type?

Image of "Public Key is invalid error message" in Docebo


回答1:


Docebo accepts public keys in PEM format (Base-64 encoded public key of X.509 certificate):

-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMYfnvWtC8Id5bPKae5yXSxQTt
+Zpul6AnnZWfIdasdfsadfasdfasdfasdfasdfLKJKGCsRqMFDkrbeUjRrx8iL91
4/srnyf6sh9c8Zk04xEOpK1ypvBz+Ks4uZObtjnnitf0NBGdjMKxveTq+VE7BWUI
yQjtQ8mbDOsiLLvh7wIDAQAB
-----END PUBLIC KEY-----

To get a public key of a base-64 encoded X.509 (.CER) use the following command:

openssl x509 -pubkey -in certificate.cer -noout 1>PublicKey.pem


来源:https://stackoverflow.com/questions/51334239/docebo-setting-up-oauth-jwt-bearer-grant-type-public-key-is-invalid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!