记录SSH私钥安全整改中间状态

提交密码认证收敛、历史字段清理迁移及相关测试调整,后续继续修复测试并完成复审。
This commit is contained in:
xuans committed 2026-10-02 05:03:31 +08:00
1 parent d78e8e679e
commit 5af752b25a
16 files changed
+64 -120

No files matched your search

@@ -100,15 +100,15 @@ func TestServerRepositoryRejectsInvalidServer(t *testing.T) {
}
}
func TestServerRepositoryRejectsPrivateKeyReference(t *testing.T) {
func TestServerRepositoryRejectsUnsupportedAuthentication(t *testing.T) {
db := openServerTestDatabase(t)
defer db.Close()
repo := NewSQLServerRepository(db.DB)
server := validTestServer()
server.ID = "server-private-key-rejected"
server.PrivateKeyRef = "secret://ssh/private-key"
server.AuthMethod = deployment.SSHAuthMethod("unsupported")
if err := repo.CreateServer(t.Context(), server); err == nil {
t.Fatal("server repository must reject SSH private key references")
t.Fatal("server repository must reject unsupported authentication")
}
}