Skip to content

Ability to customize the AuthorizationObservationConvention #12534

Closed
@braunsonm

Description

@braunsonm

Expected Behavior

The ability to customize the obersations made by spring security (adjust low/high cardinality keys, etc). For instance I would like to add the high cardinality key of the Principal#getName() to my traces.

Current Behavior

You cannot currently customize the provided AuthorizationObservationConvention without registering your own ObersationRegistry which replaces the entire registry.

Context

Here is where the AuthorizationObservationConvention is currently used and instantiated as part of the class:

private final AuthorizationObservationConvention convention = new AuthorizationObservationConvention();

In spring boot, they made adjustments ahead of the 3.0 release to make their own observation conventions customizable for HTTP clients. It would make sense for spring-security to do the same thing here and allow providing your own conventions/overridden conventions.

See spring boots implementation here: spring-projects/spring-boot@07766c4

Metadata

Metadata

Assignees

Labels

in: coreAn issue in spring-security-corestatus: ideal-for-contributionAn issue that we actively are looking for someone to help us withtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions