Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmartLdapGroupStore ContextMapper feature can't be null in the init.crn #2141

Closed
jgribonvald opened this issue Aug 20, 2020 · 5 comments
Closed
Assignees
Labels
Milestone

Comments

@jgribonvald
Copy link
Contributor

Describe the bug
Staying on the attributeMapper inside the SamrpLDAPGroupStore configuration isn't anymore available due to #1989
In the init.crn the ldap-search require that the contextMapper is not null ! and from the groupStore class we can't have the atrributeMapper defined at the same time than the contextMapper.

To Reproduce
Steps to reproduce the behavior:

  1. configure the SamrLdapGroupStrore with the attributemapper only.
  2. deploy and restart the tomcat
  3. connect to uPortal and watch logs - users can't connect

Expected behavior
Cernunnos lib seems buggy and should manage correctly things !

Stacktrace

ERROR [SmartLdap Refresh Worker] o.a.p.g.s.SmartLdapGroupStore 2020-08-18 11:15:54,835 - SmartLdapGroupStore failed to build the groups tree
org.danann.cernunnos.ManagedException: The Cernunnos Runtime encountered an error:
Origin Document: file:/opt/webapps/uPortal/WEB-INF/classes/org/apereo/portal/groups/smartldap/init.crn
Source: /with-attribute/ldap-search/@context-mapper
Entity Name: ${org.danann.cernunnos.AttributePhrase}
at org.danann.cernunnos.runtime.RuntimePhraseDecorator.evaluate(RuntimePhraseDecorator.java:91)
at org.danann.cernunnos.runtime.ConcatenatingPhrase.evaluate(ConcatenatingPhrase.java:77)
at org.danann.cernunnos.runtime.RuntimeReagentDecorator.evaluate(RuntimeReagentDecorator.java:71)
at org.danann.cernunnos.ldap.SearchTask.perform(SearchTask.java:203)
at org.danann.cernunnos.runtime.RuntimeTaskDecorator.perform(RuntimeTaskDecorator.java:77)
at org.danann.cernunnos.AbstractContainerTask.performSubtasks(AbstractContainerTask.java:148)
at org.danann.cernunnos.AbstractContainerTask.performSubtasks(AbstractContainerTask.java:123)
at org.danann.cernunnos.core.SetAttributeTask.perform(SetAttributeTask.java:66)
at org.danann.cernunnos.runtime.RuntimeTaskDecorator.perform(RuntimeTaskDecorator.java:77)
at org.danann.cernunnos.runtime.ScriptRunner$TaskDecorator.perform(ScriptRunner.java:436)
at org.danann.cernunnos.runtime.ScriptRunner.run(ScriptRunner.java:288)
at org.danann.cernunnos.runtime.ScriptRunner.run(ScriptRunner.java:225)
at org.apereo.portal.groups.smartldap.SmartLdapGroupStore.buildGroupsTree(SmartLdapGroupStore.java:731)
at org.apereo.portal.groups.smartldap.SmartLdapGroupStore.access$200(SmartLdapGroupStore.java:57)
at org.apereo.portal.groups.smartldap.SmartLdapGroupStore$2.run(SmartLdapGroupStore.java:645)
Caused by: java.lang.IllegalArgumentException: The specified attribute is not defined: contextMapper

Platform:

  • uPortal Version: uPortal 5.8.2

Additional things
It may be great to watch on moving from cernnunos which is old and not really used now to a groovy script, what do you think ?

@ChristianMurphy
Copy link
Member

It may be great to watch on moving from cernnunos which is old and not really used now to a groovy script, what do you think ?

I agree, much of the functionality from cernnunos has been superseded by Spring framework.

@bjagg
Copy link
Member

bjagg commented Jan 6, 2021

@bjagg
Copy link
Member

bjagg commented Jan 6, 2021

I'll be looking at this soon. @jgribonvald do you have a work-around?

@jgribonvald
Copy link
Contributor Author

good question for the mapperType, I didn't seen it !

My work around is in deploying the previous init.crn file with uPortal-start (by override) and keep the attributeMapper conf ;)

@cbeach47 cbeach47 self-assigned this Jan 7, 2021
cbeach47 added a commit to cbeach47/uPortal that referenced this issue Jan 9, 2021
cbeach47 added a commit to cbeach47/uPortal that referenced this issue Jan 9, 2021
bjagg added a commit that referenced this issue Jan 11, 2021
…mapper-and-npe

#2141 smartLDAP - minor adjustments and remove default context-mapper
@cbeach47
Copy link
Contributor

cbeach47 commented Jan 11, 2021

The fix for this has been merged into master.

@cbeach47 cbeach47 added this to the 5.9.0 milestone Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants