this post was submitted on 20 Aug 2024
64 points (97.1% liked)

Selfhosted

39435 readers
3 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Basically every local service is accessed via a web interface, and every interface wants a username and password. Assuming none of these services are exposed to the internet, how much effort do you put into security here?
Personally, I didn't really think about it when I started. I make a half-assed effort at security where I don't use "admin" or anything obvious as the username, and I use a decent-but-not-industrial password - but I started reusing the u/p as the number of services I'm running grew. I have my browsers remember the u/ps.
Should one go farther than this? And if so, what's the threat model? Is there an easier way?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 95 points 3 months ago (2 children)

random credentials + password manager

[–] [email protected] 10 points 3 months ago
[–] [email protected] 10 points 3 months ago

Exactly, the same way I handle all my credentials.

[–] [email protected] 60 points 3 months ago* (last edited 3 months ago) (29 children)

Public-facing: Password generator, stored in a password manager.

Internal LAN: Everything gets the same re-used, low-effort password.

Nobody is going to hack my CUPS server.

[–] [email protected] 5 points 3 months ago

Yes, basically on internal LAN I put admin admin to everything.

load more comments (28 replies)
[–] [email protected] 26 points 3 months ago (3 children)
[–] [email protected] 18 points 3 months ago

All I see is ******

[–] [email protected] 11 points 3 months ago (1 children)

Wait, how do you know my password?

[–] [email protected] 5 points 3 months ago

I put on my robe and wizard hat

[–] [email protected] 9 points 3 months ago

Correct horse battery staple

Need to pad those passwords.

[–] [email protected] 24 points 3 months ago

Everything gets a different, long random password. It's not a hassle because my password manager handles everything. It's bitwarden for whatever I may need to access elsewhere, few admin logins there, keepass everything else.

[–] [email protected] 22 points 3 months ago (1 children)
[–] [email protected] 8 points 3 months ago

Not today, CIA!

[–] [email protected] 16 points 3 months ago* (last edited 3 months ago)

All my local services follow the same rules as any other service. I have no idea what the passwords are, they are all random and long as fuck in my password manager. 2FA with a hardware key where allowed, TOTP if not.

What possible reason would anyone have to "relax" or security on local services? That would mean having 2 streamlines which only adds friction.

I strongly suggest you move all your credentials out of your browsers and into a password manager.

[–] [email protected] 11 points 3 months ago* (last edited 3 months ago)

Apps: SSO via Authentik where I can, unique user/pass combo via Bitwarden where I can't (or, more realistically, don't want to).

General infra: Unique RSA keys, sometimes Ed25519

Core infra: Yubikey

This is overkill for most, but I'm a systems engineer with a homelab, so it works well for me.

If you're wanting to practice good security hygiene, the bare minimum would be using unique cred pairs (or at least unique passwords) per app/service, auto-filled via a proper password manager with a browser extension (like KeePassXC or Bitwarden).

Edit: On the network side, if your goal is to just do some basic internal self-hosting, there's nothing wrong with keeping your topo mostly flat (with the exception of a separate VLAN for IoT, if applicable). Outside of that, making good use of firewalls will help you keep things pretty tight. The networking rabbit hole is a deep one, not always worth the dive unless you're truly wanting to learn for the sake of a cert/job/etc.

[–] [email protected] 9 points 3 months ago

Unify them.

Now I have a full FOSS Active Directory for SSO logging into computers and services that supports 2FA where desired.

[–] [email protected] 7 points 3 months ago* (last edited 3 months ago)

Keycloak to provide OIDC, although in hindsight I should have gone with ~~Authelia~~ Authentik

[–] [email protected] 6 points 3 months ago

Same way I do at work. Different accounts and passwords for each service internally. Any service exposed to the net (game and email servers mostly) is on a segregated network and each machine has unique credentials to help prevent lateral movement. Self hosted Bitwarden tracks it all.

I do it for the same reason I require outbound firewall rules for almost everything on my home network - I’m a masochist.

[–] cheddar 6 points 3 months ago* (last edited 3 months ago)

Since I'm already using Bitwarden, generating and storing passwords is easy. I use my name as the username, though that user doesn't have admin privileges.

[–] [email protected] 6 points 3 months ago (5 children)

I’ve been looking into some kind of simple SSO to handle this. I’m tired of entering passwords (even if it’s all done by the password manager) a single authentication point with a single user would be great.

Keycloak and friend are way too complex. Ideally I would like to have something in my nginx reverse proxies that would handle authentication at that level and tell the final app what user is logged on in some safe way.

[–] [email protected] 2 points 3 months ago (1 children)

Never tried Authelia or Authentik but I've heard good things about them. I'm sure one of them will integrate with a reverse proxy.

[–] [email protected] 3 points 3 months ago (4 children)

Those solutions are still way too complex and corporate to my likes. :(

load more comments (4 replies)
[–] [email protected] 2 points 3 months ago

any oauth (I use kanidm) and oauth2-proxy solves that and now you can easily use passkeys to log into your intranet resources.

load more comments (3 replies)
[–] [email protected] 5 points 3 months ago* (last edited 3 months ago)

Personally keep it very simple using same username and password for my services. But I also don't host anything of value, just messing around with a few different projects I come across. Yes it's not good practice, but nothing is exposed works well for me.

[–] [email protected] 5 points 3 months ago (3 children)

Like several people here, I've also been interested in setting up an SSO solution for my home network, but I'm struggling to understand how it would actually work.

Lets say I set up an LDAP server. I log into my PC, and now my PC "knows" my identity from the LDAP server. Then I navigate to the web UI for one of my network switches. How does SSO work in this case? The way I see it, there are two possible solutions.

  • The switch has some built-in authentication mechanism that can authenticate with the LDAP server or something like Keycloak. I don't see how this would work as it relies upon every single device on the network supporting a particular authentication mechanism.
  • I log into and authenticate with an HTTP forwarding server that then supplies the username/password to the switch. This seems clunky but could be reasonably secure as long as the username/password is sufficiently complex.

I generally understand how SSO works within a curated ecosystem like a Windows-based corporate network that uses primarily Microsoft software for everything. I have various Linux systems, Windows, a bunch of random software that needs authentication, and probably 10 different brands of networking equipment. What's the solution here?

load more comments (3 replies)
[–] [email protected] 3 points 3 months ago (1 children)

My goal is to have all my services being a reverse proxy, even on LAN, and use passwordless authentication via passkeys/webauthn. I haven’t yet tried it but have been eyeing this: https://github.com/stonith404/pocket-id?ref=selfh.st

load more comments (1 replies)
[–] [email protected] 3 points 3 months ago

I have a local instance of Vaultwarden that I use to generate and store the credentials for my local services, and I use normal cloud-hosted Bitwarden for all my other passwords.

[–] [email protected] 2 points 3 months ago* (last edited 3 months ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
CGNAT Carrier-Grade NAT
DHCP Dynamic Host Configuration Protocol, automates assignment of IPs when connecting to a network
DNS Domain Name Service/System
HTTP Hypertext Transfer Protocol, the Web
IP Internet Protocol
IoT Internet of Things for device controllers
NAT Network Address Translation
SSH Secure Shell for remote terminal access
SSO Single Sign-On
nginx Popular HTTP server

[Thread #927 for this sub, first seen 20th Aug 2024, 14:45] [FAQ] [Full list] [Contact] [Source code]

[–] [email protected] 2 points 3 months ago

Currently I have terrible local password rules.

Once I get my Vaultwarden reinstalled, everything will use properly managed passwords, with 2FA for things like servers/services/admin accounts (routers, DNS, etc).

[–] [email protected] 2 points 3 months ago

Don't remember the tool, maybe someone here does, but there's some web service out there that boasts a "no storage" approach. You provide some URI and some other value (maybe username) and it makes a password for you, but it's always the same for a given combination. Basically it's a purely functional generator.

Downside would be forgetting a minor detail (Did it end with a slash or not? What was the username?) or the site going down. You can achieve the same thing yourself with a hash calculator but those passwords are a bitch to type in.

tl;dr just use KeePass

load more comments
view more: next ›