Repository navigation
security(transport): require HTTPS for mainnet RPC and Drand endpoints - #598
Open
umpireboulianne-design wants to merge 1 commit into
Open
umpireboulianne-design wants to merge 1 commit into
umpireboulianne-design wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
assertEndpointTransportSecurity,isMainnetPassphrase, andisLoopbackHostinpackages/sdk/src/network.ts(re-exported from@sub-rosa/sdk) and wire intoSubRosaClientso mainnet (Public Global Stellar Network ; September 2015) always requireshttps://(even ifallowHttpis passed or the host is loopback), while non-mainnet development requires explicitallowHttp: trueforhttp://.http://RPC URLs from"warn"to"block"inpackages/sdk/src/mainnet-readiness.ts(rpcUrlCheck).https://inservices/appraisal-api/src/config.ts(parseRpcUrl) wheneverX402_NETWORK=stellar:pubnetor when a non-loopback remote host is configured on testnet, while keepinghttp://localhost/http://127.0.0.1allowed on testnet.assertDrandEndpointUrlandDEFAULT_QUICKNET_URLinpackages/tlock/src/quicknet.ts(re-exported from@sub-rosa/tlock) and wire intoquicknet()so remotehttp://Drand endpoints are rejected and local loopbackhttp://requiresallowLocalHttp: true.RPC_URLtransport security rules inservices/appraisal-api/README.mdand add unit tests acrosspackages/sdk,services/appraisal-api, andpackages/tlock.Supply-chain review
.vscode/, workflow, or other editor/config file changes. If changed, list them below.preinstall/postinstall) was added.Testing
node --import tsx/esm --test src/network.test.ts src/mainnet-readiness.test.ts src/public-api-snapshot.test.tsinpackages/sdk(passes)node --import tsx/esm --test src/config.test.tsinservices/appraisal-api(21/21 tests pass)node --import tsx/esm --test src/quicknet.test.tsinpackages/tlock(11/11 tests pass)node scripts/check-direct-time-access.mjs(passes)Closes #536
Fixes #536