{"record":{"id":"560039f854b45bf9","repo":"puppetlabs/puppet","slug":"auth-names-must-be-provided-not-numbers","errorCode":null,"errorMessage":"Auth names must be provided, not numbers","messagePattern":"Auth names must be provided, not numbers","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/type/user.rb","lineNumber":566,"sourceCode":"        (`inclusive`) or the **minimum list** (`minimum`) of roles the user\n        has.\"\n\n      newvalues(:inclusive, :minimum)\n\n      defaultto :minimum\n    end\n\n    newproperty(:auths, :parent => Puppet::Property::List, :required_features => :manages_solaris_rbac) do\n      desc \"The auths the user has.  Multiple auths should be\n        specified as an array.\"\n\n      def membership\n        :auth_membership\n      end\n\n      validate do |value|\n        if value =~ /^\\d+$/\n          raise ArgumentError, _(\"Auth names must be provided, not numbers\")\n        end\n        raise ArgumentError, _(\"Auth names must be provided as an array, not a comma-separated list\") if value.include?(\",\")\n      end\n    end\n\n    newparam(:auth_membership) do\n      desc \"Whether specified auths should be considered the **complete list**\n        (`inclusive`) or the **minimum list** (`minimum`) of auths the user\n        has. This setting is specific to managing Solaris authorizations.\"\n\n      newvalues(:inclusive, :minimum)\n\n      defaultto :minimum\n    end\n\n    newproperty(:profiles, :parent => Puppet::Property::OrderedList, :required_features => :manages_solaris_rbac) do\n      desc \"The profiles the user has.  Multiple profiles should be\n        specified as an array.\"","sourceCodeStart":548,"sourceCodeEnd":584,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/user.rb#L548-L584","documentation":"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.","triggerScenarios":"`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.","commonSituations":"Converting /etc/user_attr entries or profiles.log data into manifests; CMDB fields that store auth IDs; hand-authored manifests guessing at auth syntax.","solutions":["Pass authorization names exactly as Solaris expects: `auths => ['solaris.admin.usermgr']`","Look up valid names with `auths`/`profiles -l` on the target host and mirror them","Remove numeric entries from the data source"],"exampleFix":"# before\nuser { 'alice':\n  ensure => present,\n  auths  => ['1234'],\n}\n\n# after\nuser { 'alice':\n  ensure => present,\n  auths  => ['solaris.admin.usermgr', 'solaris.system.admin'],\n}","handlingStrategy":"validation","validationCode":"bad = auths.select { |a| a.to_s.match?(/\\A\\d+\\z/) }\nraise ArgumentError, \"auths must be authorization names: #{bad.inspect}\" unless bad.empty?","typeGuard":"def auth_names?(list)\n  list.is_a?(Array) && list.all? { |a| a.is_a?(String) && !a.match?(/\\A\\d+\\z/) && !a.include?(',') }\nend","tryCatchPattern":null,"preventionTips":["Verify authorization names with `auths` on the target Solaris host","Keep RBAC exports name-based","Unit-test manifest data for all-numeric entries"],"tags":["puppet","user-resource","solaris-rbac","authorizations","argument-validation"],"backgroundTag":"numeric-id-instead-of-name","analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}