Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"AuthenticationFailed" Error in Dashboard when connecting to /api/management/ #32

Closed
smartin314 opened this issue Oct 22, 2024 · 1 comment

Comments

@smartin314
Copy link

We have a MDS EDC Connector running on our Server gaiax.example.de

Our UI-Dashboard is available at https://gaiax.example.de/dashboard and when it requests data from the Management-API (https://gaiax.example.de/api/management/) we always get the following Error-Message:
[{"message":"Request could not be authenticated","type":"AuthenticationFailed","path":null,"invalidValue":null}]

This happens for every request to the Management-API, for example https://gaiax.example.de/api/management/edc-ui-config or https://gaiax.example.de/api/management/last-commit-info

We set up our Connector using this template: https://github.com/Mobility-Data-Space/mobility-data-space/blob/main/templates/connector_with_traefik.yaml . Because Traefik couldn't get a certificate to authenticate, we created one by ourselves and added it to traefik:

traefik:
    image: "traefik:v2.11"
    container_name: "traefik"
    command:
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--providers.file.directory=/configuration/"
      - "--providers.file.watch=true"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "./configuration/:/configuration/"

When we try to access the Management-API using curl with the API-KEY we get the same Error-Message.

@smartin314
Copy link
Author

We found our problem, it was the API-Key.
The problem is that our API-Key started with & and we therefore put quotation marks around the Key, so it looked like this:
EDC_API_AUTH_KEY: "&123456"
Without the quoatation marks we got an error from Docker. With a new API-Key only consisting of numbers and letters without any quotation marks everything works perfectly. If we add quotation marks to the API-Key in the docker-compose.yaml it doesn't work again.

A hint in the default docker-compose.yaml that quotation marks shouldn't be used and therefore the API-Key can't start with a special character may be useful that other users don't encounter the same problem :)

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

No branches or pull requests

1 participant