We don't think it's this cookbook's responsibility to auto-generate passwords. That's something that you should do in your wrapper cookbook. This method could be simplified to:

```ruby
def password(arg = nil)
  set_or_return(:password, arg, kind_of: [String])
end
```

People may want to use an encrypted data bag, chef-vault, plain text, or auto-generated. Nonetheless, that's an implementation detail that should be left to the developer.