Posted: 10 Apr 2019 18:09 EDT Last activity: 14 May 2019 9:49 EDT
JWT Bearer Authentication for REST Connector?
We need to provide an Authorization header (Bearer type) with a JSON Web Token (JWT) when calling a REST Connector for server to server authentication. Since there doesn't seem to be an Authentication Profile to do this, I had to add an Authorization header on my REST Connector methods and map it to a Clipboard property. Then I needed to create a custom Activity to call the pxGenerateJWT activity and copy the JWT value to Clipboard property before calling the REST Connector.
This works but it means that every time I generate rules using the Create REST Integration wizard I need to customize the generated Data Page to call a custom Activity instead of calling the REST Connector directly. This means additional costs for development and maintenance.
Is there a better way to do this? Any chance that support for this will be added to the platform? If not, is there a way for us to define our own custom Authentication Profile types so that we can minimize the amount of work needed to set this up on each connector?
We are using an on-prem instance of the 7.4 platform.
I am using an Activity for the source of my Data Page. The Activity calls pxGenerateJWT with my JWT Token Profile as an input and then sets the pyJWT property value on the output page to a property that I have mapped in the Connect REST rule to my Authorization header. Now that the mapped property has a valid JWT value, the activity can run the Connect-REST method to run my connector.
Hope this helps.
Posted: 3 years ago
Posted: 14 May 2019 2:54 EDT
Vibek Sharma (Vibek_Sharma)
Principal Engineer, Technical Support
Thanks, I've done this and it works fine. However, that's not the point of my original question. The question was about how to map the JWT value to a header in a REST Connector without having to create custom Activities to use in the Data Pages instead of being able to use the REST Connector as a source. From what I've gathered so far, the only option is to use a custom Activity.