Hi Descopers Generic HTTP Connector question over...
# ask-a-descoper
d
Hi Descopers Generic HTTP Connector question over here. If I have multiple actions I want Descope to communicate with my API server - What is the best practice? Create multiple Generic Connectors? Or create 1 Connector and manage the communication/actions via other means?
a
Hey David, If by different actions you mean POST, PUT, DELETE etc, you can do all of them with one connector itself. You need to choose which one will be used each time you choose a connector block in the flow
d
@Atharva Joshi Thanks. I guess if I have multiple endpoints it's still the same http connector. Another question: Regarding authentication - what is recommended? And is it recommended to add HMAC Secret?
a
I guess if I have multiple endpoints it's still the same http connector.
Yes you can the same connector for multiple endpoints
Regarding authentication
Other than Basic Authentication any of the other three are more secure and advanced. But you can choose one according to your requirements
And is it recommended to add HMAC Secret?
Yes its recommended to add HMAC Secret for verifying the payload's integrity and authenticity. Refer Doc
d
So basically I provide an HMAC Secret on the configuration "SOME SECRET 123" Descope will encrypt it for me and upon arrival I will encrypt the same HMAC secret on my end and will check at the end they are the same encryppted values ?
a
No you should avoid dictionary words. Instead your key should look something like this -
3f8c9a4d1b6e0f2c9e7a5d1c8b4f6a2e9c1d0b7f8a6e5c4d3b2a1f9e8d7c6b5a4
It should be generated by a cryptographically secure random number generator You can generate one with this -
openssl rand -base64 64
The key will be used to *sign (*base64 encode) the payload and the signature will be sent in the
x-descope-webhook-s256
header. You need to use this key to verify that signature on your end.