This should be as easy as replacing attr_accessor :password with secret_attr :password and adding require "yast2/secret_attributes" class ... include Yast2::SecretAttributes