feat: database monitors with sealed credentials
Secret monitor settings such as database passwords are stored sealed, bound to monitor type and field, never returned by the API, the console or exports, kept when an edit leaves them empty, and opened only for the checker's job. Monitor types are validated by the check package; the database only checks their format. Compose gets a checks profile with MariaDB, MongoDB and SQL Server, and CI tests against MariaDB and MongoDB. Closes #93 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
a62ffb43de
commit
d3cf9f48e1
15 files changed
+1079
-495
No files matched your search
@@ -408,7 +408,7 @@ func (s *Server) buildOrgExport(ctx context.Context, p *principal) (orgExport, e
|
||||
x.Monitors = append(x.Monitors, exportMonitor{
|
||||
ID: m.ID, Name: m.Name, Type: m.Type, Target: m.Target, IntervalSeconds: m.IntervalSeconds,
|
||||
TimeoutMS: m.TimeoutMs, Confirmations: m.Confirmations, Enabled: m.Enabled, GroupID: m.GroupID,
|
||||
Regions: orEmpty(regions[m.ID]), Config: rawJSON(m.Config), CreatedAt: m.CreatedAt,
|
||||
Regions: orEmpty(regions[m.ID]), Config: rawJSON(first(publicMonitorConfig(m.Config))), CreatedAt: m.CreatedAt,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -672,3 +672,5 @@ func (s *Server) deleteOrg(c *gin.Context) {
|
||||
map[string]any{"slug": p.Org.Slug, "name": p.Org.Name})
|
||||
c.JSON(http.StatusOK, gin.H{"status": "deleted"})
|
||||
}
|
||||
|
||||
func first[A, B any](a A, _ B) A { return a }
|
||||
Reference in new issue
Block a user