Slackbot
05/10/2023, 7:13 AMOr Weis
05/10/2023, 7:31 AMraghanag
05/10/2023, 7:36 AMOr Weis
05/10/2023, 7:37 AMraghanag
05/10/2023, 7:38 AMAsaf Cohen
05/10/2023, 7:45 AMAsaf Cohen
05/10/2023, 7:45 AMraghanag
05/17/2023, 5:51 AMcurl --request GET '<http://localhost:8181/v1/data/users>' --header 'Content-Type: application/json'
{"result":{"alice":{"location":{"country":"US","ip":"8.8.8.8"},"roles":["admin"]},"bob":{"location":{"country":"US","ip":"8.8.8.8"},"roles":["employee","billing"]},"eve":{"location":{"country":"US","ip":"8.8.8.8"},"roles":["customer"]},"sunil":{"location":{"country":"US","ip":"8.8.8.8"},"roles":["guest"]}}}
Or Weis
05/17/2023, 6:17 AMraghanag
05/17/2023, 6:20 AM|ERROR | OPA transaction failed, transaction id=5b716c71cbd7439bbc8e92e046182fdb, actions=[], error=ValueError('unexpected response code while fetching bundle: 503')
2023-05-17T06:19:47.876104+0000 | opal_client.policy_store.opa_client | INFO | processing store transaction: {'id': '5b716c71cbd7439bbc8e92e046182fdb', 'actions': [], 'transaction_type': <TransactionType.policy: 'policy'>, 'success': False, 'error': "ValueError('unexpected response code while fetching bundle: 503')", 'creation_time': '2023-05-17T06:19:47.875365', 'end_time': '2023-05-17T06:19:47.875411', 'remotes_status': [{'remote_url': '<http://titanopal-server:7002/policy>', 'succeed': False, 'error': "ValueError('unexpected response code while fetching bundle: 503')"}]}
2023-05-17T06:19:47.876433+0000 | opal_client.policy_store.opa_client | INFO | persisting health check policy: ready=true, healthy=true
2023-05-17T06:19:47.876547+0000 | opal_client.policy_store.opa_client | INFO | Policy and data statistics: policy: (successful 830, failed 427); data: (successful 1259, failed 0)
2023-05-17T06:19:47.888489+0000 | opal_client.policy.fetcher | INFO | Fetching policy bundle from <http://titanopal-server:7002/policy>
2023-05-17T06:19:47.956369+0000 | opal_common.utils |WARNING | Unexpected response code 503: {'detail': 'policy repo was not found'}
2023-05-17T06:19:47.957126+0000 | opal_client.policy.fetcher |WARNING | Failed all attempts to fetch bundle, got error: ValueError('unexpected response code while fetching bundle: 503')
2023-05-17T06:19:47.957441+0000 | opal_client...base_policy_store_client |ERROR | OPA transaction failed, transaction id=71db3f45a10b4cc48523c40850125535, actions=[], error=ValueError('unexpected response code while fetching bundle: 503')
2023-05-17T06:19:47.957653+0000 | opal_client.policy_store.opa_client | INFO | processing store transaction: {'id': '71db3f45a10b4cc48523c40850125535', 'actions': [], 'transaction_type': <TransactionType.policy: 'policy'>, 'success': False, 'error': "ValueError('unexpected response code while fetching bundle: 503')", 'creation_time': '2023-05-17T06:19:47.957289', 'end_time': '2023-05-17T06:19:47.957321', 'remotes_status': [{'remote_url': '<http://titanopal-server:7002/policy>', 'succeed': False, 'error': "ValueError('unexpected response code while fetching bundle: 503')"}]}
2023-05-17T06:19:47.957783+0000 | opal_client.policy_store.opa_client | INFO | persisting health check policy: ready=true, healthy=true
2023-05-17T06:19:47.957854+0000 | opal_client.policy_store.opa_client | INFO | Policy and data statistics: policy: (successful 830, failed 428); data: (successful 1259, failed 0)
2023-05-17T06:19:48.165346+0000 | opal_client.policy.fetcher | INFO | Fetching policy bundle from <http://titanopal-server:7002/policy>
2023-05-17T06:19:48.179707+0000 | opal_common.utils |WARNING | Unexpected response code 503: {'detail': 'policy repo was not found'}
2023-05-17T06:19:48.917980+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.1:46450 - "GET /healthcheck HTTP/1.1" 200
2023-05-17T06:19:49.180634+0000 | opal_client.policy.fetcher | INFO | Fetching policy bundle from <http://titanopal-server:7002/policy>
2023-05-17T06:19:49.192546+0000 | opal_common.utils |WARNING | Unexpected response code 503: {'detail': 'policy repo was not found'}
2023-05-17T06:19:50.698069+0000 | opal_client.policy.fetcher | INFO | Fetching policy bundle from <http://titanopal-server:7002/policy>
2023-05-17T06:19:50.714264+0000 | opal_common.utils |WARNING | Unexpected response code 503: {'detail': 'policy repo was not found'}
server logs:
|WARNING | Serving default all-data route, meaning DATA_CONFIG_SOURCES was not configured!
2023-05-17T06:20:05.388558+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:60762 - "GET /policy-data HTTP/1.1" 200
2023-05-17T06:20:05.880238+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:60768 - "GET /policy?path=. HTTP/1.1" 503
2023-05-17T06:20:07.035139+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:60772 - "GET /policy?path=. HTTP/1.1" 503
2023-05-17T06:20:07.232784+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:60782 - "GET /policy?path=. HTTP/1.1" 503
2023-05-17T06:20:07.507926+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:60786 - "GET /policy?path=. HTTP/1.1" 503
2023-05-17T06:20:08.169315+0000 | opal_server.data.api | INFO | Serving source configuration
2023-05-17T06:20:08.170475+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:60798 - "GET /data/config HTTP/1.1" 200
2023-05-17T06:20:08.228180+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:60804 - "GET /policy?path=. HTTP/1.1" 503
2023-05-17T06:20:08.291717+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:60808 - "GET /policy?path=. HTTP/1.1" 503
2023-05-17T06:20:08.638703+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:60822 - "GET /policy?path=. HTTP/1.1" 503
2023-05-17T06:20:08.687869+0000 | opal_server.data.api |WARNING | Serving default all-data route, meaning DATA_CONFIG_SOURCES was not configured!
2023-05-17T06:20:08.689151+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:60816 - "GET /policy-data HTTP/1.1" 200
2023-05-17T06:20:09.633583+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:60826 - "GET /policy?path=. HTTP/1.1" 503
2023-05-17T06:20:11.654324+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:51490 - "GET /policy?path=. HTTP/1.1" 503
2023-05-17T06:20:12.773889+0000 | uvicorn.protocols.http.httptools_impl | INFO | 10.244.1.27:51492 - "GET /policy?path=. HTTP/1.1" 503
Asaf Cohen
05/17/2023, 6:22 AMAsaf Cohen
05/17/2023, 6:22 AMraghanag
05/17/2023, 6:22 AMcmdline: git clone -v --branch=master -- <mailto:git@gitlab-odx.com|git@gitlab-odx.com>:main/code/opa-policies-and-data.git /opal/regoclone/opal_repo_clone
stderr: '06:20:33.214788 git.c:444 trace: built-in: git clone -v --branch=master -- <mailto:git@gitlab-odx.com|git@gitlab-odx.com>:main/code/opa-policies-and-data.git /opal/regoclone/opal_repo_clone
Cloning into '/opal/regoclone/opal_repo_clone'...
06:20:33.233708 run-command.c:664 trace: run_command: unset GIT_DIR; GIT_PROTOCOL=version=2 'ssh -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -i //opal/.ssh/opal_repo_ssh_key' -o SendEnv=GIT_PROTOCOL <mailto:git@gitlab-odx.oracledx.com|git@gitlab-odx.oracledx.com> 'git-upload-pack '\''cx-sales/code/titan/titan-opa-policies-and-data.git'\'''
fatal: Remote branch master not found in upstream origin
fatal: the remote end hung up unexpectedly
remote:
remote: ========================================================================
remote:
remote: rpc error: code = Canceled desc = user canceled the fetch
remote:
remote: ========================================================================
remote:
'
Asaf Cohen
05/17/2023, 6:23 AMRemote branch master not found in upstream origin
Asaf Cohen
05/17/2023, 6:23 AMAsaf Cohen
05/17/2023, 6:23 AMraghanag
05/17/2023, 6:23 AMAsaf Cohen
05/17/2023, 6:23 AMraghanag
05/17/2023, 6:23 AMAsaf Cohen
05/17/2023, 6:24 AMraghanag
05/17/2023, 6:24 AMAsaf Cohen
05/17/2023, 6:24 AMraghanag
05/17/2023, 6:24 AMraghanag
05/17/2023, 6:25 AMThe passed value must be the contents of the SSH key in one line (replace new-line with underscore, i.e: \n with _)
Asaf Cohen
05/17/2023, 6:25 AMAsaf Cohen
05/17/2023, 6:26 AMAsaf Cohen
05/17/2023, 6:26 AMAsaf Cohen
05/17/2023, 6:26 AMAsaf Cohen
05/17/2023, 6:27 AMraghanag
05/17/2023, 6:29 AMraghanag
05/17/2023, 6:29 AMid_ed25519
Asaf Cohen
05/17/2023, 6:30 AMAsaf Cohen
05/17/2023, 6:31 AMAsaf Cohen
05/17/2023, 6:31 AMraghanag
05/17/2023, 6:32 AMAsaf Cohen
05/17/2023, 6:32 AMraghanag
05/17/2023, 6:37 AMraghanag
05/17/2023, 6:40 AMShaul Kremer
05/17/2023, 9:35 AMmkdir /tmp/policy
cp your_rego_files.rego /tmp/policy/
cd /tmp/policy
git init
git add *.rego
git commit
docker run -p 7002:7002 -v /tmp/policy:/policy -e OPAL_POLICY_REPO_URL=/policy permitio/opal-server:latest
Also, as this is an actual git repository mapped as a volume, any changes you commit outside of the container will be reflected in OPAL.raghanag
05/17/2023, 6:18 PMraghanag
05/19/2023, 3:55 AM