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

Ldap Groups with '.' fail to save role mapping #1458

binelson opened this issue Oct 1, 2015 · 4 comments

Ldap Groups with '.' fail to save role mapping #1458

binelson opened this issue Oct 1, 2015 · 4 comments


Copy link

@binelson binelson commented Oct 1, 2015

After upgrading to graylog 1.2.0, I attempted to add in ldap group mapping. I setup the group search info correctly (System -> Users -> Configure LDAP), and graylog successfully pulled the groups in our org. However, when I go to map an ldap group to a role in graylog (eg: mapping to the admin role), although it says that the change was saved, if I reload the group mappings page, the changes have been reverted to 'none' for the role mapping.

Many of our roles include periods ('.') which seem to be the only ones causing problems. It looks like there is a stackoverflow article to convert a period into its unicode equivalent which might be the fix here:

Relevant Logs:

2015-10-01T10:25:14.545-04:00 ERROR [AnyExceptionClassMapper] Unhandled exception in REST resource
java.lang.IllegalArgumentException: Document field names can't have a . in them. (Bad Key: '')
        at com.mongodb.DBCollection.validateKey(
        at com.mongodb.DBCollection._checkKeys(
        at com.mongodb.DBCollection._checkValue(
        at com.mongodb.DBCollection._checkKeys(
        at com.mongodb.DBCollection._checkObject(
        at com.mongodb.DBCollectionImpl.update(
        at com.mongodb.DBCollection.update(
        at com.mongodb.DBCollection.update(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(
        at org.glassfish.jersey.server.ServerRuntime$
        at org.glassfish.jersey.internal.Errors$
        at org.glassfish.jersey.internal.Errors$
        at org.glassfish.jersey.internal.Errors.process(
        at org.glassfish.jersey.internal.Errors.process(
        at org.glassfish.jersey.internal.Errors.process(
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(
        at org.glassfish.jersey.server.ServerRuntime.process(
        at org.glassfish.jersey.server.ApplicationHandler.handle(
        at org.graylog2.jersey.container.netty.NettyContainer.messageReceived(
        at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(
        at com.codahale.metrics.InstrumentedExecutorService$
        at org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$
@joschi joschi added bug users labels Oct 1, 2015
Copy link

@lordrak007 lordrak007 commented Oct 14, 2015

i have same problem. When do you plan fix this?
Thank you

@bernd bernd added the ldap label Oct 14, 2015
Copy link

@sergey-litvinov sergey-litvinov commented Feb 15, 2016

I've also have the same problem. We use . almost in each group name like Something.QA, Something.Dev, etc. Is there any fix or at least temporary fix for that? Because without this - LDAP integration is useless for us :(

@bernd bernd added S2 P2 labels Feb 26, 2016
@kroepke kroepke self-assigned this Mar 30, 2016
@kroepke kroepke added this to the 2.0.0 milestone Mar 30, 2016
kroepke added a commit that referenced this issue Mar 31, 2016
This changes the storage format for ldap group mappings to allow storing group names with '.' in them.
Migration will be performed on read as well as during startup (once per cluster) to allow backwards compatibility in case of a downgrade.

fix #1458
@bernd bernd closed this in #2009 Apr 1, 2016
Copy link

@bernd bernd commented Apr 1, 2016

This will be fixed in the upcoming Graylog version 2.0. Thank you for the report!

Copy link

@sergey-litvinov sergey-litvinov commented Apr 1, 2016

This is amazing! Thank you guys!

@kroepke kroepke added the triaged label Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants