-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration Escaping #9
Conversation
This PR also now includes the requisite changes to build with Java 17 and drops Java 8 compatibility for which the Would propose that we release this as 0.4.0 rather than 0.3.1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all fine from my end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upgrade to Java 11+ is consistent with the overall requirement of OMERO Plus. Successfully tested that omero-ldaptool
throws an exception with JDK 8. Java 17 throws an exception when initializing the bean but this was already the case prior to this PR so Java 17 is outside the scope of this change.
Confirmed that omero-ldaptool --config <config> search <username>
fails with an javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]
when using version 0.3.0 of this tool when omero.ldap.password
includes a unescaped backslash character.
With the proposed changes, the backslash character is escaped internally and the subcommand works as expected.
Also confirmed that commands work with omero-ldaptool 0.3.0
when omero.ldap.config
is set to false
in the configuration but fail with an informative error message with this PR included
Thanks, @sbesson. Just for thoroughness if anyone wants to review in the future, the backslash semantics can also be observed by raising the log level to |
Configuration will come out of
omero config get
or similar withoutbackslash escaping. If configuration is sourced this way it is
unlikely to be escaped correctly, a Java properties requirement,
before being passed in so we will perform the escaping ourselves.
This PR also checks if
omero.ldap.config
is set correctly.