Slackbot
05/03/2023, 9:07 PMraghanag
05/04/2023, 2:56 AMopal-client
to update the users location opal-client publish-data-update --src-url <https://api.country.is/23.54.6.78> -t policy_data --dst-path /users/bob/location
as per https://docs.opal.ac/getting-started/quickstart/opal-playground/publishing-data-update and I got the Event Published Successfully
message but after querying it again instead of
{"result": false}
still getting true.
May i ask what other configuration i need to do, please note that I am using kind cluster in my machine and used helm charts to bring up the postgres, client and server and port-forwarded before using opal-client
Or Weis
05/04/2023, 3:04 AMpolicy_data
, ...)
What are you seeing in the client log? Does it accept the message? Does it try to fetch the data?raghanag
05/04/2023, 5:59 AMGot policy bundle with 2 rego files, 1 data files, commit hash: 'fa45fc65800a983c3159ca6cc4e7a21a05c8c7f2'
2023-05-04T05:58:19.203031+0000 | opal_client.policy_store.opa_client | INFO | processing store transaction: {'id': 'fa45fc65800a983c3159ca6cc4e7a21a05c8c7f2', 'actions': ['set_policies'], 'transaction_type': <TransactionType.policy: 'policy'>, 'success': True, 'error': '', 'creation_time': '2023-05-04T05:58:19.183647', 'end_time': '2023-05-04T05:58:19.202705', 'remotes_status': [{'remote_url': '<http://titanopal-server:7002/policy>', 'succeed': True, 'error': None}]}
2023-05-04T05:58:19.203642+0000 | opal_client.policy_store.opa_client | INFO | persisting health check policy: ready=true, healthy=true
2023-05-04T05:58:19.203859+0000 | opal_client.policy_store.opa_client | INFO | Policy and data statistics: policy: (successful 79, failed 0); data: (successful 0, failed 0)
2023-05-04T05:58:22.036595+0000 | opal_client.opa.runner | INFO | Running OPA inline: opa run --server --addr=:8181 --authentication=off --authorization=off --log-level=info
2023-05-04T05:58:22.207411+0000 | opal_client.opa.runner | INFO | OPA exited with return code: 1
2023-05-04T05:58:23.060130+0000 | opal_client.opa.runner | INFO | Running OPA rehydration callbacks
2023-05-04T05:58:23.060607+0000 | opal_client.policy.updater | INFO | full update was forced (ignoring stored hash if exists)
2023-05-04T05:58:23.060691+0000 | opal_client.policy.updater | INFO | Refetching policy code (full bundle)
2023-05-04T05:58:23.061824+0000 | opal_client.policy.fetcher | INFO | Fetching policy bundle from <http://titanopal-server:7002/policy>
2023-05-04T05:58:23.084940+0000 | opal_client.policy.fetcher | INFO | Fetched valid bundle, id: fa45fc65800a983c3159ca6cc4e7a21a05c8c7f2
Or Weis
05/04/2023, 6:24 AMraghanag
05/04/2023, 6:47 AMOPAL_OPA_HEALTH_CHECK_POLICY_ENABLED: True
OPAL_DATA_UPDATER_ENABLED: False
Or Weis
05/04/2023, 6:49 AMraghanag
05/04/2023, 7:01 AMAsaf Cohen
05/04/2023, 7:07 AM- UVICORN_NUM_WORKERS=1
2. an issue with the OPA agent exiting - are you passing special config to the agent? i can see OPA exited with return code: 1
in the logsAsaf Cohen
05/04/2023, 7:07 AMraghanag
05/04/2023, 7:16 AMraghanag
05/04/2023, 7:17 AMAsaf Cohen
05/04/2023, 7:17 AMRo'e Katz
05/04/2023, 7:48 AMOPAL_DATA_UPDATER_ENABLED: False
, which disables getting data updates in the client…Ro'e Katz
05/04/2023, 8:31 AMserver:
dataConfigSources:
config:
entries: [{"data":{}, "dst_path":"/static", "topics":["policy_data"], "url": ""}]
Then updates should work as expected.raghanag
05/04/2023, 8:01 PMraghanag
05/04/2023, 8:17 PMOr Weis
05/04/2023, 8:26 PMraghanag
05/04/2023, 8:27 PMOr Weis
05/04/2023, 8:28 PMraghanag
05/04/2023, 8:29 PMOr Weis
05/04/2023, 8:31 PMraghanag
05/04/2023, 8:33 PMOr Weis
05/04/2023, 8:36 PMOr Weis
05/04/2023, 8:37 PMraghanag
05/04/2023, 8:38 PMOr Weis
05/04/2023, 8:40 PMraghanag
05/04/2023, 8:40 PMOr Weis
05/04/2023, 8:42 PMraghanag
05/04/2023, 8:44 PMOr Weis
05/04/2023, 8:46 PMOr Weis
05/04/2023, 8:46 PMraghanag
05/04/2023, 8:48 PMOr Weis
05/04/2023, 8:49 PMraghanag
05/04/2023, 8:53 PMOr Weis
05/04/2023, 8:57 PMraghanag
05/05/2023, 4:56 AM• Subscribes to Pub/Sub updates by topics for data and policy
Or Weis
05/05/2023, 5:06 AMraghanag
05/05/2023, 5:07 AM• Fetches data from multiple sources (DBs, APIs, 3rd party services)but what about the above statement?
Or Weis
05/05/2023, 5:14 AMraghanag
05/05/2023, 6:06 AMOr Weis
05/05/2023, 6:07 AMOr Weis
05/05/2023, 6:09 AMraghanag
05/05/2023, 6:15 AMevent telling it to fetch data from OPAL serverdoes that meant data and policies always comes to opal-client via opal-server
Or Weis
05/05/2023, 6:19 AMraghanag
05/05/2023, 6:25 AMhttps://i.ibb.co/CvmX8rR/simplified-diagram-highlight.png▾
Or Weis
05/05/2023, 6:28 AMraghanag
05/05/2023, 7:28 AMOr Weis
05/05/2023, 7:36 AMraghanag
05/05/2023, 8:26 PMOr Weis
05/05/2023, 8:38 PM