Skip to content

defined type jboss::securitydomain

Krzysztof Suszyński edited this page Oct 19, 2015 · 1 revision

The jboss::securitydomain defined type

This defined type can be used to add and remove JBoss security domains. A security domain consists of configurations for authentication, authorization, security mapping, and auditing. It implements Java Authentication and Authorization Service (JAAS) declarative security.

See here: https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Security_Guide/sect-Security_Domains.html

jboss::securitydomain { 'db-auth-default':
  ensure        => 'present',
  code          => 'Database',
  codeflag      => 'required',
  moduleoptions => {
    'dsJndiName'        => 'java:jboss/datasources/default-db',
    'principalsQuery'   => 'select \'password\' from users u where u.login = ?',
    'hashUserPassword'  => false,
    'hashStorePassword' => false,
    'rolesQuery'        => 'select r.name, \'Roles\' from users u
join user_roles ur on ur.user_id = u.id
join roles r on r.id = ur.role_id
where u.login = ?',
  },
}

Parameters for jboss::securitydomain:

This type uses JBoss module standard metaparameters

name parameter

This is the namevar. The name/ID of security domain.

ensure parameter

Standard Puppet ensure parameter with values: present and absent

code parameter

The code for JBoss security domain

codeflag parameter

The code flag for JBoss security domain

moduleoptions parameter

Options for given login module if form of a Puppet hash table