From acce4de739c54bd1dc7c87bac85617274da0971f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 2 Aug 2024 11:57:04 -0400 Subject: [PATCH] Add support for an OpenBMC modification While stock OpenBmc does not care about subprotocols, some implementations use it as a carrier for the XSRF-TOKEN. Since base OpenBmc ignores it, we just offer it to any implementation just in case. --- confluent_server/confluent/plugins/console/openbmc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/plugins/console/openbmc.py b/confluent_server/confluent/plugins/console/openbmc.py index 17acae7c..8677ce17 100644 --- a/confluent_server/confluent/plugins/console/openbmc.py +++ b/confluent_server/confluent/plugins/console/openbmc.py @@ -141,7 +141,7 @@ class TsmConsole(conapi.Console): bmc = prefix + ']' self.ws = WrappedWebSocket(host=bmc) self.ws.set_verify_callback(kv) - self.ws.connect('wss://{0}/console0'.format(self.bmc), host=bmc, cookie='XSRF-TOKEN={0}; SESSION={1}'.format(wc.cookies['XSRF-TOKEN'], wc.cookies['SESSION'])) + self.ws.connect('wss://{0}/console0'.format(self.bmc), host=bmc, cookie='XSRF-TOKEN={0}; SESSION={1}'.format(wc.cookies['XSRF-TOKEN'], wc.cookies['SESSION']), subprotocols=[wc.cookies['XSRF-TOKEN']]) self.connected = True eventlet.spawn_n(self.recvdata) return