mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 09:44:08 -05:00
got frigate working, need to figure out roles but thats good for now
This commit is contained in:
parent
df055ff43b
commit
b5f3463ee2
2 changed files with 14 additions and 8 deletions
|
|
@ -122,10 +122,12 @@
|
||||||
cookie insecure off
|
cookie insecure off
|
||||||
}
|
}
|
||||||
|
|
||||||
authorization policy mypolicy {
|
authorization policy frigate {
|
||||||
set auth url /caddy-security/oauth2/generic
|
set auth url /caddy-security/oauth2/generic
|
||||||
allow roles frigate
|
allow roles frigate
|
||||||
inject headers with claims
|
inject headers with claims
|
||||||
|
inject header Remote-User from name
|
||||||
|
inject header Remote-Role from groups
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -10,19 +10,23 @@ in
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
sopsFolder = builtins.toString inputs.nix-secrets + "/sops";
|
sopsFolder = builtins.toString inputs.nix-secrets + "/sops";
|
||||||
frigateConfig = pkgs.writeText "config.yaml" (
|
frigateConfig = pkgs.writeText "frigate-config.yaml" (
|
||||||
lib.generators.toYAML { } {
|
lib.generators.toYAML { } {
|
||||||
auth.reset_admin_password = true; # roll the admin password every restart, depend on user accounts for long-lived access
|
auth.enabled = false; # Proxy auth
|
||||||
tls.enabled = false; # off because we're doing ssl through the proxy
|
tls.enabled = false; # off because we're doing ssl through the proxy
|
||||||
|
proxy = {
|
||||||
|
logout_url = "https://auth.wanderingcrow.net";
|
||||||
|
default_role = "viewer";
|
||||||
|
header_map = {
|
||||||
|
user = "Remote-User";
|
||||||
|
role = "Remote-Role";
|
||||||
|
};
|
||||||
|
};
|
||||||
mqtt = {
|
mqtt = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
host = "host.containers.internal";
|
host = "host.containers.internal";
|
||||||
port = 1883;
|
port = 1883;
|
||||||
};
|
};
|
||||||
notifications = {
|
|
||||||
enabled = true;
|
|
||||||
email = "frigate@wanderingcrow.net";
|
|
||||||
};
|
|
||||||
ui = {
|
ui = {
|
||||||
timezone = "America/New_York";
|
timezone = "America/New_York";
|
||||||
time_format = "24hour";
|
time_format = "24hour";
|
||||||
|
|
@ -255,7 +259,7 @@ in
|
||||||
authenticate with myportal
|
authenticate with myportal
|
||||||
}
|
}
|
||||||
route /* {
|
route /* {
|
||||||
authorize with mypolicy
|
authorize with frigate
|
||||||
reverse_proxy http://10.88.0.10:8971
|
reverse_proxy http://10.88.0.10:8971
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue