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

Aperta
#88 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@rogerdahl ci sta già lavorando.

Dal 26/1/2024.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement

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.

Lingua principale
Python
Stelle
18
Fork
10
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DataONEorg/d1_python

Tutte le issue di DataONEorg/d1_python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.