Influxdb-client-java API: change authorization token to instance of InfluxDBClient at runtime

wgeithner
Fri, 02 Dec 2022 16:12:41 +0000
InfluxDB 2

I am using the InfluxDB 2.x JAVA client library (version 6.7.0) in an Apache Camel + Spring Boot scenario. I built my own Apache Camel component based on com.influxdb.client.InfluxDBClient. The client is initialized via spring-boot using parameterization from an application.yaml file which provides as well the authorization token. However, currently it is - to my knowledge - not possible to change the token at runtime. As a consequence, I need a “broad” token in the YAML file giving access to all buckets in an organization which might not be always desirable.

Is there a way to change the InfluxDBClinent-instance token at runtime? If not I would like to make this a feature request. For example, an additional “writePoint” method with the token in the interface might be useful.

2 posts - 2 participants