Skip to content

Allow token authentication for insecure hosted repositories #3286

@dtretyakov

Description

@dtretyakov

Hi, in the following PR #3007 was introduced support of hosted repositories, but as a result, dart client throws an exception when you're trying to add a token for repository with HTTP protocol:

url must be https://, insecure repositories cannot use authentication.

Reference:

if (!hostedUrl.isScheme('HTTPS')) {

We're working on support of Dart packages hosting as part of our product and would like to run integration tests by using the current dart client against local service (HTTP) in CI environment. Currently, it's impossible to opt-out from that security verification check.

What we could do with that:

  • Introduce the ability to disable security check as it is done in other tools, e.g. skopeo --tls-verify=false.
  • Fork the client and make our own builds without HTTPS enforcement.

The first option is preferred for us, but what is the Dart team opinion about that?

Metadata

Metadata

Assignees

No one assigned

    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