Skip to content

Using IPv6-only address as advanced auth API end-point fails #33

Description

@tvogel

Following up from #27: Since the fix supporting https for the advanced auth api end-point, IPv6 addresses cannot be resolved anymore.

I made a reproducing setup here:

https://github.com/tvogel/orthanc-setup-samples/tree/tv/auth-api-ipv6-problem

It enables IPv6 in docker-compose, writes the IPv6 address of the auth-service into a separate entry in /etc/hosts as auth-service-v6 and tries to use that address which unfortunately fails.

Instructions:

  1. Clone the repo (or fetch it into yours) and check out that branch
  2. Go to docker/access-control and run docker compose up --build
  3. Run curl -v -H "api-key: key-1" 'http://localhost/orthanc-clients/dicom-web/studies?PatientID=*'
  4. Observe that you get HTTP/1.1 403 Forbidden
  5. In the compose output, you'll find:
    HTTP-0 OrthancException.cpp:62] Error in the network protocol: libCURL error: Could not resolve hostname while accessing http://auth-service-v6:8000/auth/validate
    

For contrast:

  1. In docker/access-control/orthanc/auth.jsonc revert back to using auth-service instead of auth-service-v6.
  2. Stop docker compose and run docker compose up --build again.
  3. Try again
  4. See that curl now succeeds to retrieve results.

Please note that I had to make a small unrelated fix in 6a1344 which might be of use regardless of this issue.

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