Citrix ADM as an API proxy server 编辑

In addition to being able to receive NITRO REST API requests for its own management and analytics functionality, Citrix Application Delivery Management (Citrix ADM) can function as a REST API proxy server for its managed instances. Instead of sending API requests directly to the managed instances, REST API clients can send the API requests to Citrix ADM. Citrix ADM can differentiate between the API requests to which it must respond and the API requests that it must forward unchanged to a managed instance.

As an API proxy server, Citrix ADM provides you with the following benefits:

  • Validation of API requests. Citrix ADM validates all API requests against configured security and role-based access control (RBAC) policies. Citrix ADM is also tenant-aware and ensures that API activity does not cross tenant boundaries.

  • Centralized auditing. Citrix ADM maintains an audit log of all API activity related to its managed instances.

  • Session management. Citrix ADM frees API clients from the task of having to maintain sessions with managed instances.

How Citrix ADM Works as an API Proxy Server

When you want Citrix ADM to forward a request to a managed instance, you configure the API client to include any one of the following HTTP headers in the API request:

Header valuesDescription
_MPS_API_PROXY_MANAGED_INSTANCE_NAMEName of the managed instance.
_MPS_API_PROXY_MANAGED_INSTANCE_IPIP address of the managed instance.
_MPS_API_PROXY_MANAGED_INSTANCE_IDID of the managed instance.
_MPS_API_PROXY_TIMEOUTTimeout value for a NITRO API request. Set the timeout value in seconds. When you set a proxy timeout, ADM waits for the specified duration before it times out the request.
_MPS_API_PROXY_MANAGED_INSTANCE_USERNAMEUser name to access the managed ADC instance.
_MPS_API_PROXY_MANAGED_INSTANCE_PASSWORDPassword to access the managed ADC instance.
_MPS_API_PROXY_MANAGED_INSTANCE_SESSIDSession ID to access the managed instance.

Note

In Settings > Administration > System Configurations > Basic Settings, if you select Prompt Credentials for Instance Login, ensure to configure user name and password of a managed instance. Alternatively, you can also specify the instance session ID.

The presence of any of these HTTP headers helps Citrix ADM identify an API request as one that it must forward to a managed instance. The value of the header helps Citrix ADM identify the managed instance to which it must forward the request.

This flow is depicted in the following figure:

Device-API

As shown in the above figure, when one of these HTTP headers appears in a request, Citrix ADM processes the request as follows:

  1. Without modifying the request, Citrix ADM forwards the request to the instance API proxy engine.

  2. The instance API proxy engine forwards the API request to a validator and logs the details of the API request in the audit log.

  3. The validator ensures that the request does not violate configured security policies, RBAC policies, tenancy boundaries, and so on. It performs extra checks, such as a check to determine whether the managed instance is available.

If the API request is valid and can be forwarded to the managed instance, Citrix ADM identifies a session that is maintained by the instance Session Manager and then sends the request to the managed instance.

Note

Ensure the Prompt Credentials for Instance Login option is disabled. To do so:

  1. Navigate to Settings > Administration.
  2. In System Configurations, select System, Time zone, Allowed URLs and Message of the day.

How to use Citrix ADM as an API proxy server

The following examples show REST API requests that an API client sends to a Citrix ADM server that has an IP address of 192.0.2.5. Citrix ADM is required to forward the requests, unchanged, to a managed instance with IP address 192.0.2.10. All examples use the _MPS_API_PROXY_MANAGED_INSTANCE_IP header.

Before sending Citrix ADM the API requests, the API client must:

  • Log in to Citrix ADM
  • Obtain a session ID
  • Include the session ID in subsequent API requests.

The logon API request is of the following form:

    POST /nitro/v1/config/login
    Content-Type: application/json

    {
        "login": {
            "username":"nsroot",
            "password":"nsroot"
         }
    }
<!--NeedCopy-->

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:45 次

字数:5845

最后编辑:8年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文