Tuesday, October 30, 2018

Re: Hash of a Java Type

Are there any ideas about this hash function?

пн, 29 окт. 2018 г. в 11:38, Anastasiya Ruzhanskaya <anastasiya.ruzhanskaya@frtk.ru>:
Hello!
I am trying to build a proxy, which will intercept requests from oVirt and send errors if the action should not be performed. I just need to implement it in such a manner due to some legacy issues with using internal access control.

I think that by importing some information from oVirt I can easily parse the message in order to find the action type and id of the object on which it is performed.

The problem is with the answer: I need to send the valid answer.
I created a user in oVirt which is a read-only user. So, I get the following answer:

//OK[0,0,10,0,471,9,8,1,0,1,0,1,7,0,0,0,1,6,3,5,3,4,3,3,1,0,2,1,1,["java.util.ArrayList/4159755760","org.ovirt.engine.core.common.action.ActionReturnValue/4163585948","java.lang.String/2004016611","VAR__ACTION__SHUTDOWN","VAR__TYPE__VM","USER_NOT_AUTHORIZED_TO_PERFORM_ACTION","vm1","org.ovirt.engine.core.common.errors.EngineFault/2377218566","org.ovirt.engine.core.common.errors.EngineError/1938278732","ENGINE"],0,7]

I think the answer should be always pretty the same (maybe only for some cases another one). The only thing which I find tricky here is how to generate a valid hash value?

I found a function in sources of GWT but it accepts a serialization policy and the custom serializers (which is not appropriate for me as for incoming requests I will always look for action type and then object, and for answers I want just to generate this type errors, which I provided above, so I want to include to my proxy as minimum additional information as possible).

So, I would like to find an easy way of generation this hash values (org.ovirt.engine.core.common.errors.EngineFault/2377218566). Or probably it is even possible not ti generate them at all?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment