Re: [JPP-Devel] accessing a password protected WMS server

2015-01-25 Thread Michael Michaud
Hi Ede,

I did not follow the whole discussion, but noticed a recent regression.
version r4108 is the last version on my computer where I can get a 
stream from the following URL
https://user:p...@wxs.ign.fr/u4wajnl1z3xw1jfr54xjoi4o/geoportail/r/wms?service=wms

in 1.8.0 and more recent versions, I cannot get the same stream anymore.
The UI has slightly changed, but I tried to write the URL + credential 
every way
I could imagine without success
Any idea what could have break ?
I can send the credential privately if it helps

Michaël

PS : my work does not let me the time to contribute much these times,
but I'm still using it a lot ;-)


> hmm,
>
> as you already stated. the base64 encoded string is essentially the 
> authorization. so having that, you do not need no user/password anymore.
>
> also, in case we are going to support different auth schemes for http, we 
> would have a problem if we fixed the saved auth to be base64 encoded.
> currently we simply assume that the server supports
>   http://en.wikipedia.org/wiki/Basic_access_authentication
> and send it. this looks error prone, as there are other possible auth 
> schemes. maybe they are not used widely for wms servers. not sure. Jukka, do 
> you know?
>
> ok, i'd be willing to rework the UI to support user/pass textfields (pass 
> obfuscated), but internally the auth stays plain text and will be saved as 
> such into the state and project files.
> any try to obfuscate something into these files will be pointless as we are 
> an _open_ source project. and decompiling java is also script kid level these 
> days.
>
> at a later stage we might think about not saving passphrases (enabled via 
> checkbox), but ask for them and cache them for each server session-wise. but 
> that's just spitballing.
>
> ..ede
>
> On 16.12.2014 12:36, Rahkonen Jukka (Tike) wrote:
>> Hi,
>>
>> Some own experiences about small troubles because of how OJ is handling 
>> username:password
>>
>> - When giving a presentation for audience on-screen or for someone in your 
>> work room: URL-box shows username:password
>> - Credentials must be painted over from screen captures
>> - Workbench-state.xml stores URLs with credentials as plain text into 
>> AddWMSQueryPlugin.CACHED_URL
>> - Project file (.jmp) does the same
>>
>> I am not an expert, but I suppose that a slightly better way to use Basic 
>> auth would be to make OpenJUMP to write the http header "Authorizarion"
>> Authorization: Basic aHR0cHdhdGNoOmY=
>> http://www.httpwatch.com/httpgallery/authentication/
>>
>> The base64 encoded string could be saved into workbench-state.xml and into 
>> OJ project file even it is by no means safe if someone has an access to the 
>> computer. Still it is hard to remember if only seen from the screen.
>>
>> User should still have a possibility to store the credentials so that they 
>> are not prompted every time when adding a secured server to project. The 
>> same authorization should be used for GetCapabilities and GetMaps and for 
>> GetFeatureInfo, if we some day will have a support for that also.
>>
>> Other software has same kind of problems and if one knows what to do 
>> username:password can be found for example from an open QGIS session. If not 
>> otherwise then by unplugging the network cable it is often possible to 
>> generate a revealing error message. It is better to remember that they are 
>> called personal computers for a reason.
>>
>> -Jukka-
>>
>> 
>> edgar.soldin wrote:
>>
>> On 15.12.2014 22:45, Rahkonen Jukka (Tike) wrote:
>>> 1) OpenJUMP does not support very well authentication. All it can do is to 
>>> add user:password before the base URL as 
>>> https://user:password@base_url.
>> we could obfuscate that behind an authentication prompt UI. not sure it is 
>> worth the effort, as the user editing should be the user needing the data 
>> and hence knowing the credentials to that wms server anyway. you might sway 
>> my opinion here.
>>
>>> This is not the same URL that is advertised for GetMap because 
>>> GetCapabilities document hopefully does not show the user name and password 
>>> as plain text
>> already fixed that locally, it reuses the credentials of the GetCap request 
>> if the advertised GetMap url does not contain any, just for the weird case 
>> they deliver creds.
>> the credentials are still shown in the text field though.
>>
>> additionally working on adding a possibility to modify wms url in 
>> WMSQueryEditor later.
>>
>>> 2) The user:password in OpenJUMP is really tested only with https. Basic 
>>> authentication withour https does not make much sense because credentials 
>>> are too easy to capture from unsecured traffic. However, the server that 
>>> Andrei is using does exactly use basic auth over plain http.
>> right. http auth without encrypted transport layer is negligently insecure. 
>> still, if the server is configured without SSL, who are we to judge and 
>>

Re: [JPP-Devel] OpenJUMP and CAD tools

2015-01-25 Thread Giuseppe Aruta
Jukka, Larry
I tried the patch that Larry sent but is seems not working with OpenJump.
At least with my machine Ubuntu/OpenJDK. It the other members of our
community agree, I vote to comment out Road Curve tool untill further
solutions.
A workaround to draw roads is to use Tools>Analysis> Offset curve tool, by
Michael, which generate parallel lines so selected one
Peppe

2015-01-21 23:53 GMT+01:00 Larry Becker :

> 1.   Python tools feels somehow like a promising way for writing new
>> drawing tools. The Python part of the tools look almost understandable for
>> non-programmer and I suppose that Python is the most common geospatial
>> scripting language at the moment. *However, if I understand right for
>> creating new tools Python is not enough but also some java programming is
>> needed*. By the way, the Road Arc tools does not work with latest
>> snapshots and it makes so bad a jam that only killing the process helps.
>> The error from the console window:
>>
>
> @Jukka,  I assume you are referring to the following line from Startup.py:
>
> #tools can be defined in java only - as in this orphaned JUMP Note tool
>
> The comment is badly worded.  It should say #tools may also be defined in
> java and activated here - as in this orphaned JUMP Note tool  There are
> many examples of defining a new drawing tool in jython only.
>
> While I don't currently have my OpenJump development platform up to date,
> I did diff the SkyJUMP copies of  two attached files and bring them up to
> date with the new Shift key feature of the Road Curve tool (it is maddening
> to draw long straight stretch of road without it!).  If one of the
> developers has a few minutes, they can see if it fixes the issue.  If it
> doesn't we can comment out lines 100 through 109 in startup.py to
> deactivate the Road tool.
>
> regards,
>
> Larry Becker
>
> On Tue, Jan 20, 2015 at 6:07 AM, Rahkonen Jukka (MML) <
> jukka.rahko...@maanmittauslaitos.fi> wrote:
>
>>  Hi,
>>
>>
>>
>> I was searching tools for making some CAD alike drawing and studied what
>> we have. I found:
>>
>> 1.   Some of the Python tools in the standard delivery has CAD-alike
>> features (rotated rectangle, Arc tool).
>>
>> 2.   Peppe has made a CAD tools plugin that adds some CAD tools into
>> the default digitizing box.
>>
>> 3.   Kosmo GIS has a special CAD toolbox with about 15 tools.
>>
>>
>>
>> Quick comments:
>>
>>
>>
>> 1.   Python tools feels somehow like a promising way for writing new
>> drawing tools. The Python part of the tools look almost understandable for
>> non-programmer and I suppose that Python is the most common geospatial
>> scripting language at the moment. However, if I understand right for
>> creating new tools Python is not enough but also some java programming is
>> needed. By the way, the Road Arc tools does not work with latest snapshots
>> and it makes so bad a jam that only killing the process helps. The error
>> from the console window:
>>
>>
>>
>> Exception in thread "AWT-EventQueue-0" Traceback (innermost last):
>>
>>   File
>> "C:\oj_test\OJ_18\OpenJUMP-20150116-r4270-PLUS\lib\ext\jython\RoadTool.py",
>> line 201, in handleDeActivation
>>
>> AttributeError: 'NoneType' object has no attribute 'actionPerformed'
>>
>> Exception in thread "AWT-EventQueue-0" Traceback (innermost last):
>>
>>
>>
>> 2.   I would rather place the additional CAD tools to their own tool
>> box because they do not behave exactly as the standard tools. Many of the
>> OJ keyboard shortcuts stop working when a CAD tools is selected. On the
>> other hand, the SHIFT key does not alter the behaviour of CAD tools as
>> planned in most cases. The draw vertical/horizontal tool, tools for drawing
>> closed linestrings and the annotation layer tool would be nice additions to
>> OJ PLUS. Annotation tool might need some revisiting.
>>
>> 3.   Many of the Kosmo tools are fine. I wonder how difficult it
>> would be to adapt some of those for OJ. For example the “Continue lines
>> until they cross” tools is simple and clever and I do not remember such
>> tool in other open source GIS. “Draw perpendicular” works well also with
>> circles and Bezier curves but it would be nice to have a sister tool “Draw
>> tangent”.
>>
>>
>>
>> None of these CAD tools had a tool for my need. Or perhaps the “Draw with
>> commands” tool in Kosmo has but I could not discover the right syntax even
>> I found the manual
>> http://www.kosmoland.es/public/kosmo/v_2.0/docs/Extension_Herramienta_CAD.pdf.
>> What I would like to do feels simple to me:
>>
>>
>>
>> -  Draw a point or first vertex to coordinates x/y
>>
>> -  Draw next point or vertex by angle and distance or to next
>> given coordinates
>>
>>
>>
>> I know I can workaround the manual feed of coordinates effectively by
>> using WKT but not the angle + distance alternative.
>>
>>
>>
>> -Jukka Rahkonen-
>>
>>
>>
>> --
>> New Year. N

[JPP-Devel] bugs on Raster Image layers

2015-01-25 Thread Giuseppe Aruta
@ Alberto
Last week I tested the new Raster Image Layer framework and I found  a
couple of bugs. I posted them as bug tickets 386 and 387 on
http://sourceforge.net/p/jump-pilot/bugs/?source=navbar. Can you please
give a look? If you need more information I will write you in detail
thanks
Peppe
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel