We have a regular polling heartbeat action that we...
# permit-saas
s
We have a regular polling heartbeat action that we want to authorize to prevent spoofed heartbeats but also want to exclude from the built-in audit logs since it's noisy, any pointers? The audit log query params don't seem to support negation operations.
a
Hi @Sam Jakos, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
I don't have specific documentation on excluding certain actions from audit logs or using negation filters in the audit log query parameters. The available sources discuss audit log viewing, filtering by users/dates/decisions, and Debug Mode configuration—but not selective exclusion of specific action types like heartbeats. (1) (2) Here are some potentially useful sources to explore further: • Best Practices for Authorization Audit Logs • Debug Mode • Permit's PDP (Policy Decision Point) For this specific use case (excluding noisy heartbeat actions from audit logs while still authorizing them) , I'd recommend reaching out via Email to get guidance from the team on whether there's a configuration option or workaround. Would you like me to try to answer generally based on my knowledge instead?
To learn more, see the sources I considered: [[1] Best Practices for Authorization Audit Logs](https://www.permit.io/blog/audit-logs) [[2] Debug Mode](https://docs.permit.io/how-to/use-audit-logs/debug-mode)
s
@Ask Inkeep is it possible to filter what is sent to the audit log from the PDP so we could drop the noisy logs instead of sending them on to the Permit API?
a
Thanks for tagging me @Sam Jakos. I'll look through relevant sources and get back to you shortly.
I don't have specific documentation on filtering or dropping certain decision logs at the PDP level before they're sent to the Permit API. The available sources describe that the PDP uploads decision logs to the backend tier, but don't detail configuration options for selectively excluding specific actions or log entries. (1) , (2) What I can confirm: • The container PDP does support configurable log forwarding (e.g., Fluent Bit sidecar) and exposed metrics/APM integrations, which gives you more control over observability compared to the Cloud PDP. • Decision logs from the PDP are sent to
<https://decision-log-ingress.api.permit.io>
as shown in the PDP logs. (3) However, the specific mechanism to filter out certain actions (like your heartbeat) before they're transmitted isn't covered in the sources I have access to. Check out these potentially useful sources: • Permit's PDP (Policy Decision Point) • Cloud PDP Capabilities I'd recommend reaching out via Email for guidance on whether there's a PDP configuration option or OPA decision log filtering mechanism that could help with this use case. Would you like me to try to answer generally based on my knowledge instead? * Since this relates to PDP behavior that may need investigation, could you share: 1. Which Workspace / Project / Env you're using 2. What calls you're performing (SDK code or CURL for the heartbeat check) 3. Which PDP version you're running 4. Any relevant logs from your PDP This will help the engineering team investigate options for your filtering use case.
To learn more, see the sources I considered: [[1] Permit's PDP (Policy Decision Point)](https://docs.permit.io/concepts/pdp/overview) [[2] Cloud PDP Capabilities](https://docs.permit.io/concepts/pdp/cloud-pdp-capabilities) [[3] Unable to push the policy data since OPA is not ready yet in sidecar pattern](https://github.com/permitio/PDP/issues/266)
d
Hi Sam, thanks for you question. There is no option to filter what is sent to Audit Logs from PDP. The Audit Logs are intentionally configured to receive all activity from the PDP. You can however control which logs your forward to your own log aggregation. Please see the docs: https://docs.permit.io/how-to/use-audit-logs/logs-forwarder
s
We're using the Permit Audit log API, is there a better way of filtering when we pull?
d
For the audit logs, you can filter by any of the path parameteres https://api.permit.io/scalar#tag/audit-logs/GET/v2/pdps/{proj_id}/{env_id}/audit_logs
s
Is there a “not” filter? We would want to retrieve all events but the “heartbeat” action.
d
Hi Sam, I will check on that and get back to you
Hi Sam, thanks for your patience. At this time there is no option for a "not" filter. Id suggest either (1) exporting the logs to filter appropriately or (2) Forward the logs to another logging platform where you can apply the "not" filter. See the Logs Forwarder Link I sent earlier in the thread.