[ome-users] Is a web-user different from an API user? I get a credentials error

Josh Moore josh at glencoesoftware.com
Wed Aug 9 15:16:19 BST 2017


On Mon, Aug 7, 2017 at 4:19 PM, Mario Emmenlauer <mario at emmenlauer.de> wrote:
>
> Dear OME team,

Hi all,


> thanks for the find, its quite interesting! Funny how software can
> have the most unexpected caveats :-)
>
> I wonder if this is not in fact a bug of Ice Properties?

Though it was a surprise to me as well, I'd say this is by design:

https://github.com/zeroc-ice/ice/blob/master/cpp/src/Ice/PropertiesI.cpp#L565

If you need to have your "#" and parse it too, escape with \:


In [1]: import Ice

In [2]: ic = Ice.initialize(["--Ice.Config=/tmp/ice.config"])

In [3]: !cat /tmp/ice.config
a.a=1
a.b=2#foo
a.c=3 #bar
a.d=4 # baz
a.e = 5 # quip

In [4]: ic.getProperties().getPropertiesForPrefix("a")
Out[4]: {'a.a': '1', 'a.b': '2', 'a.c': '3', 'a.d': '4', 'a.e': '5'}

In [5]: !cat /tmp/ice.config
b.f=2\#foo

In [6]: ic.getProperties().getPropertiesForPrefix("b")
Out[6]: {'b.f': '2#foo'}




> All the best,
>
>    Mario

Cheers,
~Josh


>
>
> On 07.08.2017 15:52, Dominik Lindner (Staff) wrote:
>> Hi Mario,
>>
>> the minimal-omero-client uses a login method which makes use of the Ice Properties interface.
>> It looks like that invokes the same parsing methods for command line as for properties files and treats the
>> '#' as comment symbol.
>> https://doc.zeroc.com/display/Ice36/The+Properties+Interface
>>
>> I'll update the minimal-omero-client to use the same login procedure as the other clients, in which
>> the '#' character does not cause any issues.
>>
>> Kind Regards,
>> Dominik
>>
>> PS: Thanks Sebastien for figuring that out by the way!
>>
>>> On 20 Jul 2017, at 20:28, Mario Emmenlauer <mario at emmenlauer.de> wrote:
>>>
>>>
>>> Hi Sebastien,
>>>
>>> On 20.07.2017 14:46, Sebastien Besson (Staff) wrote:
>>>> spent a bit of time debugging this using our own Docker image [1]. Minimally I set up a
>>>> system similar to the yours as follows:
>>>>
>>>> $ docker run -d --name postgres -e POSTGRES_PASSWORD=postgres postgres
>>>> $ docker run -d --name omero-server --link postgres:db \
>>>>   -e CONFIG_omero_db_user=postgres -e CONFIG_omero_db_pass=postgres \
>>>>   -e CONFIG_omero_db_name=postgres     -e ROOTPASS=omero-root-password \
>>>>   -p 24064:4064  -e CONFIG_omero_ snoopycrimecop/omero-server
>>>>
>>>> Logging in using the root user worked either via the CLI or minimal-omero-client
>>>>
>>>> $ omero login root@<host>:24064 -w omero-root-password
>>>> $ ./bin/minimal-omero-client —omero.host=<host> --omero.port=24064 --omero.user=root
>>>>   —omero.pass=omero-root-password
>>>>
>>>> I tried to create a local user using the same credentials that you sent to me privately and
>>>> was able to reproduce the issue.
>>>>
>>>> Interestingly, the password you set up contains a hash symbol. Removing this from the
>>>> password was sufficient for me to restore the connection via the minimal Java client. Could
>>>> you confirm this on your end? If so, this is a bug either in minimal-omero-client or in the Java
>>>> gateway.
>>>
>>> I can confirm your observation! I've changed the password and removed
>>> the hash sign, and the error from minimal-omero-client is gone. Since
>>> I have a vanilla installation of OMERO, I do not get any output from
>>> the client :-)
>>>
>>> But I guess the lack of error is a sufficient sign of success :-)
>>>
>>> Thanks! That is good enough for me to progress right now!
>>>
>>> All the best,
>>>
>>>    Mario
>>
>>
>> The University of Dundee is a registered Scottish Charity, No: SC015096
>> _______________________________________________
>> ome-users mailing list
>> ome-users at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>>
>
>
>
> Viele Gruesse,
>
>     Mario Emmenlauer
>
>
> --
> BioDataAnalysis GmbH, Mario Emmenlauer      Tel. Buero: +49-89-74677203
> Balanstr. 43                   mailto: memmenlauer * biodataanalysis.de
> D-81669 München                          http://www.biodataanalysis.de/
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


More information about the ome-users mailing list