Skip to content
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

Merged
merged 5 commits into from
Jan 15, 2024
Merged

Conversation

chris-allan
Copy link
Member

Configuration will come out of omero config get or similar without
backslash 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.

@chris-allan
Copy link
Member Author

This PR also now includes the requisite changes to build with Java 17 and drops Java 8 compatibility for which the omero-blitz has had dropped for some time.

Would propose that we release this as 0.4.0 rather than 0.3.1.

Copy link
Member

@stick stick left a 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

Copy link
Member

@sbesson sbesson left a 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

@chris-allan
Copy link
Member Author

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 INFO where the system properties are printed out.

@chris-allan chris-allan merged commit c70c823 into glencoesoftware:master Jan 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants