Project

General

Profile

Feature #15624

Support for filtering action data in presentation

Added by Ivan Necas about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

The action data can contain sensitive information that we should be able to filter
when showing in tasks or dynflow console page.

Associated revisions

Revision a6d72fb8 (diff)
Added by Ivan Necas about 4 years ago

Fixes #15624 - support for filtering data in presentation

This allows to set a `present` middleware to filter the data that are
shown to the user. To use it, one needs to define a `present`
middleware:

class MyMiddleware < ::Dynlfow::Middleware
def present
action.output['password'] = '******'
pass
end
end

and then load the middleware, either globally:

initializer "my_plugin.set_dynflow_middlewares", :before => :finisher_hook do
ForemanTasks.dynflow.config.on_init do |world|
world.middleware.use MyMiddleware
end
end

or inside action (or parent action) to be used with:

class MySecretAction < Dynflow::Action
middleware.use MyMiddleware
end

This should affect all the input/output data displayed to user: either
in tasks details or dynflow conosle, but should not affect the
execution.

Revision c41e083b (diff)
Added by Ivan Necas about 4 years ago

Fixes #15624 - bump dependency on dynflow

History

#1 Updated by The Foreman Bot about 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-tasks/pull/192 added

#2 Updated by Ivan Necas about 4 years ago

  • Bugzilla link set to 1354526

#3 Updated by Ivan Necas about 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF