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

[management] Unable to access api with a sharding tag in certain condition #2191

Closed
NicolasGeraud opened this issue May 2, 2019 · 0 comments

Comments

2 participants
@NicolasGeraud
Copy link
Member

commented May 2, 2019

If a tag has no restricted group (the default case) and is associated to an api, a non-admin user cannot access to the admin part:

16:55:52.978 [gravitee-listener-35] ERROR i.g.m.rest.provider.ThrowableMapper - Internal error
java.lang.NullPointerException: null
at io.gravitee.management.service.impl.TagServiceImpl.lambda$findByUser$3(TagServiceImpl.java:192)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at io.gravitee.management.service.impl.TagServiceImpl.findByUser(TagServiceImpl.java:194)
at sun.reflect.GeneratedMethodAccessor812.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy59.findByUser(Unknown Source)
at io.gravitee.management.rest.resource.CurrentUserResource.getUserShardingTags(CurrentUserResource.java:272)
at sun.reflect.GeneratedMethodAccessor811.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
  • Version used: 1.25.0

@NicolasGeraud NicolasGeraud added this to the APIM - 1.25.1 milestone May 2, 2019

NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue May 2, 2019

NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue May 3, 2019

aelamrani added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue May 3, 2019

@aelamrani aelamrani closed this May 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.