environments:
    production:
        grails:
                serverURL: '<%= node['ciscat']['server_url'] %>' #if apache is not set up, only tomcat
                #serverURL: 'http://<url_of_apache_or_tomcat>/CCPD' #if apache is set up use
                #serverURL: 'https://<url_of_apache_or_tomcat>/CCPD' #if HTTPS is set up use
        server:
            'contextPath': '/CCPD'
        dataSource:
            dbCreate: update

            #MySQL DB Settings

            driverClassName: org.mariadb.jdbc.Driver
            dialect: org.hibernate.dialect.MySQL5InnoDBDialect
            url: jdbc:mysql://<%= @mysql_host %>:3306/<%= node['mysql']['mysql_database'] %>
            username: <%= @mysql_user %>
            password: <%= @mysql_password %>

            properties:
                  jmxEnabled: true
                  initialSize: 5
                  maxActive: 50
                  minIdle: 5
                  maxIdle: 25
                  maxWait: 10000
                  maxAge: 600000
                  #validationQuery: SELECT 1 from DUAL #ORACLE
                  validationQuery: SELECT 1 #Non-Oracle
                  validationQueryTimeout: 3
                  validationInterval: 15000
                  dbProperties:
                        autoReconnect: true

database: MySQL

---
grails:
  plugin:
        springsecurity:
            providerNames: ['ldapAuthProvider','rememberMeAuthenticationProvider','restAuthenticationProvider','anonymousAuthenticationProvider']
            ldap:
                active: true
                context:
                    managerDn: '<%= @ldap_user %>'
                    managerPassword: '<%= @ldap_password %>'
                    server: '<%= @ldap_host %>'
                authorities:
                    ignorePartialResultException: true
                    retrieveDatabaseRoles: false
                    retrieveGroupRoles: true
                    groupSearchBase: '<%= @ldap_group_base %>'
                    groupSearchFilter: 'member={0}'
                    groupRoleAttribute: 'CN'
                    clean:
                        prefix: 'AD.SEC.CISCAT.'
                search:
                    base: '<%= @ldap_user_base %>'
                    filter: 'sAMAccountName={0}'
                auth:
                    hideUserNotFoundExceptions: false
                authenticator:
                    passwordAttributeName: 'userPassword'
                mapper:
                   passwordAttributeName: 'userPassword'
                useRememberMe: true
            rememberMe:
                persistent: true
