-
Notifications
You must be signed in to change notification settings - Fork 4
[client] restrict sensitive settings for Cloud #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
WalkthroughAdded validation tags and updated comments for two fields in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
smsgateway/domain_settings.go(2 hunks)
🔇 Additional comments (1)
smsgateway/domain_settings.go (1)
121-123: Refine SigningKey comment for clarity and confirm Cloud‐only usageThe
validate:"omitempty,isdefault"tag on*stringforcesSigningKeyto be nil (an empty string still fails), which aligns with “must not be used with Cloud Server.” Let’s update the comment to be more precise and ensure this restriction only applies in Cloud builds.• File: smsgateway/domain_settings.go
Lines: 121–122- // SigningKey is the secret key used for signing webhook payloads. Must not be used with Cloud Server. + // SigningKey is the secret used to sign webhook payloads. + // Cloud Server: must be omitted (nil). Self-hosted: optional.If this struct (and its validation) is shared by both Cloud and self-hosted flows, please confirm or consider one of:
- Splitting into separate Cloud vs. self-hosted DTOs
- Registering a custom
forbiddenvalidator tag only in Cloud builds- Using Go build tags to apply Cloud-only validations
Let me know once you’ve verified that this change won’t break self-hosted usage.
83f1755 to
f8134e7
Compare
Summary by CodeRabbit
New Features
Documentation