Skip to content

Control authentication scope for the curl::http_get_and_write_resource() function#1392

Closed
ndp-opendap wants to merge 4 commits into
masterfrom
ndp/hhtp_get_and_write_auth_patch
Closed

Control authentication scope for the curl::http_get_and_write_resource() function#1392
ndp-opendap wants to merge 4 commits into
masterfrom
ndp/hhtp_get_and_write_auth_patch

Conversation

@ndp-opendap

@ndp-opendap ndp-opendap commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

Reference ticket: HYRAX-####

This PR amends the function curl::http_get_and_write_resource() so that it can be asked to conditionally add authentication information to the outgoing request headers. Currently it always adds these headers, even when that's not useful.

curl::http_get_and_write_resource() is used in exactly one place, RemoteResource::get_url(). Which, in turn, is only ever called by RemoteResource::retrieve_resource, which is widely used.

Here's is the how the change affects the dependent code:

  • CmrContainer.cc - Uses EDL to authenticate with CMR
  • GatewayContainer.cc - No Auth
  • HttpdCatalogContainer.cc - No Auth
  • JsonUtils.cc - Exclusively used by the CmrApi to interrogate CMR. Uses EDL to authenticate with CMR
  • S3Container.cc - Authenticates (I think with S3 signing headers)

This PR addresses the authentication needs and stops authentication headers from being broadcast by Gateway and HttpdCatalog.

Tasks

  • Ticket exists and is linked in title
  • Tests added/updated
  • Dead code removed
  • No TODOs added

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@ndp-opendap

Copy link
Copy Markdown
Contributor Author

also migrated the SONAR API to sonar.token from sonar.login and put the token value in TravisCI settings and not in the .travis.yml file. One token for all the targets, on token to rule them all,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop indiscriminately broadcasting EDL stuff with every outgoing request.

1 participant