Skip to content

Check read permissions for regressors when triggering forecasts #1873

@BelhsanHmida

Description

@BelhsanHmida

Description

The /\<sensor\>/forecasts/trigger endpoint currently checks create-children permissions only for the target sensor:

@route("/<id>/forecasts/trigger", methods=["POST"])
@use_kwargs({"sensor": SensorIdField(data_key="id")}, location="path")
@permission_required_for_context("create-children", ctx_arg_name="sensor")

However, a forecasting pipeline may depend on regressor sensors (past and/or future regressors). At the moment, there is no explicit permission check to ensure that the requesting user has read access to all regressor sensors used by the forecast.

This means a user could potentially trigger a forecast that implicitly reads data from sensors they do not have permission to access.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions