Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Problem with configuration of Grouper Plugin for Shibboleth

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Problem with configuration of Grouper Plugin for Shibboleth


Chronological Thread 
  • From: "Jie Lv" <>
  • To: "'Tom Zeller'" <>
  • Cc: <>
  • Subject: RE: [grouper-users] Problem with configuration of Grouper Plugin for Shibboleth
  • Date: Thu, 13 Oct 2011 11:04:04 +0800

> My suggestion at this point is to replace the grouper specific
> attribute resolver plugins to help locate the issue.

In attribute-resolver.xml, when I configured the isMemberOf attribute to use
an Static DataConnector, the aacli.sh command worked well:
My configuration was:
<resolver:AttributeDefinition id="isMemberOf" xsi:type="Simple"
xmlns="urn:mace:shibboleth:2.0:resolver:ad"
sourceAttributeID="name">
<resolver:Dependency ref="static_attr" />

<resolver:AttributeEncoder xsi:type="SAML1String"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
name="name" />

<resolver:AttributeEncoder xsi:type="SAML2String"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
name="name" friendlyName="name" />
</resolver:AttributeDefinition>
<resolver:DataConnector id="static_attr" xsi:type="Static"
xmlns="urn:mace:shibboleth:2.0:resolver:dc">
<Attribute id="carsifed:institution">
<Value>pku_v4</Value>
</Attribute>
<Attribute id="name">
<Value>name_10101</Value>
</Attribute>
</resolver:DataConnector>

The result of the aacli.sh command was:
[KKK@localhost
bin]# ./aacli.sh --configDir=../conf/ --principal=10101

<?xml version="1.0" encoding="UTF-8"?><saml2:AttributeStatement
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:Attribute FriendlyName="name" Name="name"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:type="xs:string">name_10101</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>

But when I configured the isMemberOf attribute to use a Grouper
DataConnector, the aacli.sh command failed:
My configuration was:
<resolver:DataConnector id="MemberDataConnector2"
xsi:type="grouper:MemberDataConnector">
<grouper:Attribute id="groups" />
</resolver:DataConnector>
<resolver:AttributeDefinition id="isMemberOf" xsi:type="grouper:Group"
sourceAttributeID="groups" >
<resolver:Dependency ref="MemberDataConnector2" />
<grouper:Attribute id="name" />
</resolver:AttributeDefinition>
The result of the aacli.sh command was:
[root@localhost
bin]# ./aacli.sh --configDir=../conf/ --principal=10101
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'shibboleth.AttributeResolver': Invocation of init method failed;
nested exception is
edu.internet2.middleware.shibboleth.common.service.ServiceException:
Configuration was not loaded for shibboleth.AttributeResolver service, error
creating components.
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:429)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:728)
at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:380)
at
edu.internet2.middleware.shibboleth.common.attribute.AttributeAuthorityCLI.l
oadConfigurations(AttributeAuthorityCLI.java:199)
at
edu.internet2.middleware.shibboleth.common.attribute.AttributeAuthorityCLI.m
ain(AttributeAuthorityCLI.java:90)
Caused by:
edu.internet2.middleware.shibboleth.common.service.ServiceException:
Configuration was not loaded for shibboleth.AttributeResolver service, error
creating components.
at
edu.internet2.middleware.shibboleth.common.config.BaseService.loadContext(Ba
seService.java:192)
at
edu.internet2.middleware.shibboleth.common.config.BaseReloadableService.init
ialize(BaseReloadableService.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 14 more
Caused by: java.lang.NullPointerException
at
edu.internet2.middleware.grouper.util.GrouperUtil.propertiesFromResourceName
(GrouperUtil.java:7145)
at
edu.internet2.middleware.grouper.util.GrouperUtil.propertiesFromResourceName
(GrouperUtil.java:6929)
at
edu.internet2.middleware.grouper.util.GrouperUtil.logDirsCreateIfNotDone(Gro
uperUtil.java:543)
at
edu.internet2.middleware.grouper.util.GrouperUtil.getLog(GrouperUtil.java:52
3)
at
edu.internet2.middleware.grouper.util.GrouperUtil.<clinit>(GrouperUtil.java:
6329)
at
edu.internet2.middleware.grouper.GrouperSession.<clinit>(GrouperSession.java
:100)
at
edu.internet2.middleware.grouper.shibboleth.dataConnector.BaseGrouperDataCon
nector.getGrouperSession(BaseGrouperDataConnector.java:194)
at
edu.internet2.middleware.grouper.shibboleth.dataConnector.BaseGrouperDataCon
nector.initialize(BaseGrouperDataConnector.java:115)
at
edu.internet2.middleware.grouper.shibboleth.dataConnector.MemberDataConnecto
r.initialize(MemberDataConnector.java:112)
at
edu.internet2.middleware.grouper.shibboleth.dataConnector.config.BaseGrouper
DataConnectorFactoryBean.populateDataConnector(BaseGrouperDataConnectorFacto
ryBean.java:72)
at
edu.internet2.middleware.grouper.shibboleth.dataConnector.config.MemberDataC
onnectorFactoryBean.createInstance(MemberDataConnectorFactoryBean.java:40)
at
org.springframework.beans.factory.config.AbstractFactoryBean.afterProperties
Set(AbstractFactoryBean.java:130)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:423)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:728)
at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:380)
at
edu.internet2.middleware.shibboleth.common.config.BaseService.loadContext(Ba
seService.java:171)
... 22 more

In idp-process.log, I found the following information:
10:59:29.633 - DEBUG [org.apache.velocity:98] - Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
10:59:29.635 - DEBUG [org.apache.velocity:98] - Created '20' parsers.
10:59:29.635 - DEBUG [org.apache.velocity:98] - Velocimacro :
"velocimacro.library" is not set. Trying default library: VM_global_l
ibrary.vm
10:59:29.636 - DEBUG [org.apache.velocity:98] - Velocimacro : Default
library not found.
10:59:29.636 - DEBUG [org.apache.velocity:98] - Velocimacro : allowInline =
true : VMs can be defined inline in templates
10:59:29.636 - DEBUG [org.apache.velocity:98] - Velocimacro :
allowInlineToOverride = false : VMs defined inline may NOT replace pre
vious VM definitions
10:59:29.636 - DEBUG [org.apache.velocity:98] - Velocimacro :
allowInlineLocal = false : VMs defined inline will be global in scope
if allowed.
10:59:29.637 - DEBUG [org.apache.velocity:98] - Velocimacro : autoload off :
VM system will not automatically reload global library
macros
10:59:29.689 - WARN
[edu.internet2.middleware.shibboleth.common.config.service.ServletContextAtt
ributeExporter:74] - This service ma
y only be used when services are loaded within a web application context.
10:59:29.702 - INFO
[edu.internet2.middleware.shibboleth.common.config.BaseService:158] -
Loading new configuration for service shib
boleth.AttributeResolver
10:59:29.771 - INFO
[edu.internet2.middleware.shibboleth.common.config.attribute.resolver.Abstra
ctResolutionPlugInBeanDefinitionPars
er:55] - Parsing configuration for PrincipalConnector plugin with ID:
shibTransient
10:59:29.771 - INFO
[edu.internet2.middleware.shibboleth.common.config.attribute.resolver.Abstra
ctResolutionPlugInBeanDefinitionPars
er:55] - Parsing configuration for PrincipalConnector plugin with ID:
saml1Unspec
10:59:29.772 - INFO
[edu.internet2.middleware.shibboleth.common.config.attribute.resolver.Abstra
ctResolutionPlugInBeanDefinitionPars
er:55] - Parsing configuration for PrincipalConnector plugin with ID:
saml2Transient
10:59:29.783 - INFO
[edu.internet2.middleware.shibboleth.common.config.attribute.resolver.Abstra
ctResolutionPlugInBeanDefinitionPars
er:55] - Parsing configuration for DataConnector plugin with ID:
MemberDataConnector2
10:59:29.784 - DEBUG
[edu.internet2.middleware.grouper.shibboleth.util.AttributeIdentifierBeanDef
initionParser:49] - Setting id of e
lement 'Attribute' to 'groups'
10:59:29.784 - DEBUG
[edu.internet2.middleware.grouper.shibboleth.util.AttributeIdentifierBeanDef
initionParser:53] - Setting source
of element 'Attribute' to 'g:gsa'
10:59:29.796 - INFO
[edu.internet2.middleware.shibboleth.common.config.attribute.resolver.Abstra
ctResolutionPlugInBeanDefinitionPars
er:55] - Parsing configuration for AttributeDefinition plugin with ID:
transientId
10:59:29.808 - INFO
[edu.internet2.middleware.shibboleth.common.config.attribute.resolver.Abstra
ctResolutionPlugInBeanDefinitionPars
er:55] - Parsing configuration for AttributeDefinition plugin with ID:
isMemberOf
10:59:29.808 - DEBUG
[edu.internet2.middleware.grouper.shibboleth.util.AttributeIdentifierBeanDef
initionParser:49] - Setting id of e
lement 'Attribute' to 'name'
10:59:29.809 - DEBUG
[edu.internet2.middleware.grouper.shibboleth.util.AttributeIdentifierBeanDef
initionParser:53] - Setting source
of element 'Attribute' to 'g:gsa'
10:59:29.884 - ERROR
[edu.internet2.middleware.shibboleth.common.config.BaseService:188] -
Configuration was not loaded for shibbole
th.AttributeResolver service, error creating components. The root cause of
this error was: java.lang.NullPointerException: null

Can you see where the problem is?

Jie




Archive powered by MHonArc 2.6.16.

Top of Page