Skip to content
This repository has been archived by the owner. It is now read-only.

Reader user is not allowed to edit its own user preferences #1049

Closed
bernd opened this issue Jan 20, 2015 · 1 comment
Closed

Reader user is not allowed to edit its own user preferences #1049

bernd opened this issue Jan 20, 2015 · 1 comment
Assignees
Milestone

Comments

@bernd
Copy link
Contributor

@bernd bernd commented Jan 20, 2015

A reader user is not allowed to edit its own user preferences. It fails with the following error in the UI and stacktrace on the server.

  • The UI error says "Not found" which is misleading.
  • If the user should be able to edit its own preferences, this is a bug on the server side.
  • If the user should not be able to edit its own preferences, the buttons should be hidden in the web interface.

user-pref-error

2015-01-20 10:22:18,389 INFO : org.graylog2.shared.security.ShiroAuthorizationFilter - User not authorized.
org.apache.shiro.authz.UnauthorizedException: Subject does not have permission [users:edit]
    at org.apache.shiro.authz.ModularRealmAuthorizer.checkPermission(ModularRealmAuthorizer.java:323)
    at org.apache.shiro.mgt.AuthorizingSecurityManager.checkPermission(AuthorizingSecurityManager.java:137)
    at org.apache.shiro.subject.support.DelegatingSubject.checkPermission(DelegatingSubject.java:205)
    at org.apache.shiro.authz.aop.PermissionAnnotationHandler.assertAuthorized(PermissionAnnotationHandler.java:74)
    at org.graylog2.shared.security.ShiroAuthorizationFilter.filter(ShiroAuthorizationFilter.java:49)
    at org.glassfish.jersey.server.ContainerFilteringStage.apply(ContainerFilteringStage.java:131)
    at org.glassfish.jersey.server.ContainerFilteringStage.apply(ContainerFilteringStage.java:67)
    at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
    at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:263)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1030)
    at org.graylog2.jersey.container.netty.NettyContainer.messageReceived(NettyContainer.java:356)
    at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
    at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
    at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
    at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
    at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
    at org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$MemoryAwareRunnable.run(MemoryAwareThreadPoolExecutor.java:622)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
@bernd bernd added this to the 1.0.0 milestone Jan 20, 2015
@kroepke
Copy link
Contributor

@kroepke kroepke commented Jan 20, 2015

The user should be able to edit their own prefs, yes.
On Jan 20, 2015 10:27 AM, "Bernd Ahlers" notifications@github.com wrote:

A reader user is not allowed to edit its own user preferences. It fails
with the following error in the UI and stacktrace on the server.

  • The UI error says "Not found" which is misleading.
  • If the user should be able to edit its own preferences, this is a
    bug on the server side.
  • If the user should not be able to edit its own preferences, the
    buttons should be hidden in the web interface.

[image: user-pref-error]
https://cloud.githubusercontent.com/assets/461/5814692/a9c9e582-a08e-11e4-8086-533a2587d07a.png

2015-01-20 10:22:18,389 INFO : org.graylog2.shared.security.ShiroAuthorizationFilter - User not authorized.
org.apache.shiro.authz.UnauthorizedException: Subject does not have permission [users:edit]
at org.apache.shiro.authz.ModularRealmAuthorizer.checkPermission(ModularRealmAuthorizer.java:323)
at org.apache.shiro.mgt.AuthorizingSecurityManager.checkPermission(AuthorizingSecurityManager.java:137)
at org.apache.shiro.subject.support.DelegatingSubject.checkPermission(DelegatingSubject.java:205)
at org.apache.shiro.authz.aop.PermissionAnnotationHandler.assertAuthorized(PermissionAnnotationHandler.java:74)
at org.graylog2.shared.security.ShiroAuthorizationFilter.filter(ShiroAuthorizationFilter.java:49)
at org.glassfish.jersey.server.ContainerFilteringStage.apply(ContainerFilteringStage.java:131)
at org.glassfish.jersey.server.ContainerFilteringStage.apply(ContainerFilteringStage.java:67)
at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:263)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1030)
at org.graylog2.jersey.container.netty.NettyContainer.messageReceived(NettyContainer.java:356)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
at org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$MemoryAwareRunnable.run(MemoryAwareThreadPoolExecutor.java:622)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)


Reply to this email directly or view it on GitHub
#1049.

@kroepke kroepke self-assigned this Jan 20, 2015
@kroepke kroepke closed this in 4fb7b2b Jan 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants