Defined Type: wildfly::security::domain

Defined in:
manifests/security/domain.pp

Overview

This is a defined resource type for creating a security domain Please also see: docs.jboss.org/author/display/WFLY9/Security+subsystem+configuration

domain_name

Name of the security domain to be created on the Wildfly server.

login_modules

A hash with a specification of all login-modules to add to the domain. Also see the documentation of `wildfly::security::login_module` Example:

{ 'login-module-1' => {
    domain_name => 'my-security-domain',
    code => 'DirectDomain',
    flag => 'required',
    module_options => { realm => 'my-security-realm' }
  },
  'login-module-2' => {
    ...
  }
}

Parameters:

  • domain_name (Any) (defaults to: $title)
  • login_modules (Any) (defaults to: {})


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'manifests/security/domain.pp', line 22

define wildfly::security::domain(
  $domain_name   = $title,
  $login_modules = {}
) {

  wildfly::resource { "/subsystem=security/security-domain=${domain_name}":
    content => {
      'cache-type' => 'default',
    },
  }

  -> wildfly::resource { "/subsystem=security/security-domain=${domain_name}/authentication=classic":
    content => {},
  }

  create_resources('wildfly::security::login_module', $login_modules)

  Wildfly::Resource[ "/subsystem=security/security-domain=${domain_name}/authentication=classic"]
    -> Wildfly::Security::Login_module<|tag == 'wildfly'|>

}