User and passphrase static in the url

43 views
Skip to first unread message

Allan Kardec Silva

unread,
Jul 31, 2017, 1:50:00 PM7/31/17
to Saiku Dev
I'm trying to do a saiku PoC for my bosses so I installed saiku ce in a server ubuntu 14, I publish two cubes and shared the link with them.
But they not want to do application login, actually they want click in a link and start to do queries in your cubes, my problem is that I'm using user roles for separate cubes access for login.
Someone knows how I could pass a user and passphrase in url specific? Like user/pass finan/finan and my boss in the financial department visualize only cubes that your area.

If my idea wasn't the best option I accept suggestions.

Best Regards

Isaias Sanchez

unread,
Aug 1, 2017, 3:52:09 AM8/1/17
to d...@saiku.meteorite.bi

I did something like this some time ago, but for my solution you should use different domains for each user, for example:

Saiku web access with login was the type: saiku.mydomain.com

user1_hash.mydomain.com

user2_hash.mydomain.com

All domains enter to saiku using serverAlias in apache.

Then in the file: tomcat/webapps/ROOT/js/saiku/Settings.js

Add some lines like:

if (window.location.hostname && (window.location.hostname == "user1_hash.mydomain.com" )) {
    Settings.USERNAME = "user1";
    Settings.PASSWORD = "password1";
    Settings.DEMO = true;
    Settings.UPGRADE = false;
}

if (window.location.hostname && (window.location.hostname == "user2_hash.mydomain.com" )) {
    Settings.USERNAME = "user2";
    Settings.PASSWORD = "password2";
    Settings.DEMO = true;
    Settings.UPGRADE = false;
}

In that way each domain enter saiku using this particular user without asking for password.

Hope it helps,

Isaias S.

Allan Kardec Silva escribió el 31/07/17 a las 17:50:
--
You received this message because you are subscribed to the Google Groups "Saiku Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@saiku.meteorite.bi.

Allan Kardec Silva

unread,
Aug 1, 2017, 8:49:35 AM8/1/17
to Isaias Sanchez, d...@saiku.meteorite.bi
Dear Isaias,

Thanks for your help, do you have some tutorials or references links where I can learn how to implement different domains in the saiku like do you did?
My skills are more stronger into database and ETL I'm starting now with web programming and applications.

Best wishs!

To unsubscribe from this group and stop receiving emails from it, send an email to dev+unsubscribe@saiku.meteorite.bi.

--
You received this message because you are subscribed to a topic in the Google Groups "Saiku Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/saiku.meteorite.bi/d/topic/dev/YipyMybRLa4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dev+unsubscribe@saiku.meteorite.bi.



--
Allan Kardec
Analista de DW/ETL
pessoal: alla...@gmail.com
cel 55 61 9125-4157

Isaias Sanchez

unread,
Aug 1, 2017, 9:09:20 AM8/1/17
to d...@saiku.meteorite.bi

You must own the domain name, be able to create subdomains and to point them to your saiku server, thein in Saiku server apache configuration you should add a virtualhost:

NameVirtualHost *:80

<VirtualHost *:80>
   ProxyPass / ajp://localhost:8009/
   ServerName saiku.mydomain.com
   ServerAlias    user1_hashed.mydomain.com
   ServerAlias    user2_hashed.mydomain.com
</VirtualHost>

But it can also be implemented using different IP address configured at the same network addapter using IP Aliasing.

If the Saiku Server IP is: 10.0.0.1 you can add two more IPs as alias: 10.0.0.2 and 10.0.0.3 and then the Settinngs.js will be:

if (window.location.hostname && (window.location.hostname == "10.0.0.2" )) {


    Settings.USERNAME = "user1";
    Settings.PASSWORD = "password1";
    Settings.DEMO = true;
    Settings.UPGRADE = false;
}

if (window.location.hostname && (window.location.hostname == "10.0.0.3" )) {


    Settings.USERNAME = "user2";
    Settings.PASSWORD = "password2";
    Settings.DEMO = true;
    Settings.UPGRADE = false;
}

Not sure if it's necessary to add the port.

user1 should go to: http://10.0.0.2:8080/ and user2 to: http://10.0.0.3:8080/

Look in google: how configure virtualhost in apache for your Operating System or How set up ip aliasing in your OS.

Cheers,


Allan Kardec Silva escribió el 01/08/17 a las 12:49:

Allan Kardec Silva

unread,
Aug 17, 2017, 6:12:12 PM8/17/17
to Saiku Dev
Hi Isaias, 

I had been a little busy so I don't thanked you for your help. My very much thanks, after your help I studied and get it implement the solution.
Worked fine and I believe that my bosses will get it the enterprise version.

My best wishes.
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@saiku.meteorite.bi.

--
You received this message because you are subscribed to a topic in the Google Groups "Saiku Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/saiku.meteorite.bi/d/topic/dev/YipyMybRLa4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dev+uns...@saiku.meteorite.bi.
Reply all
Reply to author
Forward
0 new messages