Anonymous mode results in BadUserAccessDenied #1575
-
I've been trying for days to make anonymous connections work. We have no problems using certificates, but if connecting as an anonymous user (using the asyncua GUI or UaExpert), we get a "BadUserAccessDenied" error. What is required to enable anonymous connections? I have a wrapper for the server. It does a lot of things, but here's the gist of it: class MyServerWrapper:
async def init(self):
self.cert_user_manager = CustomCertificateUserManager()
self.server = Server(user_manager=self.cert_user_manager)
await generate_and_store_cert_if_necessary()
await self._set_certs()
await self._add_admin_cert()
await self.add_client_certs_in_path()
await self.server.init()
self.server.set_server_name("My Company OPC Server")
self.server.set_endpoint(self.opc_endpoint)
self.server.default_timeout = 300
async def __aenter__(self):
await self.init()
await self.server.start()
return self
async def __aexit__(self, exc_type, exc_val, exc_tb):
await self.server.stop() Whether I explicitly add the NoSecurity policy or not, I get the BadUserAccessDenied error. I can't find any other examples of people being unable to make anonymous connections work. Looks like it's just me. Where should I be looking? Any pointers would be immensely appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Turns out the problem was in |
Beta Was this translation helpful? Give feedback.
Turns out the problem was in
CustomCertificateUserManager
, which returnsNone
inget_user
if no cert is used. I made it return an anonymous user instead, and I can connect.