Skip to content

Commit

Permalink
Merge pull request #382 from sbesson/tls_start_warnings
Browse files Browse the repository at this point in the history
omero admin start: add warning for deprecated TLS protocols
  • Loading branch information
jburel authored Oct 3, 2023
2 parents a420874 + 8c5b661 commit 1824751
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/omero/plugins/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,22 @@ def startasync(self, args, config):
"sysadmins/server-performance.html?highlight=poolsize\n"
"for more information.")

# Warn if deprecated TLS 1.0 and 1.1 protocols are allowed
# See https://datatracker.ietf.org/doc/html/rfc8996
# Both protocols are included in the default value of IceSSL.Protocols
# https://doc.zeroc.com/ice/3.6/property-reference/icessl#id-.IceSSL.*v3.6-IceSSL.Protocols
DEPRECATED_TLS_MESSAGE = (
"Your server is configured to allow a deprecated TLS protocol."
"\n\nPlease refer to https://omero.readthedocs.io/en/stable/"
"sysadmins/server-upgrade.html#server-certificates for "
"instructions on how to upgrade your configuration.")
try:
ssl_protocols = config["omero.glacier2.IceSSL.Protocols"]
if ("TLS1_0" in ssl_protocols or "TLS1_1" in ssl_protocols):
self.ctx.out("WARNING: " + DEPRECATED_TLS_MESSAGE)
except KeyError:
self.ctx.out("WARNING: " + DEPRECATED_TLS_MESSAGE)

self._initDir()
# Do a check to see if we've started before.
self._regdata()
Expand Down

0 comments on commit 1824751

Please sign in to comment.