Unable to login to Argo UI embedded inside python flask application via iframe. How to fix? #11837
-
Unable to login to ArgoCD UI which is embedded inside my python flask application. I have changed the configuration of argocd ConfigMap, apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: argocd-cmd-params-cm
app.kubernetes.io/part-of: argocd
name: argocd-cmd-params-cm
data:
server.x.frame.options: allow-from "https://my-app.com/"
server.content.security.policy: frame-ancestors * So that, I'm able to access the page but unable sign in using admin credentials or using SSO with Microsoft. But generally I'm able to sign in to the argocd UI using SSO and admin credentials from https://argocd.my-app.com/ without any issues. But I'm unable to sign in from my application which is embedded. Error message: 400 (Bad Request), http: named cookie not present and data length is less than nonce size Any advise? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 13 replies
-
By "embedded" do you mean as an It's been some years since I've used
Configuring that would allow for CSRF. Even if that were an optional config, it would mean that your server would be susceptible to CSRF now. You should also be able to workaround this if your Argo Server and Flask application are hosted on the same domain. (Cookies are usually sent in Also back-linking the similar issue that was opened in CD: argoproj/argo-cd#15565 |
Beta Was this translation helpful? Give feedback.
Oh. I can help you with this one. You can create a second
Ingress
(or second set ofpaths
) in theargo
andargocd
namespaces that use the samehost
as your application.If you can do that, you should no longer need any
iframes
, which simplifies things quite a bit (iframes
are a bit of a hacky workaround)