permitio / PDP

8 stars 4 forks source link

Workaround topics issue #135

Closed roekatz closed 7 months ago

roekatz commented 7 months ago

This replaces that backend PR: https://github.com/permitio/permit-backend/pull/2004

It's a similar fix - changing opal-client's configured data topics to use the shorter format (without the /{scope_id} suffix), Thus making the first data updater fetch of the scope's DataSourceConfig (that has the shorter format of the topic) effective.

Doing this in the sidecar itself enables us to still use the longer version in relay's PDP pings - that's important because opal-relay assumes the topics updates are published to perfectly match the topics the targeted PDP reports (Unfortunately opal-relay is unaware of the hierarchical structure of topics, in which listening to xyz implicitly includes listening to xyz/{scope_id})

roekatz commented 7 months ago

@asafc DataUpdater already have an info log "Subscribing to topics: [...]". Do you still want me to add another log msg for editing the topics in sidecar?

asafc commented 7 months ago

@asafc DataUpdater already have an info log "Subscribing to topics: [...]". Do you still want me to add another log msg for editing the topics in sidecar?

yes, because one log line will have the effective topics and another log line should have the original topics before the edit.