{"record":{"id":"b704f0f16193cc98","repo":"puppetlabs/puppet","slug":"profile-names-must-be-provided-not-numbers","errorCode":null,"errorMessage":"Profile names must be provided, not numbers","messagePattern":"Profile names must be provided, not numbers","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/type/user.rb","lineNumber":592,"sourceCode":"        (`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.\"\n\n      def membership\n        :profile_membership\n      end\n\n      validate do |value|\n        if value =~ /^\\d+$/\n          raise ArgumentError, _(\"Profile names must be provided, not numbers\")\n        end\n        raise ArgumentError, _(\"Profile names must be provided as an array, not a comma-separated list\") if value.include?(\",\")\n      end\n    end\n\n    newparam(:profile_membership) do\n      desc \"Whether specified roles should be treated as the **complete list**\n        (`inclusive`) or the **minimum list** (`minimum`) of roles\n        of which the user is a member.\"\n\n      newvalues(:inclusive, :minimum)\n\n      defaultto :minimum\n    end\n\n    newproperty(:keys, :parent => Puppet::Property::KeyValue, :required_features => :manages_solaris_rbac) do\n      desc \"Specify user attributes in an array of key = value pairs.\"\n","sourceCodeStart":574,"sourceCodeEnd":610,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/user.rb#L574-L610","documentation":"Raised by the validate block of the `profiles` property (Puppet::Property::OrderedList with :required_features => :manages_solaris_rbac) on the `user` type. Solaris RBAC profiles are named execution profiles; a member matching /^\\d+$/ is rejected as an illegal numeric identifier. Because the parent is OrderedList, order matters for profiles and is preserved.","triggerScenarios":"`user { 'alice': profiles => ['7'] }` on Solaris with user_role_add; numeric profile keys from a data export; profiles confused with UIDs or GIDs in hand-written manifests.","commonSituations":"Porting /etc/user_attr 'profiles=' stanzas that used numeric references; CMDB role IDs reused for profiles; onboarding scripts generating manifests from spreadsheets.","solutions":["Pass profile names: `profiles => ['System Administrator']`","Verify exact profile names with `profiles -l` on the target (they are case-sensitive)","Remove numeric entries from the source data"],"exampleFix":"# before\nuser { 'alice':\n  ensure    => present,\n  profiles  => ['7'],\n}\n\n# after\nuser { 'alice':\n  ensure    => present,\n  profiles  => ['System Administrator', 'Basic Solaris User'],\n}","handlingStrategy":"validation","validationCode":"bad = profiles.select { |p| p.to_s.match?(/\\A\\d+\\z/) }\nraise ArgumentError, \"profiles must be names: #{bad.inspect}\" unless bad.empty?","typeGuard":"def profile_names?(list)\n  list.is_a?(Array) && list.all? { |p| p.is_a?(String) && !p.match?(/\\A\\d+\\z/) && !p.include?(',') }\nend","tryCatchPattern":null,"preventionTips":["Check exact profile names with `profiles -l`; they are case-sensitive","Keep profile order intentional — profiles is an OrderedList","Reject numeric profile data at the CMDB boundary"],"tags":["puppet","user-resource","solaris-rbac","profiles","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"}