f5-common-python icon indicating copy to clipboard operation
f5-common-python copied to clipboard

Populate HTTP User Agent String when communicating with BIG-IP

Open mattgreene opened this issue 9 years ago • 4 comments

In order to facilitate measurement of who/what is managing BIG-IP, the f5-sdk must add an HTTP User Agent String when accessing the REST API. A new API must also be added to allow an SDK user (e.g. f5-openstack-agent) to overwrite the default f5-sdk user agent string.

mattgreene avatar Sep 09 '16 20:09 mattgreene

I believe a portion of this feature will require changing the underlining https://github.com/F5Networks/f5-icontrol-rest-python code

caphrim007 avatar Sep 22 '16 01:09 caphrim007

@mattgreene @caphrim007 Here are my thoughts on this.

https://tools.ietf.org/html/rfc7231#section-5.5.3 https://en.wikipedia.org/wiki/User_agent

  1. We should make a change in the https://github.com/F5Networks/f5-icontrol-rest-python code that allows the setting of the user agent
  2. The SDK should append its user agent info to a string that identifies itself as the f5-sdk, for example f5-sdk/1.1.4 (python2.7 platform info)
  3. The SDK should allow its users to add to their own user agent string. For example the openstack agent may append f5-openstack-agent/9.0.1 (Neutron v9.0.1 Mitaka)

So in the end the user agent header would look something like this:

User-Agent: python-requests/2.9.1 f5-sdk/1.4.1 (python2.7 Ubuntu14) f5-openstack-agent/9.0.1 (Neutron v9.0.1 Mitaka)

swormke avatar Nov 18 '16 05:11 swormke

Having an option to update the virtual server description as well would make it crystal clear in iHealth that the resource was built by LBaaS. By default I don't think that the User-Agent is captured in the log on BIG-IP.

chen23 avatar Nov 18 '16 14:11 chen23

@caphrim007 I believe we addressed this no ?

wojtek0806 avatar Aug 08 '18 11:08 wojtek0806