Forum Discussion
dirken
Nimbostratus
Sep 07, 2021log entry cut off - max size for variable or log entry?
I am logging the Java Web Token (JWT) during an Oauth login. The iRule works in general, but the JWT is cut off after 890 characters.
Cannot find any reason for it, as log entries and variables should be able to hold more than that. Here's my iRule:
when HTTP_REQUEST {
if { [HTTP::header exists Authorization] and [HTTP::header Authorization] contains "Bearer" } {
set jwt [getfield [HTTP::header Authorization] " " 2]
log local0. "JWT: Client [IP::client_addr] arrived with JWT: $jwt"
}
}
1 Reply
Sort By
- Dario_Garrido
Noctilucent
Hello Dirken.
Take into account that log entries have a maximum size per message.
"The syslog facility is limited to logging 1024 bytes per request. Longer strings will be truncated."
REF - https://clouddocs.f5.com/api/irules/log.html
Possible solutions:
- Use HSL (https://clouddocs.f5.com/api/irules/HSL.html)
- Capture traffic using tcpdump and decrypt it later on
Regards,
Dario.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects