MetaDefender Core, ICAP User Management

MetaDefender CORE and ICAP have built-in capabilities to manage users directly within each product instance. For example, administrators can create a user by sending an API request directly to a MetaDefender CORE instance.

This is an MetaDefender Core API to get all users:

Javascript
Copy

However, this requires either local access to the instance or a network connection to it. If the administrator is on a different network, direct access may not be possible.

To overcome this limitation, administrators can enroll the MetaDefender CORE instance into My OPSWAT Central Management and perform the API through My OPSWAT Central Management as below:

Javascript
Copy

Here are steps

Step 1: Enroll the MetaDefender CORE instance into My OPSWAT Central Management and obtain the Deployment Id.

Step 2: Register an OAuth Application and retrieve the Client Key, Client Secret.

Access the My OPSWAT Central Management. On the right menu, select OAuth Application

Register an application and retrieve the Client_key and Client_ Secret.

Step 3: Retrieve the Access Token from OAuth 2 Authentication Flow

Use the Client Key and Client Secret from the registered application and call the My OPSWAT Central Management OAuth API to obtain an access token. This token will be used for authenticating subsequent API requests.

JSON
Copy

Step 4: Retrieve the connection ID from MetaDefender Core.

Establish a Direct Instance Management connection from My OPSWAT Central Management to the MetaDefender CORE instance.

Request sample:

JSON
Copy

Response example:

JSON
Copy

After creating the connection ID, the status will change from REQUESTING to CONNECTED. The API will work only if the connection status is CONNECTED. Use the below API to check if the connection is successfully established.

Request example

JSON
Copy

Response example

JSON
Copy

Step 5: Re-route API request from MetaDefender Core to My OPSWAT Central Management API:

  1. URL: "https://product.my.us.opswat.com/fusion/console/services/connection/{connectionID}"

    1. connnectionID: obtain from step 4
  2. Method: POST

  3. Add the following headers to reflect the MetaDefender Core APIs

    1. ACCESS_TOKEN: obtain from step 3
    2. X-App-Method: obtain from MetaDefender Core API documentation
    3. X-App-URL: obtain from MetaDefender Core API documentation
    4. data: obtain from MetaDefender Core API documentation
Javascript
Copy

Example: How to re-route ' List all users ' from MetaDefender Core to My OPSWAT Central Management

  1. Get info from MDCore API - userlist

In this api, need to use method 'GET' and URL '/admin/user'

  1. Convert MD Core API to Central Management API as below

API Request

Javascript
Copy

API Response

JSON
Copy

Appendix

List of APIs supported by Meta Defender CORE

APIsDocumentUrlMethodFrom Version
Create userhttps://www.opswat.com/docs/mdcore/metadefender-core#usercreate/admin/userPOST5.15.0
List all usershttps://www.opswat.com/docs/mdcore/metadefender-core#userlist/admin/userGET5.15.0
Delete a userhttps://www.opswat.com/docs/mdcore/metadefender-core#userdelete/admin/user/{user_id}DELETE5.15.0
Change user's API keyhttps://www.opswat.com/docs/mdcore/metadefender-core#changeuserapikey/admin/user/(\d+)/apikeyPUT5.15.0
Change Password for local userhttps://www.opswat.com/docs/mdcore/metadefender-core#userchangepass/user/changepasswordPOST5.15.0
List all roles/admin/roleGET5.15.0
List all user directories/admin/userdirectoryGET5.15.0
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard