Skip to content

GMN: Add tag in User Agent for when accessing proxied objects in response to CN or other system requests #88

@rogerdahl

Description

@rogerdahl

Conditionally add a "user" or "system" tag with originating User Agent to the User Agent that GMN uses when reading object bytes from a 3rd party service.

When GMN is in proxy mode, it reads object bytes from a 3rd party service when handling MN API requests. It's currently not possible for the 3rd party service to determine if the request on the DataONE side was user or system (CN or MN) initiated, and so the service cannot filter system requests, such as checksum requests, from actual user downloads in order to create data usage metrics.

After this change, the 3rd party service data usage metrics can separate object downloads initiated by users from object reads caused by automated processing on the DataONE side.

Example of User Agent as seen on the 3rd party service for a download as public initiated from a browser after this change:

DataONE-Python/3.5.2 +http://dataone.org/ (user: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36)

The addition is the (user/system: originating-user-agent) section after the default User Agent.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions