Splunk authentication through web application - splunk

I am trying to integrate splunk inside my web app (javascript, Aria templates) using iframe. The app already has a login module so I need to use the same credentials (say username: admin, password: pass) to login to splunk. For testing, I have created the same user and password in splunk also.
I have no Idea how to proceed further.

To integrate Splunk into your own web app, add the SplunkJS Stack libraries to it:
Download SplunkJS Stack.
Extract the files.
Copy the contents of the SplunkJS_Stack/static/ directory to your web site's static directory.
You can visit http://dev.splunk.com/view/webframework-developapps/SP-CAAAEW5 and https://answers.splunk.com/topics/iframe.html for further and more detailed usage and questions.

Related

How to access BigCommerce internalapi?

I am trying to download (backup) images that customers upload for products that take custom logos (these are typically JPG, PNG, PDF, etc.) These customer files are downloadable by clicking on a hyperlink in the BigCommerce admin page for the order in question. The link is not a link to the image path but instead, a link to a service that sends the file to the browser. In other words, you have to be authenticated into the admin site to download the file. The URL looks like this:
https://mystore.com/internalapi/v1/orders/383945/products/251438/attributes/561518/download
https://mystore.com/internalapi/v1/orders/{order id}/products/{lineItem id}/attributes/{option id}/download
These are easily constructed in the API itself for a given order. If I use the link in a browser tab while I'm logged into the admin site, the file downloads.
But what I am trying to write an app to automatically download all the files (there are thousands). When I try to use this URL in an app, I get a authentication error. I tried at first using my regular API credentials but then used the credentials to log into the admin site. Both give me an authentication error.
I could not find anything documented on this so-called "internalapi." Anyone ever try to use this "internal" API that is used by the admin site?
I believe authentication is cookie based for that internal API, but there could be problems with using our non-publicly documented internal APIs in production, i.e. we may make future updates that would be breaking changes.
Images attached to orders through a file upload option also get copied to WebDAV, in the dav/product_images/configured_products folder. Another way to do this could be to use a WebDAV client library like easywebdav to connect and download the files.

How to do Google Sign-In in Meteor

I've tried various tutorials and links on how to get Google Sign-In to work in Meteor to no avail. How can I create a google sign in button on my login page that redirects to my user dashboard--using iron:router perhaps (and shows the persons name in the corner), and restrict the google emails to only .edu accounts?
Also as the admin of the page how would I be able to see the emails/names of all the people who have logged into my website? Is this done through Google Analytics?
Try adding the accounts-google package. You'll need to configure the Google sign in with the application key and secret. The easiest way to do this is to also add the accounts-ui package and using
{{> loginButtons}}
which will display detailed instructions on the steps to follow on the Google page. It will also save your app key and secret tokens appropriately.
Once this is done you'll be okay using the method
Meteor.loginWithGoogle()
as explained in the docs. It takes an optional array of options and a callback function
e.g
Meteor.loginWithGoogle({}, function(error){
if(error)
//Couldn't log in
else
Router.go('/dashboard');
})
Good luck
For Google Sign-in, I would recommend installing the accounts-entry package and configuring it from your browser:
install with latest meteor version
meteor add joshowens:accounts-entry
and for meteor version before 0.9 use
mrt add accounts-entry
For your dashboard redirection, review the documentation for that package on atmospherejs.com which demonstrates how to configure your dashboardRoute:
dashboardRoute: '/dashboard'
The iron-router package is a dependency of accounts-entry, so it will be installed as well.
Access the data by launching the MongoDB shell (after starting your app):
meteor mongo
Query for the accounts using the MongoDB shell:
db.users.find()
This is not handled via Google Analytics

How to write/read a message from Google Drive text file with Email Id and Password from ASP.Net Application

I want to read/write some content to Google Drive Programmatically from a ASP.NET MVC Application. Here i want to use Email ID and Password as hot coded instead of navigating user to authentication page.
I looked at some examples, all are redirecting user to Google authentication page. But My requirement is to use a fixed Google user account.
You can no longer use username/password for authentication. Just let go of it.
You can use the steps in the answer here How do I authorise an app (web or installed) without user intervention? (canonical ?) to achieve what you are looking for

password protecting amazon s3 download link in a django template

I have a django template which contains a link to a file stored on amazon s3. This template is an email to be sent automatically from the system. I want this link to be password protected. on clicking this link, the file on s3 in opened in browser without any authentication. I want the user to first log in to my django website and then the file is opened in the website.
How can I achieve this?
Thanks,
Ammara
You would need to have the link in the email use a URL that goes to a view in your site, setup auth normally there, then have the s3 link available from some landing page behind auth on your site.
Just FYI tho: This is a really bad idea if any level of actual security is needed.

Redirect to own site when user logs in via Facebook app

I am building an app with the functionality to publish
messages to users walls while specific actions runs on
my website.
What I have done is (briefly):
Registered my own app on Facebook
Added a login button on my website with permission
to publish:
Log in on Facebook
Downloaded facebook-php-sdk library
It is now I start having problems. I do not know how
to do what I want to do now.
What I want to do:
When a user logs on to facebook via my website. I want
a file on my site to be called, where I can update the
user's data in my own database as well.
Because that is not what the canvas url is meant to do? How it
is no, seems no file at all is called on my site when
I click on Login.
Since you are using the Facebook PHP-SDK you noticed that there are two options for the users to login:
Using the XFBML button, which will:
Open a login dialog (pop-up) asking for permissions..etc
When a successful authentication/authorization is complete the dialog will close, the auth.login event will be triggered and based on that the page will get reloaded window.location.reload();
The PHP in the top of the page will get into business and $session = $facebook->getSession(); will actually retrieve a session! $user = $facebook->getUser(); will retrieve the current user
Using the Login URL generated by the Library $loginUrl = $facebook->getLoginUrl(); this URL will get you through the same flow and if you noticed there's a next redirect_uri parameter which will redirect you back after a successful process to that URL (mainly the same URL you are at), where you can change that parameter if you like.
The canvas URL is the URL Facebook uses when it displays your application from within Facebook. You would use this functionality if you expect users to use your application while in Facebook itself.
When authenticating using Facebook's API (assuming graph API usage here), you provide a redirect_uri as part of the authentication URL. Once Facebook has authorized your application, it will redirect the user's web browser to the URI you specified. This URI can be any link you desire on your site. You should use the link as the determination of when the user is logged in successfully, e.g., https://mywebsite/facebook/loggedin.