Configure strfry whitelist

Allow akkounts pubkey to publish to our own relay
This commit is contained in:
Râu Cao 2024-06-20 15:38:27 +02:00
parent 7e664723a1
commit 80eddfbf56
Signed by: raucao
GPG Key ID: 37036C356E56CC51
2 changed files with 14 additions and 2 deletions

View File

@ -107,6 +107,9 @@
"domain": "nostr.kosmos.org",
"real_ip_header": "x-real-ip",
"policy_path": "/opt/strfry-policy.ts",
"whitelist_pubkeys": [
"b3e1b7c1660b7db0ecb93ec55c09e67961171a5c4e9e2602f1b47477ea61c50a"
],
"info": {
"name": "Kosmos Relay",
"description": "Members-only nostr relay for kosmos.org users",

View File

@ -15,7 +15,8 @@ env = {
ldap_url: 'ldap://ldap.kosmos.local:389', # requires "ldap_client" role
ldap_bind_dn: ldap_credentials["service_dn"],
ldap_password: ldap_credentials["service_password"],
ldap_search_dn: node["strfry"]["ldap_search_dn"]
ldap_search_dn: node["strfry"]["ldap_search_dn"],
whitelist_pubkeys: node["strfry"]["whitelist_pubkeys"].join(",")
}
template "/opt/.env" do
@ -32,7 +33,15 @@ end
# strfry deno scripts
#
base_url = "https://gitea.kosmos.org/kosmos/akkounts/raw/branch/master/extras/strfry"
base_url = "https://gitea.kosmos.org/kosmos/akkounts/raw/branch/live/extras/strfry"
remote_file "/opt/deno.json" do
source "#{base_url}/deno.json"
owner node["strfry"]["user"]
group node["strfry"]["group"]
mode "0644"
notifies :restart, "service[strfry]", :delayed
end
remote_file "/opt/strfry-policy.ts" do
source "#{base_url}/strfry-policy.ts"