Closed lknite closed 3 days ago
Some things to try:
--sso
option and see what happens.These may help narrow down the source of the problem.
After adding the callback url 'http://localhost/auth/callback' logging in with --sso worked:
kargo login --sso https://kargo.admin.k.home.net
I see a CORS error.
I have in my helm chart:
- name: kargo.api.permissiveCORSPolicyEnabled
value: "true"
I changed permissiveCORSPolicyEnabled to false, and am getting the same error.
Verified the value is getting passed to the configmap kargo-api and I restarted the kargo-api just to be sure:
[travis@wb]$ k get cm kargo-api -o yaml
apiVersion: v1
data:
... snip ...
OIDC_ISSUER_URL: https://keycloak.admin.k.home.net/realms/home
PERMISSIVE_CORS_POLICY_ENABLED: "false"
PERMISSIVE_CORS_POLICY_ENABLED
has to do with how the Kargo API server deals with incoming cross-origin requests.
The problematic request here is one out to to keycloak.
I am wondering if this is in some way connected to recent changes @Marvin9 made to proactively detect invalid tokens.
@Marvin9 any thoughts here?
I got it working by adding a '+' to Web origins in keycloak.
Other apps have been working without that such as argocd, so not sure why it was needed here. I don't think I've ever used that option before in the last couple years. In any case, its working now so closing.
Glad this is sorted out!
Other apps have been working without that such as argocd, so not sure why it was needed here.
Kargo does OIDC with PKCE, which means the browser talks directly to the IDP. Argo CD can do that now as well, but I think it's opt in. So if you haven't had to do this before, it is probably because the API server for Argo CD or whatever else is a middle man between you and the IDP and with Kargo that isn't the case.
Checklist
Description
After successfully being redirected to keycloak for login, and logging in successfully, I'm redirected back to kargo where the kargo login screen reappears.
Troubleshooting
I'm able to see the new session within keycloak, which if deleted, causes kargo to again perform the workflow with keycloak.
Am experiencing the same issue at work and in my homelab, so I think it may be kargo.
OIDC used to work so I think maybe something changed, either a bug, or maybe I need to specify the helm chart values differently. I've reviewed the helm chart and believe I'm providing the needed values there.
After logging in (via keycloak redirect) I see a 'code' in the url, which I believe is showing the workflow worked:
I can switch over to argocd where SSO is functioning, and verify that I'm in the group that is specified in the values.yaml below.
The claims are reaching the 'kargo-admin' service account:
Steps to Reproduce
values.yaml:
Chart.yaml
Logs
In the keycloak log I saw two errors which I resolved, and am no longer seeing any errors.
Although I have increased the logLevel to DEBUG I see next to nothing in the kargo logs: