Dashboards & Visualizations

Splunk token values are visible in URL when we redirect from one page to another. How can we hide them

kumasaua
Explorer

Dear All,

Splunk token values are visible in URL when we redirect from one page to another. How can we hide them

Regards
Saurabh kumar agrawal

Tags (1)
0 Karma

niketn
Legend

@kumasaua, you can possibly extend the concept of one of my previous answer and use KV Store (example shows lookup file based implementation for simplicity) to save some information before switching to another dashboard (preferably using JavaScript code) and then switch to the new dashboard which should pick selected values from lookup file or KV Store.

https://answers.splunk.com/answers/617305/how-can-i-give-the-to-the-users-to-save-their-sele.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

kumasaua
Explorer

Actually I used |inputlookup xyz.csv in my page as a token... and use this token in my query..
something like this
index=xyz $tokenname$

data correctly show in dashboard but when i clink on search button for showing my query.. it say URL is too long...
in URL it show token value that is too long...

How I hide this token value to see my query.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

That's expected, and necessary to allow users to send a URL to someone else - that way someone else will have the same tokens set, and will see the same dashboard configuration.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Can you provide the actual example case, and the reasoning behind trying to hide the token values?

0 Karma

kumasaua
Explorer

Thank you for your quick response... but I have requirement to hide token value to someone else.

0 Karma

niyaz006
Path Finder

Hey @kumasaua , were you able to achieve this?

0 Karma

niketn
Legend

@niyaz006 @kumasaua following approach can be taken. Please try out and confirm if any assistance would be required at any step or the following is good enough 🙂

1. On click on URL redirect the form input values can be stored to KV Stored for the User logged in.

2. In the destination dashboard do not use Splunk's built in form inputs, instead use HTML inputs.

3. Fetch the values for various inputs using KV Store data for logged in user using the inputlookup and store in respective tokens within dashboard (not form tokens).

4. Delete row from KV Store as launch is complete.

5. Use Simple XML JS Extension to populate selected values from tokens to respective inputs.

6. Use Simple XML JS extension to code change/click event handler for your html inputs to set respective tokens (not form tokens) within the dashboard.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...