You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// LDAP config
grails.plugin.springsecurity.providerNames = ['ldapAuthProvider', 'anonymousAuthenticationProvider'] // specify this when you want to skip attempting to load from db and only use LDAP
grails.plugin.springsecurity.ldap.context.managerDn = 'CN=someuser,OU=Development,OU=Staff,DC=subdomain,DC=domain,DC=com'
grails.plugin.springsecurity.ldap.context.managerPassword = 'somepassword'
grails.plugin.springsecurity.ldap.context.server = 'ldap://subdomaindc01.subdomain.domain.com:389 ldap://subdomaindc02.subdomain.domain.com:389'
grails.plugin.springsecurity.ldap.authorities.ignorePartialResultException = true // typically needed for Active Directory
grails.plugin.springsecurity.ldap.search.filter = '(&(objectclass=user)(sAMAccountName={0})(memberOf=cn=Comms-Team,ou=groups,ou=staff,dc=subdomain,dc=domain,dc=com))' // for Active Directory you need this
grails.plugin.springsecurity.ldap.search.searchSubtree = true
grails.plugin.springsecurity.ldap.auth.hideUserNotFoundExceptions = false
grails.plugin.springsecurity.ldap.search.attributesToReturn = ['mail', 'displayName'] // extra attributes you want returned; see below for custom classes that access this data
//grails.plugin.springsecurity.ldap.search.base = 'ou=staff,dc=subdomain,dc=domain,dc=com'
development {
grails.plugin.springsecurity.ldap.search.base = 'ou=staff,dc=subdomain,dc=domain,dc=com'
}
production {
grails.plugin.springsecurity.ldap.search.base = 'ou=staff,dc=subdomain,dc=domain,dc=com'
}
When I remove test environment configuration above everything works fine but once I add that in trying to access localhost:8080/app - which ends up in the index.gsp page - I don't get anymore the login page - but instead:
HTTP Status 401 - Full authentication is required to access this resource
However, when I use localhost:8080/app//login/auth it brings up the login page but login keeps failing at this point.
All of this is under dev environment so mock should not even be affecting this but somehow it is and I have no idea how it is affecting it.
The text was updated successfully, but these errors were encountered:
I have the following config in Config.groovy:
// LDAP config
grails.plugin.springsecurity.providerNames = ['ldapAuthProvider', 'anonymousAuthenticationProvider'] // specify this when you want to skip attempting to load from db and only use LDAP
grails.plugin.springsecurity.ldap.context.managerDn = 'CN=someuser,OU=Development,OU=Staff,DC=subdomain,DC=domain,DC=com'
grails.plugin.springsecurity.ldap.context.managerPassword = 'somepassword'
grails.plugin.springsecurity.ldap.context.server = 'ldap://subdomaindc01.subdomain.domain.com:389 ldap://subdomaindc02.subdomain.domain.com:389'
grails.plugin.springsecurity.ldap.authorities.ignorePartialResultException = true // typically needed for Active Directory
grails.plugin.springsecurity.ldap.search.filter = '(&(objectclass=user)(sAMAccountName={0})(memberOf=cn=Comms-Team,ou=groups,ou=staff,dc=subdomain,dc=domain,dc=com))' // for Active Directory you need this
grails.plugin.springsecurity.ldap.search.searchSubtree = true
grails.plugin.springsecurity.ldap.auth.hideUserNotFoundExceptions = false
grails.plugin.springsecurity.ldap.search.attributesToReturn = ['mail', 'displayName'] // extra attributes you want returned; see below for custom classes that access this data
//grails.plugin.springsecurity.ldap.search.base = 'ou=staff,dc=subdomain,dc=domain,dc=com'
development {
grails.plugin.springsecurity.ldap.search.base = 'ou=staff,dc=subdomain,dc=domain,dc=com'
}
production {
grails.plugin.springsecurity.ldap.search.base = 'ou=staff,dc=subdomain,dc=domain,dc=com'
}
test {
grails.plugin.springsecurity.providerNames = null
grails.plugin.springsecurity.mock.active = true
grails.plugin.springsecurity.ldap.active = false
grails.plugin.springsecurity.mock.fullName = "Test User"
grails.plugin.springsecurity.mock.email = "[email protected]"
grails.plugin.springsecurity.mock.username = "testUser"
}
// Added by the Spring Security Core plugin:
grails.plugin.springsecurity.userLookup.userDomainClassName = 'com.app.login.User'
grails.plugin.springsecurity.userLookup.authorityJoinClassName = 'com.app.login.UserRole'
grails.plugin.springsecurity.authority.className = 'com.app.login.Role'
grails.plugin.springsecurity.controllerAnnotations.staticRules = [
'/': ['IS_AUTHENTICATED_FULLY'],
'/index': ['IS_AUTHENTICATED_FULLY'],
'/index.gsp': ['IS_AUTHENTICATED_FULLY'],
'//js/': ['permitAll'],
'//css/': ['permitAll'],
'//images/': ['permitAll'],
'/**/favicon.ico': ['permitAll']
]
Also the following in the BuildConfig.groovy:
compile ":spring-security-core:2.0-RC2"
compile ":spring-security-ldap:2.0-RC2"
compile ":spring-security-mock:2.0-RC2"
Grails is 2.3.7.
When I remove test environment configuration above everything works fine but once I add that in trying to access localhost:8080/app - which ends up in the index.gsp page - I don't get anymore the login page - but instead:
HTTP Status 401 - Full authentication is required to access this resource
However, when I use localhost:8080/app//login/auth it brings up the login page but login keeps failing at this point.
All of this is under dev environment so mock should not even be affecting this but somehow it is and I have no idea how it is affecting it.
The text was updated successfully, but these errors were encountered: