Slackbot
05/17/2023, 6:46 PMDavid Hamilton
05/17/2023, 6:46 PMbip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.312553+0000 | opal_client.data.updater | INFO | Triggering data update with id: 853bdc25d8d1434a94d64f39e31d1515
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.313032+0000 | opal_client.data.updater | INFO | Fetching policy data
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.313605+0000 | opal_client.data.fetcher | INFO | Fetching data from url: <postgresql://postgres@example_db:5432/postgres>
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.318516+0000 | fastapi_websocket_pubsub.pub_sub_client | INFO | Connected to PubSub server <ws://opal_server:7002/ws>
bip-baaz-opal-opal_server-1 | 2023-05-17T18:31:08.326523+0000 | opal_common.git.bundle_maker | INFO | Using root manifest dir path (new-fashioned): '.'
bip-baaz-opal-opal_server-1 | 2023-05-17T18:31:08.326899+0000 | opal_common.git.bundle_maker | INFO | Compiling manifest file .manifest
bip-baaz-opal-opal_server-1 | 2023-05-17T18:31:08.332779+0000 | opal_common.git.bundle_maker | INFO | Compiling manifest file .manifest -> utils/.manifest
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.359165+0000 | opal_fetcher_postgres.provider |DEBUG | PostgresFetchProvider fetching from <postgresql://postgres@example_db:5432/postgres>
bip-baaz-opal-opal_server-1 | 2023-05-17T18:31:08.362099+0000 | opal_common.git.bundle_maker | INFO | Compiling manifest file .manifest -> rest/.manifest
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.374788+0000 | opal_client.data.updater | INFO | Saving fetched data to policy-store: source url='<postgresql://postgres@example_db:5432/postgres>', destination path='/participants'
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.389636+0000 | charset_normalizer.api |DEBUG | Encoding detection on empty bytes, assuming utf_8 intention.
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.391185+0000 | opal_client.opa.logger | INFO | Received request. PUT /v1/data/participants
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.392441+0000 | opal_client.opa.logger | INFO | Sent response. PUT /v1/data/participants -> 204
bip-baaz-opal-opal_server-1 | 2023-05-17T18:31:08.392843+0000 | opal_common.git.bundle_maker |WARNING | Path '.' is outside current .manifest directory
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.394794+0000 | opal_client.policy_store.opa_client |DEBUG | processing store transaction: {'id': '853bdc25d8d1434a94d64f39e31d1515', 'actions': ['set_policy_data'], 'transaction_type': <TransactionType.data: 'data'>, 'success': True, 'error': '', 'creation_time': '2023-05-17T18:31:08.370894', 'end_time': '2023-05-17T18:31:08.394555', 'remotes_status': [{'remote_url': '<postgresql://postgres@example_db:5432/postgres>', 'succeed': True, 'error': 'None'}]}
bip-baaz-opal-opal_server-1 | 2023-05-17T18:31:08.410901+0000 | uvicorn.protocols.http.httptools_impl | INFO | 172.25.0.5:56066 - "GET /policy?path=. HTTP/1.1" 200
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.415339+0000 | opal_client.policy.fetcher | INFO | Fetched valid bundle, id: 43dd17c961b50da8c2c7d1940e68f6106263b6ed
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.416298+0000 | opal_client.policy.updater | INFO | Got policy bundle with 49 rego files, 1 data files, commit hash: '43dd17c961b50da8c2c7d1940e68f6106263b6ed'
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.420465+0000 | opal_client.opa.logger | INFO | Received request. GET /v1/policies
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.421071+0000 | opal_client.opa.logger | INFO | Sent response. GET /v1/policies -> 200
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.431782+0000 | opal_client.opa.logger | INFO | Received request. PUT /v1/data
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.432902+0000 | charset_normalizer.api |DEBUG | Encoding detection on empty bytes, assuming utf_8 intention.
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.433725+0000 | opal_client.opa.logger | INFO | Sent response. PUT /v1/data -> 204
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.441981+0000 | opal_client.opa.logger | INFO | Received request. PUT /v1/policies/utils/string.rego
bip-baaz-opal-opal_client-1 | 2023-05-17T18:31:08.444275+0000 | opal_client.opa.logger | INFO | Sent response. PUT /v1/policies/utils/string.rego -> 200
David Hamilton
05/17/2023, 6:48 PMDavid Hamilton
05/17/2023, 6:48 PMDavid Hamilton
05/17/2023, 6:57 PMbip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.042843+0000 | opal_client.data.updater | INFO | Fetching policy data
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.043765+0000 | opal_client.data.fetcher | INFO | Fetching data from url: <postgresql://postgres@example_db:5432/postgres>
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.048093+0000 | fastapi_websocket_pubsub.pub_sub_client | INFO | Connected to PubSub server <ws://opal_server:7002/ws>
bip-baaz-opal-opal_server-1 | 2023-05-17T18:52:54.055048+0000 | opal_common.git.bundle_maker | INFO | Using root manifest dir path (new-fashioned): '.'
bip-baaz-opal-opal_server-1 | 2023-05-17T18:52:54.055241+0000 | opal_common.git.bundle_maker | INFO | Compiling manifest file .manifest
bip-baaz-opal-opal_server-1 | 2023-05-17T18:52:54.058554+0000 | uvicorn.protocols.http.httptools_impl | INFO | 172.25.0.5:56002 - "GET /policy?path=. HTTP/1.1" 200
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.084930+0000 | opal_client.policy.fetcher | INFO | Fetched valid bundle, id: f10608f2d759f1982c1e0d9eb7048d771cea4f2f
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.086008+0000 | opal_client.policy.updater | INFO | Got policy bundle with 2 rego files, 1 data files, commit hash: 'f10608f2d759f1982c1e0d9eb7048d771cea4f2f'
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.090322+0000 | opal_client.opa.logger | INFO | Received request. GET /v1/policies
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.091526+0000 | opal_client.opa.logger | INFO | Sent response. GET /v1/policies -> 200
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.094447+0000 | opal_fetcher_postgres.provider |DEBUG | PostgresFetchProvider fetching from <postgresql://postgres@example_db:5432/postgres>
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.095777+0000 | opal_client.opa.logger | INFO | Received request. PUT /v1/data
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.096312+0000 | opal_client.opa.logger | INFO | Sent response. PUT /v1/data -> 204
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.097916+0000 | charset_normalizer.api |DEBUG | Encoding detection on empty bytes, assuming utf_8 intention.
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.108535+0000 | opal_client.opa.logger | INFO | Received request. PUT /v1/policies/utils.rego
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.113937+0000 | opal_client.data.updater | INFO | Saving fetched data to policy-store: source url='<postgresql://postgres@example_db:5432/postgres>', destination path='/participants'
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.118608+0000 | opal_client.opa.logger | INFO | Sent response. PUT /v1/policies/utils.rego -> 200
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.124224+0000 | opal_client.opa.logger | INFO | Received request. PUT /v1/data/participants
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.129850+0000 | charset_normalizer.api |DEBUG | Encoding detection on empty bytes, assuming utf_8 intention.
bip-baaz-opal-opal_client-1 | 2023-05-17T18:52:54.131198+0000 | opal_client.opa.logger | INFO | Sent response. PUT /v1/data/participants -> 204
David Hamilton
05/17/2023, 6:58 PMDavid Hamilton
05/17/2023, 6:59 PMDavid Hamilton
05/17/2023, 7:04 PMOr Weis
05/17/2023, 7:16 PMOr Weis
05/17/2023, 7:16 PMDavid Hamilton
05/18/2023, 10:58 AMOPAL_DATA_CONFIG_SOURCES={"config":{"entries":[{"url":"<postgresql://postgres@example_db:5432/postgres>","config":{"fetcher":"PostgresFetchProvider","query":"SELECT * from participant_data;","connection_params":{"password":"postgres"}},"topics":["participant_data"],"dst_path":"/participants"}]}}
and in the client
-OPAL_FETCH_PROVIDER_MODULES=opal_common.fetcher.providers,opal_fetcher_postgres.provider
- OPAL_DATA_TOPICS=participant_data
basically just a slight modification of the postgres example in that I have changed the topic name and the data in the db. I would expect this needs to occur before the readiness as I cannot make decisions without this data. The problem is that the policy and data appear to be retrieved asynchronously and the policy writes to PUT /v1/data after the postgres was written to PUT /v1/data/participantsDavid Hamilton
05/18/2023, 11:00 AMOr Weis
05/18/2023, 11:34 AMShaul Kremer
05/18/2023, 11:54 AMDavid Hamilton
05/18/2023, 1:35 PMShaul Kremer
05/18/2023, 2:32 PMgit clone <https://github.com/permitio/opal.git>
cd opal
docker build -t custom_opal_server --target server -f docker/Dockerfile .
David Hamilton
05/18/2023, 2:33 PMShaul Kremer
05/18/2023, 2:35 PMDavid Hamilton
05/19/2023, 2:54 PMStep 11/75 : RUN cd /tmp/cedar-agent && cargo build ${cargo_flags} && cp /tmp/cedar-agent/target/*/cedar-agent /
---> Running in 6de99a012d55
error: could not find `Cargo.toml` in `/tmp/cedar-agent` or any parent directory
The command '/bin/sh -c cd /tmp/cedar-agent && cargo build ${cargo_flags} && cp /tmp/cedar-agent/target/*/cedar-agent /' returned a non-zero code: 101
David Hamilton
05/19/2023, 2:55 PMDavid Hamilton
05/19/2023, 3:08 PMdocker build
git clone <https://github.com/permitio/cedar-agent.git>
cd cedar-agent
git checkout 1838635f16ba6db60d16c2ca28cb257e970bdff0
cd ..
but now getting an ssl error
Step 11/75 : RUN cd /tmp/cedar-agent && cargo build ${cargo_flags} && cp /tmp/cedar-agent/target/*/cedar-agent /
---> Running in c66ac1acea36
Updating <http://crates.io|crates.io> index
Downloading crates ...
error: failed to download from `<https://crates.io/api/v1/crates/aead/0.5.2/download>`
Caused by:
[60] SSL peer certificate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate)
The command '/bin/sh -c cd /tmp/cedar-agent && cargo build ${cargo_flags} && cp /tmp/cedar-agent/target/*/cedar-agent /' returned a non-zero code: 101
Asaf Cohen
05/19/2023, 3:11 PMgit submodule init
git submodule update
this will initialize the git submodule of the cedar-agent and clone that code, and you would be able to build the docker imageAsaf Cohen
05/19/2023, 3:12 PMDavid Hamilton
05/19/2023, 3:17 PMDavid Hamilton
05/19/2023, 3:18 PM