The Jenkins OpenTelemetry Plugin captures key security events, metrics, and pieces of information.
Successful and failed log in events are captured as structured log messages:
- Login success
- Attributes
enduser.id
: user identifier, the value ofhudson.model.User.getId()
if available or the username passed inj.s.SecurityListener.loggedIn(username)
event.category
:authentication
event.action
:user_login
event.outcome
:success
net.peer.ip
:jakarta.servlet.ServletRequest.getRemoteAddr()
- Body
- Example: "Successful login of user 'admin' from 127.0.0.1"
- Attributes
- Login failure
- Attributes
enduser.id
: username passed inj.s.SecurityListener.failedToLogIn(username)
event.category
:authentication
event.action
:user_login
event.outcome
:failure
- Body
- Example: "Successful login of user 'admin'"
- Attributes
Known limitations:
- Some Jenkins authentication plugins such as the Jenkins GitHub Authentication Plugin won't capture the "Successful login" or the "Failed login" event because they don't invoke the
SecurityListener.loggedIn(username)
or theSecurityListener.failedLoggedIn(username)
APIs, - The remote IP address is not captured on the "Failed login" event due to restrictions on Jenkins APIs.
Metrics | Unit | Label key | Label Value | Description |
---|---|---|---|---|
login | 1 | Login count | ||
login_success | 1 | Successful login count | ||
login_failure | 1 | Failed login count |
The traces of all authenticated Jenkins HTTP requests are enriched with the attribute enduser.id
.