[infinispan-issues] [JBoss JIRA] (ISPN-9567) Writing in ___script_cache with hotrod 2.6 ver and authorization throws exception

Gustavo Lira (Jira) issues at jboss.org
Tue Oct 30 11:39:00 EDT 2018


    [ https://issues.jboss.org/browse/ISPN-9567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13654601#comment-13654601 ] 

Gustavo Lira commented on ISPN-9567:
------------------------------------

I couldn't reproduce this behavior, steps that I did:


{code}
cp docs/examples/configs/standalone-auth.xml standalone/configuration/
{code}

{code}
sh add-user.sh -u user -p 123456 -a -g ___script_manager
{code}

{code}
bin/standalone.sh -c standalone-auth.xml
{code}

ran the application https://github.com/rigazilla/workroom/tree/exec_auth/test-exec
I'm receiving:
{code}
...
WARN: ISPN004005: Error received from the server: org.infinispan.server.hotrod.CacheNotFoundException: Cache with name 'namedCache' not found amongst the configured caches
Oct 30, 2018 12:37:28 PM org.infinispan.client.hotrod.impl.protocol.Codec20 checkForErrorsInResponseStatus
WARN: ISPN004005: Error received from the server: java.lang.SecurityException: ISPN006017: Unauthorized operation
Exception in thread "main" org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=6 returned server error (status=0x85): java.lang.SecurityException: ISPN006017: Unauthorized operation
...
{code}


> Writing in ___script_cache with hotrod 2.6 ver and authorization throws exception
> ---------------------------------------------------------------------------------
>
>                 Key: ISPN-9567
>                 URL: https://issues.jboss.org/browse/ISPN-9567
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Hot Rod
>    Affects Versions: 9.4.0.CR3
>            Reporter: Vittorio Rigamonti
>            Assignee: Gustavo Fernandes
>            Priority: Major
>             Fix For: 9.4.0.Final
>
>
> Trying to put a script into ___script_cache with PLAIN authorization produces the exeception below.
> A client reproducer is [here|https://github.com/rigazilla/workroom/tree/exec_auth/test-exec].
> Create a user:user with role ___script_manager and run the server with ./docs/examples/configs/standalone-auth.xml
> same test doesn't fail without authorization
> {noformat}
> 11:48:46,288 ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (HotRod-ServerHandler-4-1) ISPN000136: Error executing command PutKeyValueCommand, writing keys [WrappedByteArray{bytes=[B0x033E097363726970..[12], hashCode=0}]: java.lang.ClassCastException: org.infinispan.commons.marshall.WrappedByteArray cannot be cast to java.lang.String
> 	at org.infinispan.scripting.impl.ScriptingInterceptor.visitPutKeyValueCommand(ScriptingInterceptor.java:30)
> 	at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:68)
> 	at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54)
> 	at org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:54)
> 	at org.infinispan.interceptors.DDAsyncInterceptor.visitPutKeyValueCommand(DDAsyncInterceptor.java:60)
> 	at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:68)
> 	at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndExceptionally(BaseAsyncInterceptor.java:123)
> 	at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:90)
> 	at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invokeAsync(AsyncInterceptorChainImpl.java:234)
> 	at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeededAsync(CacheImpl.java:1817)
> 	at org.infinispan.cache.impl.CacheImpl.putAsync(CacheImpl.java:1507)
> 	at org.infinispan.cache.impl.DecoratedCache.putAsync(DecoratedCache.java:680)
> 	at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.putAsync(AbstractDelegatingAdvancedCache.java:391)
> 	at org.infinispan.cache.impl.EncoderCache.putAsync(EncoderCache.java:460)
> 	at org.infinispan.security.impl.SecureCacheImpl.putAsync(SecureCacheImpl.java:977)
> 	at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.putAsync(AbstractDelegatingAdvancedCache.java:391)
> 	at org.infinispan.server.hotrod.CacheRequestProcessor.putInternal(CacheRequestProcessor.java:196)
> 	at org.infinispan.server.hotrod.CacheRequestProcessor.lambda$put$6(CacheRequestProcessor.java:189)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
> 	at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the infinispan-issues mailing list