puppetlabs/puppet · error · ArgumentError

Auth names must be provided, not numbers

Error message

Auth names must be provided, not numbers

What it means

Raised by the validate block of the `auths` property (Puppet::Property::List with :required_features => :manages_solaris_rbac) on the `user` type. Solaris authorizations are named strings like solaris.admin.usermgr; any member matching /^\d+$/ is treated as an illegal numeric ID and rejected. Only providers with the manages_solaris_rbac feature (user_role_add) expose this property.

Source

Thrown at lib/puppet/type/user.rb:566

        (`inclusive`) or the **minimum list** (`minimum`) of roles the user
        has."

      newvalues(:inclusive, :minimum)

      defaultto :minimum
    end

    newproperty(:auths, :parent => Puppet::Property::List, :required_features => :manages_solaris_rbac) do
      desc "The auths the user has.  Multiple auths should be
        specified as an array."

      def membership
        :auth_membership
      end

      validate do |value|
        if value =~ /^\d+$/
          raise ArgumentError, _("Auth names must be provided, not numbers")
        end
        raise ArgumentError, _("Auth names must be provided as an array, not a comma-separated list") if value.include?(",")
      end
    end

    newparam(:auth_membership) do
      desc "Whether specified auths should be considered the **complete list**
        (`inclusive`) or the **minimum list** (`minimum`) of auths the user
        has. This setting is specific to managing Solaris authorizations."

      newvalues(:inclusive, :minimum)

      defaultto :minimum
    end

    newproperty(:profiles, :parent => Puppet::Property::OrderedList, :required_features => :manages_solaris_rbac) do
      desc "The profiles the user has.  Multiple profiles should be
        specified as an array."

View on GitHub (pinned to e227c27540)

Solutions

  1. Pass authorization names exactly as Solaris expects: `auths => ['solaris.admin.usermgr']`
  2. Look up valid names with `auths`/`profiles -l` on the target host and mirror them
  3. Remove numeric entries from the data source

Example fix

# before
user { 'alice':
  ensure => present,
  auths  => ['1234'],
}

# after
user { 'alice':
  ensure => present,
  auths  => ['solaris.admin.usermgr', 'solaris.system.admin'],
}
Defensive patterns

Strategy: validation

Validate before calling

bad = auths.select { |a| a.to_s.match?(/\A\d+\z/) }
raise ArgumentError, "auths must be authorization names: #{bad.inspect}" unless bad.empty?

Type guard

def auth_names?(list)
  list.is_a?(Array) && list.all? { |a| a.is_a?(String) && !a.match?(/\A\d+\z/) && !a.include?(',') }
end

Prevention

When it happens

Trigger: `user { 'alice': auths => ['1234'] }` on Solaris with user_role_add; authorization lists exported as numeric keys; mixed name/number arrays where a number slips in.

Common situations: Converting /etc/user_attr entries or profiles.log data into manifests; CMDB fields that store auth IDs; hand-authored manifests guessing at auth syntax.

Related errors


AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21). Data as JSON: /api/errors/560039f854b45bf9. Report an issue: GitHub.