Skip to content

InfluxDB profile reads always fail with 401 against auth-enabled InfluxDB #364

Description

@jarsarasty

in the Map Editor Test environment,. reading a profile from InfluxDB fails when the target instance requires auth:

influxdb.exceptions.InfluxDBClientError: 401: {"error":"username required"}

raised from get_data_from_profile in src/omotes_simulator_core/entities/utility/influxdb_reader.py.

The influx_cred_map there is a local {} that's never populated, so username/password are always empty — every read is attempted anonymously. ESDL's InfluxDBProfile has no credential fields, so there's no way to supply them via the ESDL profile itself.

If production's InfluxDB doesn't require auth, production reads would silently succeed despite the same missing-credentials code path.

optimizer-worker doesn't hit this because it reads INFLUXDB_USERNAME/INFLUXDB_PASSWORD from the environment and passes them into its mesido profile reader (worker.py#L92-93). simulator-core has no equivalent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions