This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/197/

Question: are we certain that sanitization will always be synchronous? I can't think of any examples where it wouldn't be, but I do wonder if we should plan for the future, just in case.


src/rolekit/server/rolebase.py (Diff revision 1)
def apply_values(self, values):
586
    # emit property changed
587
    def _emit_property_changed(self, prop, value):
588
        # use value from get_dbus_property, it is already converted for dbus
589
        if prop in self._DEFAULTS:
590
            dbus_changed = dbus.Dictionary(signature="sv")
591
            dbus_changed[prop] = self.get_dbus_property(self, prop)
592
            self.PropertiesChanged(DBUS_INTERFACE_ROLE_INSTANCE,
593
                                   dbus_changed, [ ])

I think this belongs in review #196 not here.


src/rolekit/server/rolebase.py (Diff revision 1)
1190
        if hasattr(self, "do_sanitize"):
1191
            try:
1192
                self.do_sanitize()
1193
            except:
1194
                raise
1195
            else:
1196
                self._settings.write()

We should just call self.do_sanitize() and catch NameError exceptions.


- Stephen Gallagher


On August 26th, 2015, 2:01 p.m. UTC, Thomas Woerner wrote:

Review request for RoleKit Mailing List, Miloslav Trmac, Nils Philippsen, Stephen Gallagher, and Thomas Woerner.
By Thomas Woerner.

Updated Aug. 26, 2015, 2:01 p.m.

Bugs: 33
Repository: rolekit

Description

Sanitize can be used to for example forget passwords of role instances or
to reset other sensitive data from the settings.

The sanitization is done in the role, as rolekit does not know which
settings need to be reset. The role needs to implement the do_sanitize
method for this.

This is currently implemented for password in the databaseserver role and
for dm_password in the domaincontroller role.

Fixes https://github.com/libre-server/rolekit/issues/33

Diffs

  • config/roles/databaseserver/role.py (aff6b12fb632d100674392b89427cfea93fb33e0)
  • config/roles/domaincontroller/role.py (36f1a67cdb187c6433fb2b70f8473ba3c66007ed)
  • doc/xml/rolectl.xml (6048870abcf21942d37a87275029ad3fed311258)
  • doc/xml/rolekit.dbus.xml (3ec00333b8ed87fad7f26ffbb2f835135aef2b07)
  • shell-completion/bash/rolectl (b32b71e7713d7a40236db07faae8ecca481753dd)
  • src/rolectl (ade941d99ce04d62b17714ee4c624d2b73249281)
  • src/rolekit/client.py (0bb65cc920e1d65c4765dd9ec0bacc16c474c27f)
  • src/rolekit/server/rolebase.py (121a9b706ee2dda37eff116b8fc7a50143b2e1a6)

View Diff