Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/02/2024 08:57 PM
Hi guys,
I need to use Digest auth for an application. This proves to be really hard as I don't even know where to begin with.
It works via postman with the MD5 Algorithm but there is no auth type in the saviynt docs that seems to support this type of authentication.
Also, I am not sure but I think I need to send the digest everytime as there is no way to retrieve a token.
I am trying the below API calls that I will need to make in Saviynt:
https://www.mongodb.com/docs/cloud-manager/reference/api/organizations/organization-get-all/
Any help is appreciated, thank you.
04/02/2024 09:55 PM
Are you using rest connector ?
# Generate authentication token
curl -X POST -H "Content-Type: application/json" -d '{"username": "your_username", "password": "your_password"}' http://your_restheart_server:port/tokens
# Response will include the token:
# {"token": "your_authentication_token"}
# Fetch documents from a collection
curl -H "Authorization: Bearer your_authentication_token" http://your_restheart_server:port/db_name/collection_name
04/02/2024 09:58 PM
@rushikeshvartak - Thank you for repliyng. Can you please provide a connection json and import JSON where you are using CURL in the command ? I know I can get what I need from a curl call but I am not able to run curl calls in the connections.
04/02/2024 10:00 PM
Sample
{
"authentications": {
"RPAAUTH": {
"authType": "oauth2",
"url": "http://your_restheart_server:port/tokens",
"httpMethod": "POST",
"httpParams": "{\"username\": \"your_username\", \"password\": \"your_password\"}",
"httpContentType": "application/json",
"errorPath": "error.message",
"maxRefreshTryCount": 5,
"authError": [
"You are not authenticated!"
],
"retryFailureStatusCode": [
400,
401,
402
],
"tokenResponsePath": "authentications.RPAAUTH.accessToken",
"tokenType": "Bearer",
"authHeaderName": "Authorization"
}
}
}
04/02/2024 10:08 PM
That is not working. That is using oauth2. I need to use digest auth which inially makes a Get with no authorization, then builds the authorization with the information received in the response JSON.
04/02/2024 10:33 PM
Digest auth type is not supported. Raise idea ticket