Conversation
… лог-каналы
- удалить публичный роут /public/files/* (FileController::publicDownload):
отдавал файлы пользователей без авторизации; во фронте не используется.
- download(): защита от path traversal (safePath с realpath-containment),
т.к. роут ловит {file} через where('.*').
- лог-события (ServletStarted/Log/Finished) → PrivateChannel; в routes/channels.php
авторизация servlet.{userId}.{name} по владельцу — раньше каналы были
публичными и изолировались лишь userId в имени.
- фронт: Echo.channel() → Echo.private(); добавлен <meta csrf-token> для
авторизации приватных каналов (POST /broadcasting/auth).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Реестр servlets.json читался напрямую в 4 местах (ServletController,
FileController, RunServletCommand, HandleInertiaRequests) с захардкоженным
путём и в двух форматах (assoc/stdClass). Сведено к одному сервису:
- app/Servlets/ServletRegistry: all()/native()/sidebar()/find()/classname(),
singleton, кэш в памяти; путь через config('workbench.servlets_path').
- ServletController/FileController — инъекция реестра, удалены приватные
loadServlets()/findServlet().
- RunServletCommand::resolveClassName() и HandleInertiaRequests::share()
используют реестр.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Добавлена точка расширения авторизации сервлетов; поведение по умолчанию не
меняется (любой залогиненный запускает всё — обратная совместимость).
- App\Contracts\ServletAuthorizer + дефолт App\Servlets\Authorizers\AllowAllAuthorizer;
биндинг через config('workbench.authorizer') — хост подставляет свою RBAC.
- Gate 'runServlet' делегирует авторизатору — единый источник для контроллеров
и фильтра списка/сайдбара в ServletRegistry.
- ServletController: Gate::authorize('runServlet') на show/run/stop/action;
index фильтруется через native($user); сайдбар (HandleInertiaRequests) — sidebar($user).
- FileController: Gate::authorize('runServlet') на всех файловых операциях
(upload/download/result-files/download-zip/clear-in/clear-out/input-files/save-params),
чтобы доступ к файлам был согласован с правом запуска сервлета.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jazz-max
force-pushed
the
feat/pluggable-servlet-authorizer
branch
from
July 6, 2026 09:01
629ad16 to
fd2944d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Временный PR только для прогона CI на полном стеке (PR #1+#2+#3). Будет закрыт после проверки. Реальные PR: #1←main, #2←#1, #3←#2.