Skip to content

Conversation

@j0sh3rs
Copy link

@j0sh3rs j0sh3rs commented Apr 9, 2024

This PR is expected to do three things:

  • Move the default behavior to using the pe-rbac v2 api
  • Add support for the optional validate param for group mappings
  • Add support for the optional 'display_name' param for group mappings

…gainst ldap for rbac_group, add optional Display Name parameter
@CLAassistant
Copy link

CLAassistant commented Apr 9, 2024

CLA assistant check
All committers have signed the CLA.

@aiyaabdrassova
Copy link

@j0sh3rs , I tried using the PR commit of the pltraining-rbac module to enable the v2 API on PE RBAC, but I keep getting this error:
"Couldn't prefetch provider ruby: no implicit conversion of string into integer."
Any ideas on what might be causing this?

@j0sh3rs
Copy link
Author

j0sh3rs commented Mar 20, 2025

@aiyaabdrassova Can you post a sanitized version of your inputs to the module? My guess is something with the role_ids, but I confess I don't have an ability to debug easily with this, and it doesn't seem the puppet folks are interested in merging :)

@aiyaabdrassova
Copy link

@j0sh3rs If you could take a look,
on Puppetfile I'm using a module like this:
mod 'pltraining-rbac', '0.0.10'

tried as this:
mod 'pltraining-rbac',
:git => 'https://github.com/puppetlabs/pltraining-rbac.git',
:ref => '422511043d471891bf3f4283743d77c8c28e6a12'

mod 'pltraining-rbac',
:git => 'https://github.com/j0sh3rs/puppet-enterprise-rbac.git',
:branch => 'master'

here is my conf:

@param cron_user_password

@param gitlab_puppet_user_password

@param jenkins_puppet_user_password

@param viewer_puppet_user_password

@param cron_username

@param gitlab_puppet_username

class role::all_in_one (
String $cron_user_password,
String $gitlab_puppet_user_password,
String $jenkins_puppet_user_password,
String $viewer_puppet_user_password,
String $cron_username = 'cron',
String $gitlab_puppet_username = 'gitlab_puppet'
) {
rbac_user { 'cron rbac account':
ensure => present,
name => $cron_username,
email => '[email protected]',
display_name => 'Puppet Master Cron User',
password => $cron_user_password,
roles => ['Administrators'],
}
rbac_user { 'gitlab puppet rbac account':
ensure => present,
name => $gitlab_puppet_username,
email => '[email protected]',
display_name => 'Gitlab Puppet User',
password => $gitlab_puppet_user_password,
roles => ['Code Deployers'],
}
rbac_user { 'jenkins puppet rbac account':
ensure => present,
name => 'jenkins_puppet',
email => '[email protected]',
display_name => 'Jenkins Puppet User',
password => $jenkins_puppet_user_password,
roles => ['Code Deployers'],
}
rbac_user { 'view only puppet rbac account':
ensure => present,
name => 'viewer',
email => '[email protected]',
display_name => 'View Only Puppet User',
password => $viewer_puppet_user_password,
roles => ['Viewers'],
}
}

Thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants