Prerequisites
API Contract
HTTP Method | Endpoint | Request | Return | Authorization |
---|---|---|---|---|
Swagger Url : IAM Controller | ||||
GET | /iam/user?username={username}&requestorUsername={requestorUsername} |
Request Header: x-api-key : {api-key} x-requestor-token :{requestor-token} x-application-uuid :{application-uuid} |
Response Body { |
Protected by IAM Introspect API
|
Swagger API Docs: https://api.haventec.com/authenticate/v1-2/api-docs.html#/iam-controller
Authenticate API: https://api.haventec.com/authenticate/v1-2 /iam/user?username={username}&requestorUsername={requestorUsername}
- username: We can get the user details by providing the user's Haventec username. e.g. 934bcc1f-e4b9-4d9e-a617-483700816b4d
To get the user's username. Log in to Haventec IAM, select the digital Realm where users are registered. e.g. Digital Realm and click ' Users ' on the left menu and then click on the user's
' ID ' on the right-side table with the user's list for which the details need to be fetched.
Then click on the ' Identity Provider Links ' tab
Copy value in the column ' Provider Username '. This can be passed as a username in the authenticate API mentioned above.
- requestorUsername: It is the ' username ' passed in the HTTP request in step 3. ' The user sends a HTTP request to the IAM to log in and get a JWT ' in Configure Haventec IAM with the client and users.
The HTTP headers that need to be passed with the API mentioned above are:
- x-api-key: It is the ' API key ' on the Haventec Console application details page as shown in the image below.
- x-requestor-token: It is the ' access_token ' in the response received after running the curl command in step 3. The user sends a HTTP request to the IAM to log in and get a JWT in Configure Haventec IAM with the client and users.
- x-application-uuid: It is the ' Application UUID ' on the Haventec Console application details page as shown in the image below.
Authenticate API Error Codes
Error Code |
Message Thrown |
Scenarios |
Recommended Action |
AN-VALI-1003 |
Invalid username format |
Passed the wrong Haventec username format. |
Pass the correct Haventec username as mentioned above. |
AN-APLI-1005 |
Invalid ApplicationUuid |
Passed the wrong application-uuid in the request. |
Pass the correct application-uuid as mentioned above. |
AN-VALI-1003
|
Invalid username format |
Passed the wrong requestorUsername in the request body. |
Pass the correct requestorUsername as mentioned above. |
AN-JWTT-1001
|
Invalid JWT Token |
Passed the wrong requestor-token in the request. |
Pass the correct requestor-token as mentioned above. |
AN-VALI-1001 |
Application UUID was not found |
Passed application-uuid does not exist in Authenticate. |
Pass the correct application-uuid as mentioned above. |
AN-OIAM-1001 |
The application does not have IAM properties enabled |
The application is not configured with proper IAM properties. |
Please follow this link Configure Haventec Connect Application to enable Introspect IAM API to configure IAM Intropsect properties correctly. |
AN-OIAM-1002 |
IAM client_id not configured |
The client_id is not configured properly. |
Please follow this link Configure Haventec Connect Application to enable Introspect IAM API to configure client_id correctly. |
AN-OIAM-1003 |
IAM client_secret not configured |
The client_secret is not configured properly. |
Please follow this link Configure Haventec Connect Application to enable Introspect IAM API to configure client_secret correctly. |
AN-OIAM-1004 |
IAM Introspect url not configured |
The Introspect url is not configured properly. |
Please follow this link Configure Haventec Connect Application to enable Introspect IAM API to configure IAM Introspect url correctly. |
AN-OIAM-1006 |
IAM role path not configured |
The Role JSON path is not configured properly. |
Please follow this link Configure Haventec Connect Application to enable Introspect IAM API to configure Role JSON path correctly. |
AN-OIAM-1005 |
IAM role not configured |
The Allowed role is not configured properly. |
Please follow this link Configure Haventec Connect Application to enable Introspect IAM API to configure the Allowed role correctly. |
AN-OIAM-1007 |
Role path format |
The Introspect url is not configured properly. |
Please follow this link Configure Haventec Connect Application to enable Introspect IAM API to configure IAM Introspect url correctly. |
AN-OIAM-1008 |
IAM user denied access |
The externally authenticated user e.g. CRM user is not active. |
Please follow this link Configure Haventec IAM with the client and users step 3. The user sends a HTTP request to the IAM to log in and get a JWT to check if the access_token generated is active or not. If not. Generate a new access_token and use it as a requestor-token in the request. |
AN-HENG-1002 |
User not found |
The Haventec username is wrong and there is no user in Authenticate with the given username. |
Pass the right Haventec username as explained in the above steps. |
AN-USER-1017 |
Request to get user details is denied |
The Haventec username passed does not belong to the given application. |
Pass the right Haventec username as explained in the above steps. |
Comments
0 comments
Please sign in to leave a comment.