gchq / Gaffer

A large-scale entity and relation database supporting aggregation of properties
Apache License 2.0
1.77k stars 350 forks source link

Investigate if disabling nested named operations applies in all situations or just adding #3175

Open GCHQDeveloper314 opened 6 months ago

GCHQDeveloper314 commented 6 months ago

Describe the bug The code to check for if nested named operations are allowed exists in AddNamedOperationHandler.java and checks if a new named operation to add contains further named operations.

However, it doesn't seem that any checks are done on execution. Potentially allowing for the following situation:

  1. Graph configuration is initially setup to allow nesting.
  2. Named Operation involving nesting is added.
  3. Graph configuration is then changed so that nesting is not allowed.
  4. Existing Named Operation involving nesting can still be executed (but new ones not added). Admins wouldn't be expecting this to be allowed.

Additional context The above should be investigated and if confirmed changes potentially made, or the current situation documented.