Skip to content

Fix download authentication feeds #783

@davidgamez

Description

@davidgamez

Description

The implementation of the authenticated feeds seems to be broken as the authentication types 1 and 2 are flipped. This might be the case for why some authenticated feeds are not downloaded, example. In an interesting case, the feed mdb-1846 is present in the UI as it supports the api_key parameter as a header and also a URL parameter.

Proposed solution

  1. As documented here make sure the implementation aligns with the proper authentication type.
    Authentication types:
    0 or (empty) - No authentication required.
    1 - The authentication requires an API key, which should be passed as value of the parameter api_key_parameter_name in the URL. Please visit URL in authentication_info_url for more information.
    2 - The authentication requires an HTTP header, which should be passed as the value of the header api_key_parameter_name in the HTTP request.

  2. Set a default user-agent similar to link. This will revert feat: Programmatic download of valid ZIP files returns HTML responses for certain producer URLs #524 changes.

  3. To address the fix introduced in feat: Programmatic download of valid ZIP files returns HTML responses for certain producer URLs #524, add the feeds to header authentication and set the proper values to the API_SOURCE_SECRETS list.

Number 2 and 3 TBD pending team review

TBD: Allow multiple headers as part of the authentication 2.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions