Skip to content

security: durable wallet LMDB and non-root Docker image - #129

Open
ekulkisnek wants to merge 1 commit into
LayerTwo-Labs:masterfrom
ekulkisnek:security/wallet-durability-docker
Open

security: durable wallet LMDB and non-root Docker image#129
ekulkisnek wants to merge 1 commit into
LayerTwo-Labs:masterfrom
ekulkisnek:security/wallet-durability-docker

Conversation

@ekulkisnek

Copy link
Copy Markdown
Contributor

Summary

Improves wallet durability and container safety: wallet seed/UTXO data should be fsynced (unlike rebuildable chain state), and the image should not run as root.

Changes

  • Drop NO_SYNC / NO_META_SYNC / MAP_ASYNC on the wallet LMDB env so seed/UTXO commits are fsynced
  • chmod 0700 the wallet data directory on Unix
  • Run the container as uid/gid 1000 (thunder) instead of root

Test plan

  • Confirm wallet data directory permissions are 0700 on Unix
  • Confirm Docker image runs as non-root user
  • Smoke-test wallet open/write after crash/kill to validate durability intent
  • Run relevant unit tests

- Drop NO_SYNC/NO_META_SYNC/MAP_ASYNC on the wallet env so seed/UTXO
  commits are fsynced (chain state can be rebuilt; the wallet seed cannot)
- chmod 0700 the wallet data directory on Unix
- Run the container as uid/gid 1000 (thunder) instead of root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant