Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #2613 (closed)

Opened 14 years ago

Closed 14 years ago

Bug: "$" is improperly escaped via bin/omero config

Reported by: jamoore Owned by:
Priority: major Milestone: OMERO-Beta4.2.1
Component: Configuration Version: n.a.
Keywords: n.a. Cc: futhwo@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description (last modified by jmoore)

When setting a property with a dollar sign (as is necessary for advanced LDAP usage), Ice complains about unknown variables:

07/23/10 15:46:07.852 icegridnode: warning: failed to deploy application
`/opt/omero_dist/etc/grid/default.xml':
IceGrid::DeploymentException: application `OMERO':
invalid value for attribute `property set `__ACTIVE__' property value':
invalid variable `:query:(memberUid=${uid})':
 undefined variable `uid'

In trying to workaround this with double dollar signs like:

bin/omero config set omero.db.user '$${foo}'

Spring complains about unknown properties:

Caused by: org.springframework.beans.BeanInstantiationException: 
Could not instantiate bean class [ome.system.OmeroContext]: 
Constructor threw exception; nested exception is 
org.springframework.beans.factory.BeanDefinitionStoreException: 
Invalid bean definition with name 'nonXaDataSource' defined in 
class path resource [ome/services/datalayer.xml]: Could not resolve 
placeholder 'foo'

Workaround

To currently use entries of the for '${...}' it is necessary to set a property for the dollar sign:

  ./omero config set omero.dollar '$'

And then use that literal, but double-prefixing it with literal dollar signs:

  ./omero config set omero.ldap.new_user_group ':query:(memberUid=$${omero.dollar}{uid})'

Solution

Rather than try to argue with both Ice and Spring about how to handle "${}" syntax, the LDAP plugin will use "@{}" as its property expansion syntax. This was chosen since LDAP filters don't contain unescaped "{" symbols as far as we know.

The documentation for install will be modified to reflect this change upon release (#2636); however, users who have already modified their configuration to use the workaround, $${omero.dollar}{dn} for example, should have their configuration automatically updated to (also for example):

omero.ldap.new_user_group=member=@{dn}

See:

Change History (3)

comment:1 Changed 14 years ago by jmoore

  • Description modified (diff)

comment:2 Changed 14 years ago by jmoore

  • Description modified (diff)

comment:3 Changed 14 years ago by jmoore

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from new to closed

(In [7616]) Changing LDAP property expansion to "@{}" (See #2613)

(In [7624]) Changing LDAP property expansion to "@{}" (See #2613)

original-svn-id: file:///home/svn/omero/branches/Beta4.2@7616 05709c45-44f0-0310-885b-81a1db45b4a6

(Accidentally committed under #2633)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.68345 sec.)

We're Hiring!