Repository navigation
RU Admin Backend
Andrewkydev edited this page Aug 25, 2026
·
2 revisions
English: EN-Admin-Backend
Admin — optional management backend, не обязательная часть bot runtime.
Реализованы bootstrap v1/v2, principals/RBAC, web grants и sessions, users/chats/plugins/settings, logs/audit/SSE/metrics, declarative UI, Control WebSocket и durable operations с progress.
server := api.NewWithDependencies(api.Dependencies{
App: app, Store: store, Plugins: app.Plugins(), Logs: stream, Logger: logger,
Auth: verifier, Authorization: policy,
})
if err := server.RegisterPluginModules(app.Plugins()); err != nil {
log.Fatal(err)
}
defer server.Shutdown(context.Background())
log.Fatal(server.Listen("127.0.0.1:8080"))В production передайте Auth, Authorization, durable identity/session repositories и необходимые Control/operations dependencies.
- Без
Authprotected-запросы fail closed с401 Unauthorized. - Для локальной разработки без аутентификации используйте
api.NewInsecureDevelopmentServer()или явно задайтеInsecureDevelopment. ЕгоListenразрешает только explicit loopback host. -
NewHTTPServer/ServeHTTPсами не проверяют bind address — обеспечьте auth или внешний network boundary. - Static verifier подходит только для dev/compatibility.
- Web grants, session tokens и Control tickets нельзя помещать в URL или логи.
-
RegisterPluginModulesвызывается до serving; registration error фатален. -
Shutdown(ctx)закрывает maintenance, operations, Control sockets и audit dispatcher.
Admin frontend и demo-приложение поддерживаются отдельными репозиториями.