This message was deleted.
# opal
s
This message was deleted.
j
Image :
o
Hi @Jack Geek, Did you follow the instructions for GITLAB here? https://docs.opal.ac/tutorials/track_a_git_repo#working-with-different-git-services
If this doesn’t help please share your configuration
j
Hi @Or Weis, yes I followed that instructions, I have a second problem, after I trigger the push, I have this 401 error on OPAL server side :
o
Seems that your webhook is malformed or doesn’t match what OPAL expects.
j
here is my K8S containers config :
containers:
- name: opal-server
image: permitio/opal-server:0.4.0
ports:
- name: http
containerPort: 7002
env:
- name: OPAL_POLICY_REPO_URL
valueFrom:
secretKeyRef:
name: opal-server-secret
key: OPAL_POLICY_REPO_URL
- name: OPAL_POLICY_REPO_SSH_KEY
valueFrom:
secretKeyRef:
name: opal-server-secret
key: OPAL_POLICY_REPO_SSH_KEY
- name: OPAL_POLICY_REPO_WEBHOOK_SECRET
valueFrom:
secretKeyRef:
name: opal-server-secret
key: OPAL_POLICY_REPO_WEBHOOK_SECRET
- name: OPAL_POLICY_REPO_WEBHOOK_PARAMS
value: "{\"secret_header_name\":\"X-Gitlab-Token\",\"secret_type\":\"token\",\"secret_parsing_regex\":\"(.*)\",\"event_header_name\":\"X-Gitlab-Event\",\"push_event_value\":\"Push Hook\"}"
- name: OPAL_LOG_FORMAT_INCLUDE_PID
value: "true"
- name: OPAL_DATA_CONFIG_SOURCES
value: "{\"config\":{\"entries\":[]}}"
- name: OPAL_POLICY_REPO_MAIN_BRANCH
value: develop
on Docker Compose, it did fetch the old policies but the Webhook does not work
Same error :
o
Can you share the body and header of the incoming webhook ?
Re: No secret was provided - maybe you misconfigured it on Gitlab ?
j
@Or Weis not really, as you see Gitlab senfs the secret
o
@Raz Co is taking a deeper look.
Another thing to check for the K8s for you don’t get the 401; is to make sure that XXXXX in
git_http_url
matches what you have in :
OPAL_POLICY_REPO_URL
j
Hi @Or Weis, but the
git_http_url
is the HTTP url and I configure the repo URL with the SSH url, should I change it ?
I can't use the HTTP url in
OPAL_POLICY_REPO_URL
o
The feature to ignore the schema (HTTPs/ SSH) in the webhook URL check was added in OPAL 0.5.0
j
So I think I'm blocked 😞 OPAL 0.5.0 does not work for me on K8S : https://permit-io.slack.com/archives/C01RUUYV3TP/p1677596037607489 Same deployment file works on 0.4.0 but not 0.5.0
o
Yeah, I’ve seen that thread. 😞 Something is very odd here indeed