Restore legacy host config fetch compatibility (#1254)
Some checks are pending
Build and Test / Secret Scan (push) Waiting to run
Build and Test / Frontend & Backend (push) Waiting to run
Core E2E Tests / Playwright Core E2E (push) Waiting to run

This commit is contained in:
rcourtman 2026-03-30 19:30:48 +01:00
parent 4120d75359
commit 04a828264a
3 changed files with 70 additions and 1 deletions

View file

@ -321,6 +321,9 @@ func (h *HostAgentHandlers) canReadConfig(record *config.APITokenRecord) bool {
return true
}
return record.HasScope(config.ScopeHostConfigRead) ||
// Older host-agent tokens may only carry host-agent:report.
// Allow them to continue fetching their own config via token binding.
record.HasScope(config.ScopeHostReport) ||
record.HasScope(config.ScopeHostManage) ||
record.HasScope(config.ScopeSettingsWrite)
}