gravity: trust system CA pool and make SNI fallback configurable#156
gravity: trust system CA pool and make SNI fallback configurable#156robindiddams merged 1 commit intomainfrom
Conversation
Use x509.SystemCertPool instead of NewCertPool so servers presenting certs signed by public root CAs are trusted alongside the Agentuity CA. Make the IP-address SNI fallback configurable via DefaultServerName on GravityConfig and IdentifyConfig instead of hardcoding gravity.agentuity.com. Refactor Identify to take a config struct since CACert and DefaultServerName are usually not provided.
📝 WalkthroughWalkthroughThese changes introduce a new Changes
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code graph analysis (1)gravity/identify.go (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (7)
✏️ Tip: You can disable this entire section by setting Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Comment |
Summary
x509.SystemCertPool()instead ofx509.NewCertPool()in bothgrpc_client.goandidentify.goso servers presenting certs signed by public root CAs are trusted alongside the Agentuity CA"gravity.agentuity.com"SNI fallback (used when connecting via IP address) configurable viaDefaultServerNameonGravityConfigandIdentifyConfigIdentify()to take anIdentifyConfigstruct —CACertandDefaultServerNameare optional and default to system roots /"gravity.agentuity.com"respectivelyBreaking Changes
Identify()signature changed from positional args toIdentifyConfigstruct — callers get a compile error and must migrateextractHostnameFromGravityURL()now takes a secondfallbackServerNameparameter (internal, not exported)Summary by CodeRabbit
New Features
Bug Fixes
Refactor