mule-opentelemetry-module icon indicating copy to clipboard operation
mule-opentelemetry-module copied to clipboard

Support for Authorization header to accept expression with encrypted token and text

Open dileepkumarvinayagam opened this issue 2 years ago • 0 comments

When configuring OpenTelemetry config in the application to send traces to Elastic, Authorization header works only for below scenarios

  1. Hardcoded text containing 'ApiKey <APM_Auth_Token>' <opentelemetry:headers> <opentelemetry:header key="Authorization" value="ApiKey **********" /> </opentelemetry:headers>

  2. Encrypting text - 'ApiKey <APM_Auth_Token>' and accessing it as secured property <opentelemetry:headers> <opentelemetry:header key="Authorization" value="${secure::elastic.apm.authToken}" /> </opentelemetry:headers>

And, it doesn't work when encrypting only Auth_token and passing 'ApiKey' and secured token in the value expression for Authorization header - <opentelemetry:headers> <opentelemetry:header key="Authorization" value="#['ApiKey ' ++p('secure::elastic.apm.authToken')]" /> </opentelemetry:headers> . In this scenario, OpenTelemetry doesn't raise any errors and also there's no trace sent to Elastic.

dileepkumarvinayagam avatar Dec 01 '22 17:12 dileepkumarvinayagam