CoolDuke
(CoolDuke)
November 19, 2019, 7:54am
1
hi,
I tried to get trusted_networks to work, in order to avoid the 2-auth-login, which I set up:
So “multi-factor-auth” is ON.
my config (btw: I use a “frenck”-like config, with a lot of yaml files, which works perfectly so far); am using hassio on a proxmox VE on a NUC.
homeassistant:
auth_providers:
- type: homeassistant
- type: trusted_networks
trusted_networks:
- !secret trusted_network_1
- !secret trusted_network_2
- !secret trusted_network_3
secrets.yaml
# Auth Provider
trusted_network_1: 192.168.y.0/24
trusted_network_2: 127.0.0.1
trusted_network_3: 10.y.x.0/24
Every time I login from 192.168.y.x (with should be a trusted network), I have to get through the full authentfication
I also so no information in the logs whatsoever.
Any ideas, how to solve it?
best!
CoolDuke
(CoolDuke)
November 20, 2019, 12:32pm
3
thx… so the concept is dead?
best
GaryK
(Gary Kelley)
November 20, 2019, 12:42pm
4
My trusted_networks
under auth_providers
are still working in 101.3. Could it be a spacing issue with your type declarations?
CoolDuke
(CoolDuke)
November 20, 2019, 1:27pm
5
ah … good to hear.
@GaryK : maybe you could post your configuration for comparison…
GaryK
(Gary Kelley)
November 20, 2019, 1:39pm
6
# authentication services
auth_providers:
- type: homeassistant
- type: trusted_networks
trusted_networks:
- 192.168.x.0/24
- 127.0.0.1
CoolDuke
(CoolDuke)
November 20, 2019, 1:41pm
7
thanks … but I don’t see any difference, except the !secret. and I tried it without the “secrets” without any luck as well… strange
GaryK
(Gary Kelley)
November 20, 2019, 1:43pm
8
My spacing is different. I shift two columns for each entry. Yours appears to be three.
CoolDuke
(CoolDuke)
November 20, 2019, 1:48pm
9
“auth_providers” to “- type” - there you have only 1 space: your “-” is below “u” and I have two spaces - mine is under “t”.
but in general there should be two spaces right?
GaryK
(Gary Kelley)
November 20, 2019, 1:51pm
10
Yes, two spaces is the syntax. Other than that, you might try listing your networks directly instead of using secrets. Works for me.
CoolDuke
(CoolDuke)
November 20, 2019, 2:12pm
11
without !secrets, it doesn’t work either I really have no clue whatsoever.
GaryK
(Gary Kelley)
November 20, 2019, 2:17pm
12
I assume you’ve restarted HA between changes?
GaryK
(Gary Kelley)
November 20, 2019, 2:21pm
14
Well, it does work. I don’t know why it’s not working for you.
tmjpugh
(Tmjpugh)
November 20, 2019, 2:30pm
15
Clear browser cache or try from different device?
Use different browser to test
Vennerberg
(Patrik Vennerberg)
November 20, 2019, 2:30pm
16
Yes, its the spacing.
As GaryK said, you have too many spaces.
CoolDuke
(CoolDuke)
November 20, 2019, 2:36pm
17
@Vennerberg : where exactly do I have too many spaces? please clarity… thanks!
I have 2 spaces each - visual code studio does not complain.
Vennerberg
(Patrik Vennerberg)
November 21, 2019, 7:45am
18
What I can see from your pasted config your “-” is not in the same locations as @GaryK . You say its the same but from the looks of it its not.
CoolDuke
(CoolDuke)
November 21, 2019, 8:30am
19
@Vennerberg : I see that it is NOT the same, but mine should be correct. I have 2 spaces in the lines “- type”, so my “-” is underneath the “t” (from auth_providers), whereas the one from gary only has one space (underneath "u).
because 2 spaces are the syntax, I suppose mine is correct. this is why I am wondering, mine is NOT working and Garys is working (but it shouldn’t).
I am really out of ideas how to get this working.
One thing is that if you have the homeassistant auth provider first it will use that as a preference so move that to the bottom. I use trusted networks as well. Can’t remember the last time I had to enter details.