Is there any superset API to open dashboard? - apache-superset

I have been using superset. I want to bypass the login page. To do so I did the following in a js file
Got token using login API
Got dashboard URL using dataset find API
I have tried to open the dashboard url and I am getting login page eventhough I already hit login API to get the tokens. I want to know is there any way or build in API in superset to open the superset dashboard bypassing the login page.

Thank you for your support. I have implemented SSO in superset. I have done the following things hope it might be helpful for others.
Inside security folder create your own login/logout method inside init.py file.
Update CUSTOM_SECURITY_MANAGER from None to your custom class(defined inside security folder).
I have followed this link https://github.com/dpgaspar/Flask-AppBuilder/blob/master/flask_appbuilder/security/manager.py.

Related

Why django user created via google auth without social application token?

enter image description hereUsing django-allauth users signed-in via google API, but social application token is not being created, how to get it?
FIX:
In your project settings.py file add SOCIALACCOUNT_STORE_TOKENS = True. Its default is set to False, as seen in the bottom of the configuration documentation.
Had the exact same problem, (probably) due to following old tutorials. Hope this works for you!

Auto login in django webapp opened in an iframe inside microsoft dynamics

Situation:
I have a developed a webapp using django which uses the default authentication middleware.All the views are login_required. Now client wants when he will login into CRM then webapp will open in an iframe and he should be auto logged inside django webapp as well.
Issues:
Opening webapp inside an iframe in CRM can be done. But how can django webapp create a session for the user logged in inside CRM? Django uses its own authentication, CRM uses its own. Even If i link Django authentication with azure active directory , still username and password has to be entered in the iframe.I cannot figure out how auto login will be done.
Update
I don't have CRM screenshot with me but i have the same use case in microsoft teams.
Now in this image my webapp is opened in teams tab and what i know tabs use iframe to open the page.The username and password which is being asked in the screenshot are validated by Django Authentication Backend. Once username and password are entered and verified, dashboard will open.
Requirement:
I don't want this login page to be opened , i want that dashboard will open directly. In simple words, authenticating in teams should authenticate my Django app as well.
In ROPC , username(userPrinicpalName) and password are required, how will django webapp opened in iframe will access username and password? I don't think that client can simply store password in browser's local storage as passwords are encrypted.
Second approach:
Right now dashboard opens at www.example.com. I can create a url like www.example.com/<id_token>/ and when this url will hit my server , i can validate this id_token and authenticate the user. But question here is does CRM has the ability to provide id_token in iframe src?
P.S: I don't have Microsoft Dynamics screenshot with me but i quickly implemented this in teams as i think use case is same.
Newest
Or you can use Microsoft identity platform and the OAuth 2.0 client credentials flow.
Post
1. 401- Unauthorized authentication using REST API Dynamics CRM with Azure AD
You can use ROPC flow to achieve this requirement.
I believe that any page opened by your iframe should have a parameter to record user information, right, suppose it is an id token. When you open the page in your iframe, when the page is initialized, that is, use ROPC flow in $(documnet).ready(function(){}) to log in silently. There will be no pop-up window prompting you to log in, wait for success After that, the callback method will get the id token so you can achieve your needs.
The above is just an idea, the specific implementation can be coded according to the needs of the project.
For more details, you can refer my answer in below posts.
1. Could I sign into embedded PowerApp via Microsoft LiveID Account “quietly”?
2. Is there a way to improve the performance of MSAL-browser js login?
3. How to tell if a user has an active Azure session, in html page, before SSO?

Creating a login for PowerBI dashboard?

I need to create a dashboard but I don't want it to be seen by everyone and I need to create a login form for that.
Option 1 : I can create a asp.net page for login and after successful login I can show the dashboard.
Option 2: Which I want to know that- Does PowerBI contains some login kind of functionality so that I don't need to upload a .net web page !!
Can someone provide me the link or tutorial for the same?
Thanks for the help.
Option 1 : I can create a asp.net page for login and after successful login I can show the dashboard.
This wouldn't work because if the person knew the URL of the page, they wouldn't need to defer to your ASP.NET login page and just go straight for the source (once they found out the URL).
The only way I know you can manage private dashboards is by creating workspaces within Power BI which you can provision access to certain users or accounts. This requires you to upgrade to Power BI Pro however and is not offered in the free version.

wso2 dashboard user information recovery

Does the WSO2 dashboard allow for User information recovery? I am looking at it currently, and documentation shows that it allows for users to log in and manage their account. Does the Dashboard also support User Information Recovery, (i.e. resetting the password or finding a forgotten username). And if it does, what values in the configuration file do I need to modify?
Yes it does. Sort of. Here is a sample app that, I'm guessing, the WSO2 folks created.
http://cgchamath.blogspot.com/2013/12/password-recovery-with-wso2-identity.html
The example at the bottom has a readme with how to configure the server. What i did was to add a button to the dashboard login page that loaded the configured sample app, then rebranded the sample to make it look more like the dashboard page.

How to read Facebook Insights for a Native/Desktop app programmatically

Unfortunately I'm struggling to understand the documentation provided by Facebook.
This is the scenario:
- Some of my iPhone Apps are also registered as Native/Desktop Apps on Facebook in order to support the Facebook Audience Network.
- I'm building a tool in python which will retrieve data from the reporting API in order to run some automated analysis on specific metrics (request, impressions and so on).
The question is: how do I retrieve this data?
The documentation for the reporting API is here: Reporting API
However I'm struggling with the access token.
It says that I could use the specific App Token available here: App Tokens
However by using such token, I get an error saying that app tokens can't be used for Desktop/Native Ads.
What is the correct way to do it then? Here is where I struggle to understand Facebook Documentation.
My guess is that I should use a User Access Token instead, generated for a user that is also the admin of the App for which I want to retrieve the insights.
What really freaks me out is that apparently, this can't be done with normal HTTP calls only but it requires instead to go through the Facebook Login Dialog. I also need to create another Facebook (web) app because there is no way to get a simple "User Object"... Everything needs to start and go through a registered Facebook App. And there's no way to go through these steps by using backend code only.
So... to recap... in order to read the Insights for a Native/Desktop Facebook App (APP_A), I have to:
- Create a new Web Facebook App (APP_B)
- Create a web interface somewhere for APP_B) which will trigger the Facebook Login Dialog and request the read_insights permission.
- Login through this web interface and generate a User Access Token
- Put this User Access Token in my backend code and run the scripts that retrieve the data provided by the Reporting API for APP_B
Really... to me... it doesn't make any sense to create a new Facebook App in order to access the data of another Facebook App.
Isn't there another better, simpler, quicker, cleaner way to achieve the same final result?