Studio provides you with several Connectors like Databases like MySQL, and Microsoft SQL, Third-party connectors like Slack, Trello, Stripe, etc. You can also connect to different APIs using their respective authentication methods. There are different methods of API authentication, using the API Key, using basic Auth which is using the username and password, using OAuth which is a standard for accessing user permissions without a password, the AWS authentication method, multistep authentication method, OAuth Client Credentials, Digest Authentication, and Hawk Authentication.
The Hawk Authentication technology and method is relatively new, intending to introduce a simpler approach authentication scheme. It is an authentication scheme for HTTP, built around HMAC digests of requests and responses.
Configuring the third-party API connector
To add third-party connectors, under Studio > Connectors, click (+) Connector.
Studio has different options including the use of the REST API that allows you to easily connect to the Third-Party API and access important systems. It has a Hawk Authentication option.
Configure API Category
When configuring the APIs you need to provide the Authentication details for the respective authentication method. Let us see how to configure an API using the hawk authentication method.
Once you select the REST API, enter the Connector name which should ideally be self-explanatory.
In the Authentication section, select Hawk Authentication.
Configure account-specific fields
Use the Hawk authentication type if your API uses a Message authentication code (MAC) to authenticate and detect any kind of tampering with the data.
- Hawk Auth ID: Copy Hawk Auth ID from your app and enter here, may also be called Hawk ID, Token ID or Access ID.
- Hawk Auth Key: Copy Hawk Auth Key from your app and enter here, may also be called Hawk Key, Token Key or Access Key.
Algorithm: Select the algorithm type supported by your API Service Provider.
- SHA – 256: It is used when you have the transformed code challenge created by SHA256 hashing the code verifier.
- SHA1: uses the signature algorithm where the Signature Base String is the text and the key is the concatenated values of the Consumer Secret and Token Secret, separated by an ‘&’ character (ASCII code 38) even if empty.
A client must obtain a token id and token key from the server in order to sign requests. Your server application will return the credentials to you when it needs to provide them to you in a special Hawk-Session-Token header. The two values (hawk id and hawk key) that you will use to sign your subsequent requests may be extracted from this token by splitting the string in question.
In the above image, we have used Zercurity service as the endpoint API and its credentials.
When the request is successful it will show the respective message. Click Save and the process is complete.
You can now add APIs based on the Connector configuration. Under Studio > Connectors you can see your connector is added. To add your new API as per the API endpoint, click Add API .
Now Add the Connector API name and the API endpoint with the required parameters and test your API.
You can select the Manage Environment option from the edit button of the configured connector. Here you can manage different environments such as production, staging, development, test environment, and others, of a single account by adding different credentials and other details corresponding to different environments.
Select either the environments which you haven’t configured yet, by clicking on configure or clicking on the configured environments to make further changes and edits.
You will see that the environments which are yet to be configured already have the base URL of your API endpoint for the given environment. You can make changes from a single place and these changes will reflect on your respective environments.