WrenSecurity/wrenam

Missing realm or event type when processing policy set notification

Closed this issue · 0 comments

The following error is logged in the Entitlement log after default configuration of Wren:AM 15.0.0-M2:

wrenam@676d983fba3b:~$ cat auth/debug/Entitlement 
Entitlement:06/02/2023 12:25:14:317 PM UTC: Thread[InMemoryNotificationsBroker-2,5,main]: TransactionId[e2d113c5-6ece-4480-a716-1cf0f75b5945-12]
ERROR: One or more required fields eventType, realm are missing. Discarding the PolicySet notification { "topic": "/internal/policySet", "timestamp": "2023-06-02T12:22:35.554Z", "body": { "name": "iPlanetAMWebAgentService", "realm": "/", "eventType": "UPDATE" } }
Entitlement:06/02/2023 12:25:22:690 PM UTC: Thread[InMemoryNotificationsBroker-3,5,main]: TransactionId[e2d113c5-6ece-4480-a716-1cf0f75b5945-12]
ERROR: One or more required fields eventType, realm are missing. Discarding the PolicySet notification { "topic": "/internal/policySet", "timestamp": "2023-06-02T12:22:35.554Z", "body": { "name": "sunAMDelegationService", "realm": "/", "eventType": "UPDATE" } }

PolicySetNotificationConsumer attempts to extract attributes from the notification root (SetupInternalNotificationSubscriptions.java#L63), but these attributes are wrapped in the body element (InMemoryNotificationBroker.java#L123).