[appengine-java] proxying datastore request
Hi all! I was thinking about making my RPC calls to the server (datastore commands) more secure against java script or data stream modifications on client side (when user is already signed in and validated). Problem: - right now all datastore requests are transmitted 1:1 from client to server via RPC calls. - a logged in user could manipulate the RPC call (he could for example exchange his userID by the ID of someone else and access the data of this user) - to avoid that I need to verify that the user ID matches the session ID assigned when he logged in. - Idea: I want to proxy every request through a single method on server side and only if the user is validated against his session the specified server method is called. Not a clue how to implement: - specify an Interface with all datastore methods available. - sending a method call (which is defined by the interface) via RPC call to the server - within the proxy method on server side verify the user and execute the method call - if applicable return the return value asynchonously Is this a common approach? If not, what is a common approach? And also: How can one avoid thievery of the session ID? I would appreciate any hint. Thanks greetings. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/V2AK2IBABxkJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] proxying datastore request
Thanks for the reply. You're right. I did not use the Users API, as I do not want to force the users to have a google account (or any other existing account). This will be optional at a later point in time. The user authentication happens on server side by a self-programmed algorithm. Username and the hash values of the user's password are stored in the datastore. So far this authentication is independent from any session ID. Hope this helps a bit. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/_MQ2fHNOUqsJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] i18n class from linked Project not available on server side (but on client side)
Hi all, let me briefly describe the situation: - I have two eclipse projects: 1) Application specific development; 2) My Own UI-Widgets - Project 2) is on the build path of project 1) - I decided to move the localization tables into project 2) to have it available in both projects - I am using Hermes to be able to work with the localization tables on server side (needed for localized Emails) When I run project 1) all works fine on client side. On server side it says: java.lang.ClassNotFoundException:. It seams like my i18n Constants extension is not found for server side code. My understanding was, that if I put a complete project on the build path, all sources are available the same way as if they were in the project itself. This seams to be wrong. But how can I solve my problem? Any ideas? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/tiHUMq3D-JMJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: i18n class from linked Project not available on server side (but on client side)
Not linking the whole project but linking the project's source folder did it. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/PYzNI1gMogUJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] persistence of static values between instances
Hi all! I have a question regarding persistence of static values between server instances. If I declared a static value in a class, will this value be available for all instances GAE might start? If not, is there a way (besides storing the value in the datastore) to achieve this goal. Thanks, meiaestro -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/TtFfaG6IrbAJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] shortblob is stored in local environment but not on googles app engine
Hi Experts, local storage of a short blob (byte array) works just fine. When I deploy the app to GAE I get a NULL Pointer Exception. Further investigation shows that the byte array (shortblob) is not stored into the datastore on GAE. What is my mistake? Thanks a lot! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/51xgbjVp9tgJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Bytearrays as Strings in Google Datastore
Hi experts, I have following Problem with storing a Bytearray as String in the google datastore: I create a salt during account creation to hash the users passwordword which then I store in the google datastore as String. SecureRandom sr = SecureRandom.getInstance(SHA1PRNG); byte[] salt = new byte[16]; sr.nextBytes(salt); String saltStr = new String(salt); object.setProperty(Salt,saltStr); Now I want to use the salt to hash the password during Login: byte[] salt = object.getProperty(Salt).getBytes(); Now I have to find out that the two Bytearray (input versus output) differ - sometimes - in one or more Bytes. Seems like the String is not transmitted to the store or stored in it correctly. Any ideas? Thanks! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/X6Qlv7d4HowJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Aw: Bytearrays as Strings in Google Datastore
Solved it by using ShortBlob instead of String in datastore. Cheers! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/ElXraFqHxq0J. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Aw: Re: Usage of this forum
Thank you for this advise. I'll give it a try. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/qia-KA0Mn84J. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Usage of this forum
Hi Experts, as I am a Newbie in AppEngin and GWT and therefore of this forum I was wondering if I use it accurately. Reason of this question is, that my first questions have been read (and also answered) within just a few minutes. Now there hasn't had any reaction on my last 3 postings, so I was wondering if I do anything wrong? I Would be thankful for any advise. Regards. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/dIR15n43tqAJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Newbie Question: Highlight a selected map marker based on a custom icon.
Hi experts, In GWT 2.3.0 I use custom icons in my map as markers. I would love to change the icon which is currently selected. This Icon should be similar to the original one (i.e. highlighted). I thought about different ideas which all are somehow difficult for me to realize: 1. As the icons are (and have to be) stored in a blobdatastore I was thinking about painting a second Icon and storing it in the datastore. Unfortunately I did not find a way to draw in an existing blobimage. 2. changing the style of the icon (i.e. adding a colored border). Unfortunately the icon or the marker has no setstyle method. Is the uibinder a possiblel way to do that? I see a Problem in changing the style of only the selected marker/icon. 3. Repainting the icon on client side. As far as I have researched this won't be possible for all browsers. Do you have any hints for me? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/iQVY-5zTwAgJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Is there a way to use send mail functionality local
Hi! as I could not find any howto papers vian google I was wondering if there is a way to use/test the email sending on localhost? My setup: GAE 1.5 / GWT 2.3.0 / Eclipse 3.6.2 Thanx! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/620kuwmq2eUJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] gwt 2.3.0 clickhandler on google map and on overlay Marker
Hi! I've posted this a few days ago and couldn't find a solution yet. Maybe this time someone has a great idea. The problem: I create a map with a simple click handler on it -- works I create an overlay marker with a simple click handler on it -- works if i click on the map after that: when I click the first time on the marker, still there is no error. When afterwards I click a second time on the marker I get the following exception: com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot read property 'ua' of null Clicking on the map and using the marker's drag and drop handler works all the time with no error. I guess the problem results from the fact that there are two click handlers on the map widget. Hope someone has an idea because I really am clueless. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/v0FF7nIOvQwJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Aw: Re: GWT Google Maps: Creating multiple markers leads to no error, but only one marker shows up; Exception with Clickhandler
Found it. It seems I have been blind during debugging. I changed an object without creating a new instance and stored it in an ArrayList. Not really surprising that both markers had the same position ;-) The second error still exists. What I found out so far is that it only occurs in code server mode (parameter: gwt.codesvr=127.0.0.1:9997). If I compile and do not use the code server the error doesn't occur. Thanks again. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/YVJHUUVfWUEwYzRK. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] extending google maps' Marker Class (GWT2.3.0)
Hi Experts, using GWT 2.3.0 I want to have an additional attribute in every google maps Marker. My Idea was to extend the existing Marker class the following way: public class MyMarker extends Marker { private int myNumber; public MyMarker(LatLng point) { super(point); } public MyMarker(LatLng point, MarkerOptions options) { super(point, options); } public int getmyNumber() { return myNumber; } public void setmyNumber(int number) { myNumber = number; } } Although this is compiling without any errors I think it is not working properly. When I click (MarkerClickHandler) twice on a marker I get following java script error (not the first time I click on it): com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot read property 'ua' of null Surprisingly I don't get this error when I use the drag'n drop handler. Any ideas? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/bi1CVEhieXd2UTRK. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Aw: extending google maps' Marker Class (GWT2.3.0)
Ok, I found the reason for the JavaScript error, but have no idea how to solve this: The reason is simple. In my scenario MapWiget itself also has a click handler and GWT seems not to like it. As soon as I remove the click handler from the map everything works fine. As I said above I would need both click handlers. Any ideas? Thanks a lot! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/bVIyVzhmdlN2djhK. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Aw: Re: newbie question: redirect users (GWT 2.3.0)
Thank you all for your help. I decided to work with Composites. It works well! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/QkQxemZBVVp2UFlK. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] GWT Google Maps: Creating multiple markers leads to no error, but only one marker shows up; Exception with Clickhandler
Hi experts, the subject is saying it all. This is the code which is looped multiple times with varying LatLng/Douple-values (tested during debugging); in ops I only set an icon (always the same icon): Marker marker = new Marker(LatLng.newInstance(Double.valueOf(some double as String),Double.valueOf(some double as String)),ops); marker.addMarkerClickHandler(new MarkerClickHandler(){ @Override public void onClick(MarkerClickEvent event) { }}); map.addOverlay(marker); I do not get an error or any exception. The correct icon is shown only and always for the *last *marker. Second problem: when I click the first time on the icon, the click handler is executed with no error. The second time I do the same click following exception raises: com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot read property 'ua' of null I assume both problems are somehow linked. Any Ideas? Thanks a lot in advance. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/WUl6ZEU3bDlwVFlK. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Aw: newbie question: redirect users (GWT 2.3.0)
Hi! Thanks a lot for the helpful hints! Now let me see if I got it right. In my case I only have the entry point starting page. Within this class I have three methods building three different UIs: register(), login(), startpage(). Now I do the if in on onModuleLoad(): if (sessionvalidation().equals(true)){ startpage() } else { login(); } On the login page you usually have a link for registration. How do I catch that? With the RequestBuilder? Thanks again! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/VFJRNVVVcldpUGtK. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] newbie question: redirect users (GWT 2.3.0)
Hi experts, I'v build a web application with three entry points so far: registration login start page As you can imagine I want to (or have to) be able to dynamically redirect a user - depending on his authentication/session validation, etc. - to the correct entry point, regardless which URL he choose. Example: user chooses start page.html but is not yet logged in nor does he have a valid session id. So I want to redirect him to login.html automatically. Now the question: what is the best way to redirect a user from one entry point to the next? Is it a simple Window.open() or is it a GWT.setModuleBaseURL(). Second Question: Usually the index.html (or htmls/php/etc) is the first page a webserver is searching for, so people are used to it. Can I somehow map a virtual index.html to my entry point within the app server or should I use a simple header redirect? Thanks a lot! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/d3BNUnlOcTlQbzBK. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] setter values becom null during AsyncCall
Hi Experts, My first posting, so please excuse any clumsiness. The Background: Within a click handler I am calling a RemoteService for storing data in a datastore. As I do not only want to store a simple element I defined my own class SaveObject. As I also want to store different types of Data, I created subclasses of SaveObject. For all attributes I created getter and setter Methods. The problem: Within the click handler I create one of the mentioned subclasses of SaveObject: MySubclass newSubclass = new MySubclass(); Within the constructor of the Subclasse a setter is called to set values of a string array called Attributes. The next step is setting Values with an identic setter as used in the constructor : newSubclass.setValues(new String[] {test1, test2, test3); And finally I send it all to the RemoteService: datastore.save(newSubclass, new AsyncCallbackString() { public void onFailure(Throwable caught) { Window.alert(+caught.getLocalizedMessage()); } public void onSuccess(String result) { Window.alert(result); } }); In debug mode I now see that within the implementation of the save method the Array Attributes still has the values set in the constructor, but the values set with the setter method have become null Any Ideas? Thanks a lot in advance! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Aw: Re: setter values becom null during AsyncCall
I'm using GWT 2.3.0 -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Aw: Re: Aw: Re: setter values becom null during AsyncCall
Ok, found it. Guess you gave me the right push - thanks: While my subclasses did extend the IsSerializable interface, the superclass didn't. Never the less... funny effect ;-) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.