netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
11.3k stars 518 forks source link

docker-compose not working #113

Closed yangchuansheng closed 2 years ago

yangchuansheng commented 3 years ago

just clone the repo and run docker-compose but the management container is not in healthy state,here is docker logs:

$ nerdctl ps -a
1d3b485a839e    docker.io/wiretrustee/dashboard:main                  "/usr/bin/supervisor…"    10 minutes ago    Up                           0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp    infrastructure_files_dashboard_1
20c21f7116ab    docker.io/coturn/coturn:latest                        "docker-entrypoint.s…"    10 minutes ago    Up                                                                       infrastructure_files_coturn_1
8e15df6d5a42    docker.io/wiretrustee/management:0.1.0-rc-1           "/go/bin/wiretrustee…"    10 minutes ago    Exited (1) 10 minutes ago    0.0.0.0:33073->33073/tcp                    infrastructure_files_management_1
ceb443b5623e    docker.io/wiretrustee/signal:latest                   "/go/bin/wiretrustee…"    10 minutes ago    Up                           0.0.0.0:10000->10000/tcp                    infrastructure_files_signal_1

$ nerdctl logs infrastructure_files_management_1
time="2021-09-07T05:33:41Z" level=info msg="started server: localhost:33073"
time="2021-09-07T05:33:41Z" level=fatal msg="failed to serve http server: Get \"\": unsupported protocol scheme \"\""

here is config.json

{
    "Stuns": [
        {
            "Proto": "udp",
            "URI": "stun:stun.wiretrustee.com:3468",
            "Username": "",
            "Password": null
        }
    ],
    "TURNConfig": {
        "Turns": [
            {
                "Proto": "udp",
                "URI": "turn:stun.wiretrustee.com:3468",
                "Username": "some_user",
                "Password": "c29tZV9wYXNzd29yZA=="
            }
        ],
        "CredentialsTTL": "1h",
        "Secret": "c29tZV9wYXNzd29yZA==",
        "TimeBasedCredentials": true
    },
    "Signal": {
        "Proto": "http",
        "URI": "signal.wiretrustee.com:10000",
        "Username": "",
        "Password": null
    },
    "Datadir": "",
    "HttpConfig": {
        "LetsEncryptDomain": "",
        "Address": "0.0.0.0:3000",
        "AuthDomain": "",
        "AuthClientId": "",
        "AuthClientSecret": "",
        "AuthCallback": "http://localhost:3000/callback"
    }
}

any suggestions ??

braginini commented 3 years ago

hey @yangchuansheng Indeed, there was a bug in the compose file. We have released a new version and you could try again: https://github.com/wiretrustee/wiretrustee/releases/tag/v0.1.0-rc.2

The important part is that you will need to register Auth0 account for the system to function properly. This is due to the fact that we haven't implemented our own user management system but used Auth0 service instead. We are also preparing the documentation website to describe all the steps.

P.S. If you would like to just try the system without setting up anything, you could go ahead with https://beta.wiretrustee.com/

Let me know if this helps!

yangchuansheng commented 3 years ago

hey @yangchuansheng Indeed, there was a bug in the compose file. We have released a new version and you could try again: v0.1.0-rc.2 (release)

The important part is that you will need to register Auth0 account for the system to function properly. This is due to the fact that we haven't implemented our own user management system but used Auth0 service instead. We are also preparing the documentation website to describe all the steps.

P.S. If you would like to just try the system without setting up anything, you could go ahead with beta.wiretrustee.com

Let me know if this helps!

Still confused, what is the value of AuthKeysLocation and AuthIssuer? I cannot find them in auth0.com

braginini commented 3 years ago

Hi @yangchuansheng There are 2 key cases that we use Auth0 for:

  1. Registration and Login to the Dashboard
  2. Protecting Management API from an unauthorized access.

Dashboard is a single page React web application and it sends JWT with every request to the Management API. Management has to validate those tokens and public key and issuer are used there.

Check the flow description here. https://auth0.com/docs/microsites/protect-api/protect-api#how-it-works

So where to get these properties? Here is the Auth0 Go backend guide https://auth0.com/docs/quickstart/backend/golang

We understand the need for the clear documentation and getting started guide. We are working on that!