Skip to content

Remove X preceding unmapped TypeURIs #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Remove X preceding unmapped TypeURIs #113

wants to merge 2 commits into from

Conversation

notque
Copy link
Contributor

@notque notque commented Apr 19, 2025

This change removes the practice of prepending an 'X' character to the typeURI field in CADF events when the resource type is not explicitly defined in the audit mapping configuration.

Problem:

Currently, when the audit middleware encounters an API path segment for which no resource mapping exists, it dynamically creates a specification. As part of this process, it prepends an 'X' to the derived resource name, which results in typeURIs like service/Xresource-name.

While this 'X' was intended as an internal indicator for developers to identify endpoints needing proper mapping, it appears in the final, customer-facing audit events. This causes confusion for users as the 'X' is undocumented and has no defined meaning from their perspective.

Solution:

The middleware already logs a clear warning message (e.g., unknown resource: (created on demand)) when it encounters an undefined resource type. This logging is sufficient for internal purposes (identifying missing mappings).

#112

@notque notque self-assigned this Apr 19, 2025
@notque
Copy link
Contributor Author

notque commented Apr 19, 2025

I'll fix tests later, I've been thinking about the broader issue about this all day, and wanted to get my thoughts down before the weekend.

@notque notque changed the title Remove X precending unmapped TypeURIs Remove X preceding unmapped TypeURIs Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant