proxy-config.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. +========================================================================+
  4. | IBM Confidential
  5. | OCO Source Materials
  6. | IBM Cognos Products: BUX
  7. | (C) Copyright IBM Corp. 2010, 2011
  8. |
  9. | US Government Users Restricted Rights - Use, duplication or
  10. | disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  11. +========================================================================+
  12. -->
  13. <!-- ************************************************************************************
  14. Listed below are example rules that can be used to control the behavior of the AjaxProxy
  15. If the context-path of the Web Application is /myapp, then the <proxy:mappings> would be
  16. interpreted as the following:
  17. Example #1:
  18. <proxy:mapping contextpath="/http/*" />
  19. The following request would map through the proxy:
  20. http://localhost/myapp/proxy/http/www.cnn.com
  21. would be the same as issuing a page request to http://www.cnn.com
  22. NOTE: The Ajax Proxy does not attempt to do URL rewriting on HTML pages. In other words,
  23. the URI's contained in the page returned by http://www.cnn.com will not be modified
  24. to map through the proxy.
  25. Example #2:
  26. <proxy:mapping contextpath="/rss/money_latest.rss" url="http://rss.cnn.com" />
  27. The following request would map through the proxy:
  28. http://localhost/myapp/proxy/rss/money_latest.rss
  29. would be the same as issuing a page request to http://rss.cnns.com/rss/money_latest.rss
  30. Security Note:
  31. The Ajax proxy should be configured to map to the specific service that you are trying to connect
  32. too. In the example configuration below, the <proxy:mapping contextpath> is shown to map to
  33. http/* and https/* Those mapping are intended for development and are generic enough to get you
  34. up and running quickly, but they configure the proxy as a relay service to any http or https
  35. endpoint - which is bad and should be removed in production.
  36. The mappings should only contain the specific service you intended to connect with. As an example,
  37. the <proxy:mapping contextpath> for the url http://rss.news.yahoo.com will only map context paths
  38. of /rss/tech. The proxy will only allow connections to the intended service endpoint.
  39. ************************************************************************************************ -->
  40. <proxy:proxy-rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:proxy="http://www.ibm.com/xmlns/prod/sw/ajax/proxy-config/1.0">
  41. <proxy:mapping contextpath="/http/*"/>
  42. <proxy:mapping contextpath="/https/*"/>
  43. <!-- *******************************************************************************************
  44. If required, the Ajax proxy can be configured to connect to a pass-thru proxy.
  45. A pass-thru proxy is often used as a border firewall before an application can
  46. access the network. The Ajax proxy supports Basic authentication.
  47. passthru_host (REQUIRED) : The hostname or IP address
  48. of the pass-thru proxy
  49. passthru_port (OPTIONAL Default is port 80) : The port of the pass-thru proxy
  50. passthru_realm (OPTIONAL Default is any realm) : The security realm the Ajax
  51. proxy will authenticate against.
  52. passthru_username (OPTIONAL) : The username the Ajax proxy will use to authenticate
  53. passthru_password (OPTIONAL) : The password the Ajax proxy will use to authenticate
  54. ************************************************************************************************ -->
  55. <!--
  56. <proxy:meta-data>
  57. <proxy:name>passthru_host</proxy:name>
  58. <proxy:value>127.0.0.1</proxy:value>
  59. </proxy:meta-data>
  60. <proxy:meta-data>
  61. <proxy:name>passthru_port</proxy:name>
  62. <proxy:value>81</proxy:value>
  63. </proxy:meta-data>
  64. <proxy:meta-data>
  65. <proxy:name>passthru_realm</proxy:name>
  66. <proxy:value>MyRealm</proxy:value>
  67. </proxy:meta-data>
  68. <proxy:meta-data>
  69. <proxy:name>passthru_username</proxy:name>
  70. <proxy:value>username</proxy:value>
  71. </proxy:meta-data>
  72. <proxy:meta-data>
  73. <proxy:name>passthru_password</proxy:name>
  74. <proxy:value>password</proxy:value>
  75. </proxy:meta-data>
  76. -->
  77. </proxy:proxy-rules>