Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rogerdahl opened this issue Jan 26, 2024 · 0 comments
Assignees

Comments

@rogerdahl
Copy link
Collaborator

rogerdahl commented Jan 26, 2024

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.

@rogerdahl rogerdahl self-assigned this Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant