Instrumenting Spring Security (#2011)

* First draft of instrumenting Spring Security

* Create events based on Authentication not SecurityContext

* Simplifying security config

* Checkstyle reformat

* Create DocumentedSpan and EventValue for Spring Security instrumentation

* Adding spring-security-bom to ensure the right dependencies are used.

* TracingSecurityContextChangedListenerTests

* Adding integration tests

* Deleting spring-cloud-sleuth-sample-security

* Checkstyle, license, javadoc

* Inlining SleuthSecuritySpan methods

* Deleting javadoc links from DocumentedSpan

* Updating auto-generated docs
This commit is contained in:
Jonatan Ivanov
2021-08-25 15:44:45 -07:00
committed by GitHub
parent 1f986bb93f
commit f3051483d7
14 changed files with 672 additions and 7 deletions

View File

@@ -532,6 +532,22 @@ Fully qualified name of the enclosing class `org.springframework.cloud.sleuth.in
|method|Method name that got annotated with @Scheduled.
|===
=== Security Context Change
> Indicates that a SecurityContextChangedEvent happened during the current span.
**Span name** `Security Context Change`.
Fully qualified name of the enclosing class `org.springframework.cloud.sleuth.instrument.security.SleuthSecuritySpan`
.Event Values
|===
|Name | Description
|Authentication cleared %s|Event created when an Authentication object is removed from the SecurityContext. (since the name contains `%s` the final value will be resolved at runtime)
|Authentication replaced %s|Event created when an Authentication object is replaced with a new one in the SecurityContext. (since the name contains `%s` the final value will be resolved at runtime)
|Authentication set %s|Event created when an Authentication object is added to the SecurityContext. (since the name contains `%s` the final value will be resolved at runtime)
|===
=== Session Create Span
> Span created when a new session has to be created.