This is a bug introduced by the 1.5 grouprole implementation. It looks like
it is fixed in the 1.6 dev. Compare the getRole(String username) method in
LDAPRoleManagement.java in 1.5 and 1.6 dev then you can see the differences.
Andy

-----Original Message-----
From: Amit Soni [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 10:37 PM
To: [EMAIL PROTECTED]
Subject: class cast exception for LDAP role


Hi all,

  Here i want to use LDAP with jetspeed for that i gone through
ldap-notes.txt file and successfully done the LDAP part. After that i
have modify my JetspeedSecurity.propeties file also it look like ::

services.JetspeedSecurity.classname=org.apache.jetspeed.services.security.Je
tspeedDBSecurityService

#########################################
# Programmatic Cascade Delete Service   #
#########################################

services.JetspeedSecurity.programmatic.cascade.delete=false

#########################################
# Authentication Service                #
#########################################

#services.PortalAuthentication.classname=org.apache.jetspeed.services.securi
ty.turbine.TurbineAuthentication

# ++ Start LDAP for netcore
services.PortalAuthentication.classname=org.apache.jetspeed.services.securit
y.ldap.LDAPAuthentication
# -- Stop LDAP for netcore

#########################################
# Authorization Service                 #
#########################################

services.PortalAccessController.classname=org.apache.jetspeed.services.secur
ity.registry.RegistryAccessController
#services.PortalAccessController.classname=org.apache.jetspeed.services.secu
rity.turbine.TurbineAccessController
#services.PortalAccessController.classname=org.apache.jetspeed.services.secu
rity.nosecurity.NoSecurityAccessController

#########################################
# User Management Service               #
#########################################

Eservices.UserManagement.classname=org.apache.jetspeed.services.security.tur
bine.TurbineUserManagement
#services.JetspeedSecurity.user.class=org.apache.jetspeed.om.security.BaseJe
tspeedUser

# ++ Start LDAP for netcore
services.UserManagement.classname=org.apache.jetspeed.services.security.ldap
.LDAPUserManagement 
services.JetspeedSecurity.user.class=org.apache.jetspeed.om.security.ldap.LD
APUser 
# -- Stop for netcore 

#########################################
# Role Management Service               #
#########################################

#services.RoleManagement.classname=org.apache.jetspeed.services.security.tur
bine.TurbineRoleManagement
#services.JetspeedSecurity.role.class=org.apache.jetspeed.om.security.BaseJe
tspeedRole

services.JetspeedSecurity.role.default=user

# ++ start LDAP for netcore
services.RoleManagement.classname=org.apache.jetspeed.services.security.ldap
.LDAPRoleManagement 
services.JetspeedSecurity.role.class=org.apache.jetspeed.om.security.ldap.LD
APRole 
# -- stop LDAP for netcore

#########################################
# Group Management Service              #
#########################################

#services.GroupManagement.classname=org.apache.jetspeed.services.security.tu
rbine.TurbineGroupManagement
#services.JetspeedSecurity.group.class=org.apache.jetspeed.om.security.BaseJ
etspeedGroup

# ++ start LDAP for netcore  
services.GroupManagement.classname=org.apache.jetspeed.services.security.lda
p.LDAPGroupManagement   
services.JetspeedSecurity.group.class=org.apache.jetspeed.om.security.ldap.L
DAPGroup
# -- stop LDAP for netcore

#########################################
# Permission Management Service        #
#########################################

#services.PermissionManagement.classname=org.apache.jetspeed.services.securi
ty.turbine.TurbinePermissionManagement
#services.JetspeedSecurity.permission.class=org.apache.jetspeed.om.security.
BaseJetspeedPermission

# ++ start LDAP for  netcore
services.PermissionManagement.classname=org.apache.jetspeed.services.securit
y.ldap.LDAPPermissionManagement   
services.JetspeedSecurity.permission.class=org.apache.jetspeed.om.security.l
dap.LDAPPermission
# -- stop LDAP for netcore

#########################################
# Security Cache Service                #
#########################################

services.SecurityCache.classname=org.apache.jetspeed.services.security.Secur
ityCacheImpl

# This is used by the SecurityService to make the password checking
# secure. When enabled, passwords are transformed by a one-way
# function into a sequence of bytes that is base64 encoded.
# It is impossible to guess the plain-text form of the password
# from the representation. When user logs in, the entered password
# is transformed the same way and then compared with stored value.
#
# Default: false
#

services.JetspeedSecurity.secure.passwords=false

#
# This property lets you choose what digest algorithm will be used
# for encrypting passwords. Check documentation of your JRE for
# available algorithms.
#
# Default: SHA
#

services.JetspeedSecurity.secure.passwords.algorithm=SHA

# Role(s) to assign to new user.  Multiple Role must be comma separated.
services.JetspeedSecurity.newuser.roles=user

# Default permission(s) when object have no permissions defined
# The follow permissions are define in the default Jetspeed
installation:
#     view, customize, minimize, maximize, close
#     * = All permissions
services.JetspeedSecurity.permission.default.anonymous=view
services.JetspeedSecurity.permission.default.loggedin=*

# During logon, username and password can be case sensitive or case
insensitive
# This option configures the logon username and password to be case
sensitive or insensitive
# if its case insensitive, then "logon.casesensitive.upper" controls
whether the username and
# password or converted to upper or lower case before passing on to the
database
services.JetspeedSecurity.caseinsensitive.username=false
services.JetspeedSecurity.caseinsensitive.password=false
services.JetspeedSecurity.caseinsensitive.upper=true

# Auto-Account-Disable Feature
services.JetspeedSecurity.logon.auto.disable=false

# 3 logon strikes per 300 seconds and your out
services.JetspeedSecurity.logon.strike.count=3
services.JetspeedSecurity.logon.strike.interval=300
# dont allow more than 10 over any time period
services.JetspeedSecurity.logon.strike.max=10

# anonymous user
services.JetspeedSecurity.user.anonymous=anon

# Caching
services.JetspeedSecurity.caching.enable=true

#
# Number of days until password expires. To disable
# this feature, set it to 0.
#
# Default:  0
#
services.JetspeedSecurity.password.expiration.period=0

#
# Comma separated list of system users. System users cannot 
# be deleted because they are essential to security service.
#
# Default: admin, anon
#
services.JetspeedSecurity.system.users = admin
services.JetspeedSecurity.system.users = anon

#
# Comma separated list of system roles. System roles cannot 
# be deleted because they are essential to security service.
#
# Default: user, admin
#
services.JetspeedSecurity.system.roles = user
services.JetspeedSecurity.system.roles = admin

#
# Comma separated list of system groups. System groups cannot 
# be deleted because they are essential to security service.
#
# Default: jetspeed
#
services.JetspeedSecurity.system.groups = Jetspeed

#
# Comma separated list of system permissions. System permissions cannot 
# be deleted because they are essential to security service.
#
# Default: <none>
#
services.JetspeedSecurity.system.permissions =

#
# Comma separated list of administrative roles. Only users 
# with administratives roles can perform secured portlet actions
#
# Default: admin
#
services.JetspeedSecurity.admin.roles = admin

#########################################
# Action buttons                        #
#########################################
services.JetspeedSecurity.actions.anon.disable=true
services.JetspeedSecurity.actions.allusers.disable=false

    
#########################################   
# LDAP Service                          #   
#########################################   
services.ldap.classname=org.apache.jetspeed.services.ldap.LDAPService   
#services.ldap.host=127.0.0.0
services.ldap.host=XXXXXXXXXXX
services.ldap.port=389
services.ldap.sslport=636   
services.ldap.basedn=ou/jetspeed%o/apache
services.ldap.managerdn=cn/ldapadmin%ou/jetspeed%o/apache
services.ldap.password=XXXXXXXX
services.ldap.anonymousbind=false   
services.ldap.securityauthentication=simple   
#services.ldap.securityprotocol=ssl   
#services.ldap.socketfactory=javax.net.ssl.SSLSocketFactory   
#services.ldap.jndiprovider=com.sun.jndi.ldap.LdapCtxFactory   
#services.ldap.saslclientpckgs=   
services.ldap.limit=0   
services.ldap.timeout=0   
services.ldap.version=3   
LocalWords:  SHA

but when i run the default page then in that page it gives me the
ShowError.vm page and the error like ::

java.lang.ClassCastException:org.apache.jetspeed.om.security.ldap.LDAPRole

-->  Jetspeed Versioin :: jetspeed 1.5 (Download Binary file)
-->  Os :: Fedora Linux 1
-->  AP server :: Jboss 3.2.5
-->  Ldap version :: 2.1.22-8

so any one of u have any solution then pls help me.

Regards,
Amit Soni


----------------------------------------------------------
Netcore's New Website
http://www.netcore.co.in
----------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to