mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feature/1121 implement ucan validation (#1176)
- **refactor: remove unused auth components** - **refactor: improve devbox configuration and deployment process** - **refactor: improve devnet and testnet setup** - **fix: update templ version to v0.2.778** - **refactor: rename pkl/net.matrix to pkl/matrix.net** - **refactor: migrate webapp components to nebula** - **refactor: protobuf types** - **chore: update dependencies for improved security and stability** - **feat: implement landing page and vault gateway servers** - **refactor: Migrate data models to new module structure and update related files** - **feature/1121-implement-ucan-validation** - **refactor: Replace hardcoded constants with model types in attns.go** - **feature/1121-implement-ucan-validation** - **chore: add origin Host struct and update main function to handle multiple hosts** - **build: remove unused static files from dwn module** - **build: remove unused static files from dwn module** - **refactor: Move DWN models to common package** - **refactor: move models to pkg/common** - **refactor: move vault web app assets to embed module** - **refactor: update session middleware import path** - **chore: configure port labels and auto-forwarding behavior** - **feat: enhance devcontainer configuration** - **feat: Add UCAN middleware for Echo with flexible token validation** - **feat: add JWT middleware for UCAN authentication** - **refactor: update package URI and versioning in PklProject files** - **fix: correct sonr.pkl import path** - **refactor: move JWT related code to auth package** - **feat: introduce vault configuration retrieval and management** - **refactor: Move vault components to gateway module and update file paths** - **refactor: remove Dexie and SQLite database implementations** - **feat: enhance frontend with PWA features and WASM integration** - **feat: add Devbox features and streamline Dockerfile** - **chore: update dependencies to include TigerBeetle** - **chore(deps): update go version to 1.23** - **feat: enhance devnet setup with PATH environment variable and updated PWA manifest** - **fix: upgrade tigerbeetle-go dependency and remove indirect dependency** - **feat: add PostgreSQL support to devnet and testnet deployments** - **refactor: rename keyshare cookie to token cookie** - **feat: upgrade Go version to 1.23.3 and update dependencies** - **refactor: update devnet and testnet configurations** - **feat: add IPFS configuration for devnet** - **I'll help you update the ipfs.config.pkl to include all the peers from the shell script. Here's the updated configuration:** - **refactor: move mpc package to crypto directory** - **feat: add BIP32 support for various cryptocurrencies** - **feat: enhance ATN.pkl with additional capabilities** - **refactor: simplify smart account and vault attenuation creation** - **feat: add new capabilities to the Attenuation type** - **refactor: Rename MPC files for clarity and consistency** - **feat: add DIDKey support for cryptographic operations** - **feat: add devnet and testnet deployment configurations** - **fix: correct key derivation in bip32 package** - **refactor: rename crypto/bip32 package to crypto/accaddr** - **fix: remove duplicate indirect dependency** - **refactor: move vault package to root directory** - **refactor: update routes for gateway and vault** - **refactor: remove obsolete web configuration file** - **refactor: remove unused TigerBeetle imports and update host configuration** - **refactor: adjust styles directory path** - **feat: add broadcastTx and simulateTx functions to gateway** - **feat: add PinVault handler**
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
open module matrix.net.AppService
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
open module matrix.net.Homeserver
|
||||
|
||||
version = 2
|
||||
|
||||
global = new {
|
||||
server_name = read("env:MATRIX_SERVER_NAME") ?? ""
|
||||
private_key = "matrix_key.pem"
|
||||
old_private_keys = new Listing {}
|
||||
key_validity_period = "168h0m0s"
|
||||
}
|
||||
|
||||
database = new {
|
||||
connection_string = read("env:MATRIX_PSQL_CONN") ?? ""
|
||||
max_open_conns = 90
|
||||
max_idle_conns = 5
|
||||
conn_max_lifetime = -1
|
||||
}
|
||||
|
||||
cache = new {
|
||||
max_size_estimated = "1gb"
|
||||
max_age = "1h"
|
||||
}
|
||||
|
||||
well_known_server_name = ""
|
||||
well_known_client_name = read("env:MATRIX_CLIENT_NAME") ?? ""
|
||||
well_known_sliding_sync_proxy = ""
|
||||
|
||||
trusted_third_party_id_servers = new Listing {
|
||||
"matrix.org"
|
||||
"vector.im"
|
||||
}
|
||||
|
||||
disable_federation = false
|
||||
|
||||
presence = new {
|
||||
enable_inbound = false
|
||||
enable_outbound = false
|
||||
}
|
||||
|
||||
report_stats = new {
|
||||
enabled = false
|
||||
endpoint = "https://panopticon.matrix.org/push"
|
||||
}
|
||||
|
||||
server_notices = new {
|
||||
enabled = false
|
||||
local_part = "_server"
|
||||
display_name = "Server Alerts"
|
||||
avatar_url = ""
|
||||
room_name = "Server Alerts"
|
||||
}
|
||||
|
||||
jetstream = new {
|
||||
addresses = new Listing {}
|
||||
disable_tls_validation = false
|
||||
storage_path = "./"
|
||||
topic_prefix = "Dendrite"
|
||||
}
|
||||
|
||||
metrics = new {
|
||||
enabled = false
|
||||
basic_auth = new {
|
||||
username = "metrics"
|
||||
password = "metrics"
|
||||
}
|
||||
}
|
||||
|
||||
dns_cache = new {
|
||||
enabled = false
|
||||
cache_size = 256
|
||||
cache_lifetime = "5m"
|
||||
}
|
||||
|
||||
app_service_api = new {
|
||||
disable_tls_validation = false
|
||||
legacy_auth = false
|
||||
legacy_paths = false
|
||||
config_files = new Listing {
|
||||
"/etc/dendrite/chat-service.yaml"
|
||||
}
|
||||
}
|
||||
|
||||
client_api = new {
|
||||
registration_disabled = true
|
||||
guests_disabled = true
|
||||
registration_shared_secret = read("env:MATRIX_REGISTRATION_SHARED_SECRET") ?? ""
|
||||
enable_registration_captcha = (read("env:MATRIX_ENABLE_RECATCHA") ?? "false").toBoolean()
|
||||
recaptcha_public_key = read("env:MATRIX_RECATCHA_PUBLIC_KEY") ?? ""
|
||||
recaptcha_private_key = read("env:MATRIX_RECATCHA_PRIVATE_KEY") ?? ""
|
||||
recaptcha_bypass_secret = read("env:MATRIX_RECATCHA_BYPASS_SECRET") ?? ""
|
||||
}
|
||||
|
||||
turn = new {
|
||||
turn_user_lifetime = "5m"
|
||||
turn_uris = new Listing {}
|
||||
turn_shared_secret = ""
|
||||
}
|
||||
|
||||
rate_limiting = new {
|
||||
enabled = true
|
||||
threshold = 20
|
||||
cooloff_ms = 500
|
||||
exempt_user_ids = new Listing {}
|
||||
}
|
||||
|
||||
federation_api = new {
|
||||
send_max_retries = 16
|
||||
disable_tls_validation = false
|
||||
disable_http_keepalives = false
|
||||
key_perspectives = new Listing {
|
||||
new {
|
||||
server_name = "matrix.org"
|
||||
keys = new Listing {
|
||||
new {
|
||||
key_id = "ed25519:auto"
|
||||
public_key = "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
|
||||
}
|
||||
new {
|
||||
key_id = "ed25519:a_RXGa"
|
||||
public_key = "l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
prefer_direct_fetch = false
|
||||
}
|
||||
|
||||
media_api = new {
|
||||
base_path = "./media_store"
|
||||
max_file_size_bytes = 10485760
|
||||
dynamic_thumbnails = false
|
||||
max_thumbnail_generators = 10
|
||||
thumbnail_sizes = new Listing {
|
||||
new {
|
||||
width = 32
|
||||
height = 32
|
||||
method = "crop"
|
||||
}
|
||||
new {
|
||||
width = 96
|
||||
height = 96
|
||||
method = "crop"
|
||||
}
|
||||
new {
|
||||
width = 640
|
||||
height = 480
|
||||
method = "scale"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mscs = new {
|
||||
mscs = new Listing {}
|
||||
}
|
||||
|
||||
sync_api = new Listing {}
|
||||
|
||||
search = new {
|
||||
enabled = false
|
||||
index_path = "./searchindex"
|
||||
language = "en"
|
||||
}
|
||||
|
||||
user_api = new {
|
||||
bcrypt_cost = 10
|
||||
auto_join_rooms = new Listing {
|
||||
// - "#main:matrix.org"
|
||||
}
|
||||
}
|
||||
|
||||
tracing = new {
|
||||
enabled = false
|
||||
jaeger = new {
|
||||
serviceName = ""
|
||||
disabled = false
|
||||
rpc_metrics = false
|
||||
tags = new Listing {}
|
||||
sampler = null
|
||||
reporter = null
|
||||
headers = null
|
||||
baggage_restrictions = null
|
||||
throttler = null
|
||||
}
|
||||
}
|
||||
|
||||
logging = new Listing {
|
||||
new {
|
||||
type = "std"
|
||||
level = "info"
|
||||
}
|
||||
new {
|
||||
type = "file"
|
||||
level = "info"
|
||||
params = new {
|
||||
path = "./logs"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// Configuration files for integrating the Matrix service
|
||||
amends "../basePklProject.pkl"
|
||||
|
||||
package {
|
||||
name = "matrix.net"
|
||||
version = "0.0.1"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {}
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
open module matrix.net.Synapse
|
||||
|
||||
version = 2
|
||||
|
||||
global = new {
|
||||
server_name = read("env:MATRIX_SERVER_NAME") ?? ""
|
||||
private_key = "matrix_key.pem"
|
||||
old_private_keys = new Listing {}
|
||||
key_validity_period = "168h0m0s"
|
||||
}
|
||||
|
||||
database = new {
|
||||
connection_string = read("env:MATRIX_PSQL_CONN") ?? ""
|
||||
max_open_conns = 90
|
||||
max_idle_conns = 5
|
||||
conn_max_lifetime = -1
|
||||
}
|
||||
|
||||
cache = new {
|
||||
max_size_estimated = "1gb"
|
||||
max_age = "1h"
|
||||
}
|
||||
|
||||
well_known_server_name = ""
|
||||
well_known_client_name = read("env:MATRIX_CLIENT_NAME") ?? ""
|
||||
well_known_sliding_sync_proxy = ""
|
||||
|
||||
trusted_third_party_id_servers = new Listing {
|
||||
"matrix.org"
|
||||
"vector.im"
|
||||
}
|
||||
|
||||
disable_federation = false
|
||||
|
||||
presence = new {
|
||||
enable_inbound = false
|
||||
enable_outbound = false
|
||||
}
|
||||
|
||||
report_stats = new {
|
||||
enabled = false
|
||||
endpoint = "https://panopticon.matrix.org/push"
|
||||
}
|
||||
|
||||
server_notices = new {
|
||||
enabled = false
|
||||
local_part = "_server"
|
||||
display_name = "Server Alerts"
|
||||
avatar_url = ""
|
||||
room_name = "Server Alerts"
|
||||
}
|
||||
|
||||
jetstream = new {
|
||||
addresses = new Listing {}
|
||||
disable_tls_validation = false
|
||||
storage_path = "./"
|
||||
topic_prefix = "Dendrite"
|
||||
}
|
||||
|
||||
metrics = new {
|
||||
enabled = false
|
||||
basic_auth = new {
|
||||
username = "metrics"
|
||||
password = "metrics"
|
||||
}
|
||||
}
|
||||
|
||||
dns_cache = new {
|
||||
enabled = false
|
||||
cache_size = 256
|
||||
cache_lifetime = "5m"
|
||||
}
|
||||
|
||||
app_service_api = new {
|
||||
disable_tls_validation = false
|
||||
legacy_auth = false
|
||||
legacy_paths = false
|
||||
config_files = new Listing {
|
||||
"/etc/dendrite/chat-service.yaml"
|
||||
}
|
||||
}
|
||||
|
||||
client_api = new {
|
||||
registration_disabled = true
|
||||
guests_disabled = true
|
||||
registration_shared_secret = read("env:MATRIX_REGISTRATION_SHARED_SECRET") ?? ""
|
||||
enable_registration_captcha = (read("env:MATRIX_ENABLE_RECATCHA") ?? "false").toBoolean()
|
||||
recaptcha_public_key = read("env:MATRIX_RECATCHA_PUBLIC_KEY") ?? ""
|
||||
recaptcha_private_key = read("env:MATRIX_RECATCHA_PRIVATE_KEY") ?? ""
|
||||
recaptcha_bypass_secret = read("env:MATRIX_RECATCHA_BYPASS_SECRET") ?? ""
|
||||
}
|
||||
|
||||
turn = new {
|
||||
turn_user_lifetime = "5m"
|
||||
turn_uris = new Listing {}
|
||||
turn_shared_secret = ""
|
||||
}
|
||||
|
||||
rate_limiting = new {
|
||||
enabled = true
|
||||
threshold = 20
|
||||
cooloff_ms = 500
|
||||
exempt_user_ids = new Listing {}
|
||||
}
|
||||
|
||||
federation_api = new {
|
||||
send_max_retries = 16
|
||||
disable_tls_validation = false
|
||||
disable_http_keepalives = false
|
||||
key_perspectives = new Listing {
|
||||
new {
|
||||
server_name = "matrix.org"
|
||||
keys = new Listing {
|
||||
new {
|
||||
key_id = "ed25519:auto"
|
||||
public_key = "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
|
||||
}
|
||||
new {
|
||||
key_id = "ed25519:a_RXGa"
|
||||
public_key = "l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
prefer_direct_fetch = false
|
||||
}
|
||||
|
||||
media_api = new {
|
||||
base_path = "./media_store"
|
||||
max_file_size_bytes = 10485760
|
||||
dynamic_thumbnails = false
|
||||
max_thumbnail_generators = 10
|
||||
thumbnail_sizes = new Listing {
|
||||
new {
|
||||
width = 32
|
||||
height = 32
|
||||
method = "crop"
|
||||
}
|
||||
new {
|
||||
width = 96
|
||||
height = 96
|
||||
method = "crop"
|
||||
}
|
||||
new {
|
||||
width = 640
|
||||
height = 480
|
||||
method = "scale"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mscs = new {
|
||||
mscs = new Listing {}
|
||||
}
|
||||
|
||||
sync_api = new Listing {}
|
||||
|
||||
search = new {
|
||||
enabled = false
|
||||
index_path = "./searchindex"
|
||||
language = "en"
|
||||
}
|
||||
|
||||
user_api = new {
|
||||
bcrypt_cost = 10
|
||||
auto_join_rooms = new Listing {
|
||||
// - "#main:matrix.org"
|
||||
}
|
||||
}
|
||||
|
||||
tracing = new {
|
||||
enabled = false
|
||||
jaeger = new {
|
||||
serviceName = ""
|
||||
disabled = false
|
||||
rpc_metrics = false
|
||||
tags = new Listing {}
|
||||
sampler = null
|
||||
reporter = null
|
||||
headers = null
|
||||
baggage_restrictions = null
|
||||
throttler = null
|
||||
}
|
||||
}
|
||||
|
||||
logging = new Listing {
|
||||
new {
|
||||
type = "std"
|
||||
level = "info"
|
||||
}
|
||||
new {
|
||||
type = "file"
|
||||
level = "info"
|
||||
params = new {
|
||||
path = "./logs"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user