subspacecommunity / subspace

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

Feature/totp default admin #111

Closed jack1902 closed 4 years ago

jack1902 commented 4 years ago

to: cc: @subspacecommunity/subspace-maintainers related to: resolves: #104

Background

Wanted to secure the default user of subspace with TOTP. Now it is possible to turn on TOTP for the default user by visiting /settings and scanning the QR code with your phone (or putting the secret key into something else)

Changes

Pics

Initial Setup of MFA

Setup MFA

Reset MFA (will then result in the above page)

reset totp

Sign in page for default admin account if TOTP has been saved

Sign in with MFA Configured

Testing

Ran this locally multiple times on my Droplet in Digital Ocean (i'm using rsync to sync changes to my box and then running docker-compose up --build -d whenever changes are made to go files. For changes related static files i simply specify --debug in the build step for go-bindata and mount web/ into the running container. go-bindata then reads these files live on each request :D)

sonarcloud[bot] commented 4 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

jack1902 commented 4 years ago

That force-push was to cause SonarCloud to re-trigger. i have disabled the warning about i vs em as using em causes the icons from Semantic-UI to disappear and i don't know what the workaround is

maduggan commented 3 years ago

I don't see this option when I go to settings, is there a flag or some way to enable this? I'd love to use it on my admin account.