myc

Self-custodial remote signer for Radroots apps
git clone https://radroots.dev/git/myc.git
Log | Files | Refs | README | LICENSE

config.v1.example.toml (4000B)


      1 schema = "radroots.myc.config"
      2 schema_version = 1
      3 
      4 [service]
      5 shutdown_grace_ms = 30000
      6 
      7 [logging]
      8 level = "info"
      9 format = "json"
     10 
     11 [operations]
     12 enabled = false
     13 
     14 [database]
     15 busy_timeout_ms = 5000
     16 max_connections = 8
     17 minimum_free_bytes = 268435456
     18 
     19 [identity.transport]
     20 provider = "encrypted_file"
     21 envelope_path = "/var/lib/radroots/services/myc/primary/secrets/transport.identity.ncrypt"
     22 credential_reference = "transport_wrapping_key"
     23 expected_public_key = "4444444444444444444444444444444444444444444444444444444444444444"
     24 
     25 [identity.user]
     26 provider = "local_signer"
     27 socket_path = "/run/radroots/services/myc/primary/user-signer.sock"
     28 request_deadline_ms = 15000
     29 request_max_bytes = 65536
     30 response_max_bytes = 1048576
     31 concurrency = 32
     32 expected_public_key = "2222222222222222222222222222222222222222222222222222222222222222"
     33 
     34 [identity.discovery]
     35 enabled = true
     36 
     37 [identity.discovery.binding]
     38 provider = "encrypted_file"
     39 envelope_path = "/var/lib/radroots/services/myc/primary/secrets/discovery.identity.ncrypt"
     40 credential_reference = "discovery_wrapping_key"
     41 expected_public_key = "3333333333333333333333333333333333333333333333333333333333333333"
     42 
     43 [[relays]]
     44 id = "primary"
     45 url = "wss://relay-primary.example.test/"
     46 read = true
     47 write = true
     48 required = true
     49 authentication = "required"
     50 
     51 [[relays]]
     52 id = "secondary"
     53 url = "wss://relay-secondary.example.test/"
     54 read = true
     55 write = true
     56 required = true
     57 authentication = "required"
     58 
     59 [transport]
     60 connect_deadline_ms = 10000
     61 
     62 [transport.ingress]
     63 subscription_deadline_ms = 30000
     64 maximum_past_seconds = 120
     65 maximum_future_seconds = 120
     66 
     67 [transport.delivery_policy]
     68 mode = "all_required"
     69 
     70 [transport.publish_retry]
     71 max_attempts = 5
     72 initial_backoff_ms = 250
     73 maximum_backoff_ms = 30000
     74 attempt_deadline_ms = 15000
     75 
     76 [policy]
     77 connection_approval = "explicit_user"
     78 trusted_clients = ["7777777777777777777777777777777777777777777777777777777777777777"]
     79 denied_clients = ["8888888888888888888888888888888888888888888888888888888888888888"]
     80 permission_ceiling = ["nip04_decrypt", "nip04_encrypt", "nip44_decrypt", "nip44_encrypt", "sign_event:kind:1"]
     81 allowed_sign_event_kinds = [1]
     82 
     83 [policy.challenges]
     84 enabled = true
     85 url = "https://myc.example.test/auth/challenge"
     86 pending_lifetime_ms = 900000
     87 authorized_lifetime_ms = 3600000
     88 
     89 [policy.retention]
     90 terminal_connections_ms = 604800000
     91 terminal_challenges_ms = 86400000
     92 request_dedup_ms = 604800000
     93 audit_ms = 2592000000
     94 completed_outbox_ms = 604800000
     95 
     96 [rate_limits.connection_admission]
     97 scope = "global_and_relay"
     98 window_ms = 60000
     99 max_attempts = 10
    100 retention_ms = 3600000
    101 maximum_tracked_subjects = 4096
    102 
    103 [rate_limits.challenge_creation]
    104 scope = "connection"
    105 window_ms = 120000
    106 max_attempts = 5
    107 retention_ms = 86400000
    108 maximum_tracked_subjects = 16384
    109 
    110 [rate_limits.challenge_authorization]
    111 scope = "connection"
    112 window_ms = 120000
    113 max_attempts = 5
    114 retention_ms = 86400000
    115 maximum_tracked_subjects = 16384
    116 
    117 [resource_limits.admin]
    118 header_count = 32
    119 header_bytes = 16384
    120 request_body_utf8_bytes = 65536
    121 response_body_utf8_bytes = 1048576
    122 concurrent_connections = 32
    123 request_deadline_ms = 15000
    124 idle_timeout_ms = 30000
    125 query_items = 100
    126 
    127 [resource_limits.events]
    128 wire_bytes = 262144
    129 content_bytes = 131072
    130 tag_count = 1024
    131 tag_total_elements = 4096
    132 tag_element_bytes = 4096
    133 tag_total_bytes = 131072
    134 decrypted_plaintext_bytes = 262144
    135 
    136 [resource_limits.queues]
    137 ingress = 1024
    138 provider = 64
    139 outbox = 4096
    140 discovery = 64
    141 
    142 [resource_limits.metrics]
    143 descriptors = 64
    144 samples = 512
    145 labels_per_sample = 8
    146 render_utf8_bytes = 1048576
    147 
    148 [resource_limits.runtime]
    149 worker_threads = 4
    150 blocking_threads = 8
    151 
    152 [discovery]
    153 enabled = true
    154 domain = "myc.example.test"
    155 handler_identifier = "myc"
    156 public_relay_ids = ["primary", "secondary"]
    157 publish_relay_ids = ["primary", "secondary"]
    158 nostrconnect_url_template = "https://myc.example.test/connect?uri=<nostrconnect>"
    159 
    160 [discovery.metadata]
    161 name = "myc"
    162 display_name = "Radroots Myc"
    163 about = "NIP-46 signer"
    164 website = "https://myc.example.test/"
    165 picture = "https://myc.example.test/myc.png"