-
I have set up GitLab on an EC2 instance and created a repository that includes policy.rego and data.json files. On another EC2 instance, I installed the OPAL server, OPAL client, and OPA using pip. I configured the OPAL server and client by providing the necessary environment variables within executable shell files. Specifically, for the OPAL server, I set the OPAL_DATA_CONFIG_SOURCES environment variable as follows: Here are my settings: opal-client.sh file contains: Despite including the access token in the Authorization header, the OPAL client encounters an error where it is redirected to the GitLab sign-in page when attempting to fetch the data.json file. It appears that the URL provided in the OPAL_DATA_CONFIG_SOURCES variable leads to a login page instead of directly accessing the JSON file. I need assistance in resolving this issue so that the OPAL client can successfully fetch the data.json file from the GitLab repository without encountering a redirection to the sign-in page. Any advice on proper configuration or troubleshooting steps would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi @keyan4858 ! |
Beta Was this translation helpful? Give feedback.
-
Hi @keyan4858 -
|
Beta Was this translation helpful? Give feedback.
Hi @keyan4858 -
Usually when OPAL is accessing Git for policy, including for policy data in the form of a data.json file that is not done via the data-sources config but rather by setting up the repository as a policy source - please consider that alternative path.
Are you able to access
http://3.129.51.36/Naruto/OPA/raw/main/data.json
directly from the same machine as the OPAL-client , with that same secret - if not the problem is likely not OPAL related.If 1,2 don't work for you - please include the logs for the OPAL client trying to fetch the file; so we can see the error.