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

Server.ServerDiagnostics.SubscriptionDiagnosticsArray is missing in v1.4.370.12 #1993

Open
pc-avatar-7076 opened this issue Oct 13, 2022 · 4 comments

Comments

@pc-avatar-7076
Copy link

pc-avatar-7076 commented Oct 13, 2022

The SubscriptionDiagnosticsArray seems to have gone missing in stack version 1.4.370.12. It is present in stack version 1.4.370.1.

To reproduce:

  1. Clone the repo and git checkout 1.4.370.12
  2. In Visual Studio 2022 (or 2019) open the UA Reference solution and set the ConsoleReferenceServer as the startup project (you can use global.json to define the appropriate .NET target)
  3. Build and execute the ConsoleReferenceServer
  4. Connect a UA Client (i.e. UA Expert) and connect to the reference server endpoint (i.e. opc.tcp://<host>:62541/Quickstarts/ReferenceServer) using no security and Anonymous authentication
  5. Browse Root.Objects.Server.ServerDiagnostics and observe that the SubscriptionDiagnosticsArray is missing

Notes:

  • .NET 6 and NET Core 3.1 targets both reproduced this
  • The SubscriptionDiagnosticsArray node reappears after git checkout 1.4.370.1
  • Diagnostics are enabled in the Quickstarts.ReferenceServer.Config.xml - <DiagnosticsEnabled>true</DiagnosticsEnabled>
  • Opc.Ua.Server.DiagnosticsNodeManager.CreateSubscriptionDiagnostics seems to complete successfully. The 'diagnostic enabled' flag seems to be respected here.

UA Expert capture:
image

@mregen
Copy link
Contributor

mregen commented Oct 14, 2022

Hi @pc-avatar-7076 , based on this PR some privacy issues were addressed. The access to session diagnostics is only available for sessions using sign and encrypt.
In addition only the sysadmin role can see all subscriptions, otherwise only own subscriptions can be seen.

@mregen mregen added the question The issue contains a question. After no activity the issue might be closed. label Oct 14, 2022
@pc-avatar-7076
Copy link
Author

Thank you @mregen! I noticed that PR but the impact sailed over my head. Indeed, when connecting as an admin I am able to browse/subscribe the SubscriptionDiagnosticArray node:

image

However, when connecting as a non-admin, I would have expected from your comment to see my own subscription, but that doesn't appear to be my experience (the SubscriptionDiagnosticsArray is missing):

image

Looking at the PR, specifically the HasApplicationSecureAdminAccess implementation, it looks like it returns false for anonymous and non-admin users. Perhaps this is functioning as intended?

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@mregen mregen transferred this issue from OPCFoundation/UA-.NETStandard-Samples Nov 14, 2022
@mregen
Copy link
Contributor

mregen commented Dec 11, 2022

@mrsuciu please check if the PR causes this issue.

@EthanChangAED EthanChangAED removed the question The issue contains a question. After no activity the issue might be closed. label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants