Changed API endpoint from access: 'internal' to access: 'public' (#190316)

## Summary
Changed acces to `public` for
`/internal/security/analytics/_record_violations` endpoint.

Kibana reports Content-Security-Policy (CSP) violations and
Permission-Policy violations to the
`/internal/security/analytics/_record_violations` endpoint. This
endpoint was marked as `internal`, which didn't work because reports are
sent by browser.

__Fixes: https://github.com/elastic/kibana-team/issues/1024__

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
elena-shostak 2024-08-15 15:21:33 +02:00 committed by GitHub
parent 6cb7019055
commit 2e7d67f893
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -161,7 +161,7 @@ export function defineRecordViolations({ router, analyticsService }: RouteDefini
* This endpoint is called by the browser in the background so `kbn-xsrf` header is not sent.
*/
xsrfRequired: false,
access: 'internal',
access: 'public',
body: {
/**
* Both `application/reports+json` (CSP3 spec) and `application/csp-report` (Safari) are