CustomDashboard need for token?

2 views
Skip to first unread message

Marc Boorshtein

unread,
Jan 7, 2021, 3:34:47 PMJan 7
to kiali-dev
I'm just about ready to submit a PR for https://github.com/kiali/kiali/issues/3207.  Looking at CustomDashboard (https://github.com/mlbiam/kiali/blob/ce9046032b397d3ff171b606895a154b226b0eba/handlers/dashboards.go#L23) gets the token from the request instead of loading it from the context.  Is this correct or should this code be loading the token the same any other API call would?

Thanks
Marc

Joel Takvorian

unread,
Jan 8, 2021, 4:09:12 AMJan 8
to Marc Boorshtein, kiali-dev
Hi Marc,

Yes I don't see any reason why it should differ from the other calls that make use of tokens. I haven't followed in deep the changes you are doing, but if it can help here is a brief explanation of how the custom dashboards wrt prometheus connection:

- It queries prometheus, but not necessarily the same prometheus as the "main" one that is used in other places. An alternate prometheus might be configured for the sole purpose of custom dashboards (described here: https://github.com/kiali/kiali-operator/blob/master/deploy/kiali/kiali_cr.yaml#L408-L430)
- So, this alternate prometheus can come with its own authentication settings
- If the alternate prometheus is not configured, then the "main" prometheus is used (the switch happens there: https://github.com/kiali/kiali/blob/master/business/dashboards.go#L34-L37 )

But the same logic should apply, I think, regarding how the tokens are read.
I hope I answered your question, let me know...


--
You received this message because you are subscribed to the Google Groups "kiali-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kiali-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kiali-dev/75b8b810-4234-46eb-8aab-95837f45fe05n%40googlegroups.com.

Marc Boorshtein

unread,
Jan 8, 2021, 9:43:51 AMJan 8
to kiali-dev
Awesome, thanks Joel!
Reply all
Reply to author
Forward
0 new messages