subspacecommunity / subspace

A fork of the simple WireGuard VPN server GUI community maintained
MIT License
1.8k stars 131 forks source link

Admin Login not possible anymore #114

Open bert2002 opened 4 years ago

bert2002 commented 4 years ago

I setup subspace yesterday and everything was working fine and I could login as admin user. I tried to enable SAML yesterday, but run into some problems. Login with admin was still possible. Today I try to login and it does not work anymore. I did a password reset and it still does not allow me to login as admin. After removing the SAML configuration it's still not possible.

Is there a way to get more logs?

I am creating the container like this:

docker create \
    --name subspace \
    --restart always \
    --network host \
    --cap-add NET_ADMIN \
    --volume /data:/data \
    --env SUBSPACE_HTTP_HOST="subspace.example.org" \
    --env SUBSPACE_NAMESERVER="1.1.1.1" \
    --env SUBSPACE_LISTENPORT="51820" \
    --env SUBSPACE_IPV6_NAT_ENABLED=1 \
    --env SUBSPACE_LETSENCRYPT=0 \
    --env SUBSPACE_HTTP_INSECURE=1 \
    --env SUBSPACE_HTTP_ADDR=":80" \
    subspacecommunity/subspace:latest

and the config.json looks like this:

{
    "info": {
        "email": "admin@example.org",
        "password": "SECRET",
        "secret": "",
        "configure": true,
        "domain": "",
        "hash_key": "SECRET",
        "block_key": "SECRET",
        "saml": {},
        "mail": {
            "from": "",
            "server": "",
            "port": 0,
            "username": "",
            "password": ""
        }
    },
    "profiles": [
        {
            "id": "ID",
            "user": "",
            "name": "NAME",
            "platform": "android",
            "number": 2,
            "created": "2020-07-08T09:05:46.03904014Z"
        },
        {
            "id": "ID",
            "user": "",
            "name": "NAME",
            "platform": "linux",
            "number": 3,
            "created": "2020-07-08T09:57:27.545368474Z"
        }
    ],
    "users": null,
    "modified": "0001-01-01T00:00:00Z"
}

Happy to provide more logs. VPN is still working without any problem.

Thanks, bert

bert2002 commented 4 years ago

I think this happened because I recreated the container with a different HTTP_HOST address.

syphernl commented 4 years ago

Out-of-the-box I cannot cannot login either. Fresh install, no configs, going to the HTTP endpoint, creating an admin user and... cannot login with the user I just created.

Seems like you specifically need to login to the provided SUBSPACE_HTTP_HOST rather than IP-based.