Git Product home page Git Product logo

salesforce-elf-browser's Introduction

Event Log File Browser

A Salesforce connected web app to access and download Event Log Files. Access it on Heroku.

Overview

Salesforce event log file is a file-based API to get your Salesforce organization's application log data. These files provide visibility into your org for security auditing, application performance, and feature adoption.

Event log file browser is a Salesforce connected app built with Ruby on Rails to help you access and download event log files. The downloads are streamed to the web client via the Rails application using Rail's ActionController::Streaming.

Hosting your own instance of Salesforce Event Log File Browser

Heroku

Deploy

Other platforms

Follow these steps if you wish to host your own instance of the application on any Rails hosting platform.

Create Salesforce consumer key and secret

This step can be performed from any Salesforce organization.

  1. Navigate to Setup > Create > Apps > Connected Apps > New
  2. In the New Connected App page, check Enable OAuth Settings.
  3. Enter the callback URL. For localhost, use http://localhost:3000/auth/salesforce/callback. If it's hosted, use https://<your domain>/auth/salesforce/callback. If you do not use SSL, you must set config.forcessl = false in config/environments/production.rb
  4. Add Access and manage your data (api) to the Selected OAuth Scopes.
  5. Fill out the remaining required fields and click Save.
  6. Once you save, you'll be taken to a page that has the consumer key and consumer secret.
  7. Repeat steps 1-6 for sandbox instance with a slight change in step 3 -- replace .../auth/salesforce/callback with .../auth/salesforcesandbox/callback
  8. Note your consumer key and secret and for both production and sandbox instances.

Configure and start Rails or Docker

Configure the following environment variables.

  1. SALESFORCE_ELF_CONSUMER_KEY: (required) Salesforce consumer key for production from previous section.
  2. SALESFORCE_ELF_CONSUMER_SECRET: (required) Salesforce consumer secret for production from previous section.
  3. SALESFORCE_ELF_SANDBOX_CONSUMER_KEY: (required) Salesforce consumer key for sandbox from previous section.
  4. SALESFORCE_ELF_SANDBOX_CONSUMER_SECRET: (required) Salesforce consumer secret for sandbox from previous section.
  5. SECRET_KEY_BASE: (required) Secret key for encryption that you can generate using rake secret. Rotate the keys periodically.
  6. ELF_MAX_DOWNLOAD_FILE_SIZE_IN_BYTES: (optional) The maximum size of file allowed via streaming download. Default is 5_000_000 (~5MB).
  7. ELF_GOOGLE_ANALYTICS_TRACKING_ID: (optional) For Google Analytics tracking.

If using Rails, once the environment variables are setup, you can start the application using rails server or foreman start.

If using Docker, the environment variables can be added to a .env file or passed through to the container and started with docker-compose up

Issues

Report bugs and issues here.

ELF Browser Security

The ELF browser is a stateless application running on Heroku, an official Salesforce property which is using https. The Salesforce browser is always deployed from code which is checked into the public open source repository, allowing anybody to audit to security of the applications code. At this time, the only people who have commit privileges which allow merging of pull requests to the open source repository are official Salesforce employees. The only people that can deploy the ELF browser are official Salesforce employees.

The ELF browser application doesn’t store any customer data including logins or oauth credentials. The application does use Google Analytics for tracking application user metrics such as browser types, and locations.

The ELF browser uses oauth for the login flow which is done through Salesforce, so when the user logs in they are using an official Salesforce login. When a user first authorizes the Salesforce browser to do operations (query and retrieve event log files) on the users behalf a connected app is installed in the users org and can be uninstalled or locked down by the orgs administrator. The org that contains the connected app is also maintained by an official Salesforce employee.

We maintain a secret key within the Heroku deployment which is rotated periodically, which allows us to invalidate all logins and reinitiating the login flow again.

Log data is not stored in Heroku. The only data which is stored are generic user metrics via Google Analytics. All logins and authorizations are done through Salesforce allowing the user full control of the authorizations so it’s no different as far as security is concerned, than logging into the official Salesforce front pages (https://login.salesforce.com for production or https://test.salesforce.com for sandbox). The app can also be deployed by a customer using the instructions at https://github.com/abisek/salesforce-elf-browser in their own Heroku instance and utilizing their own Developer Edition org to deploy a connected app in which to control oauth scopes.

Safe Harbor

Safe harbor, the Salesforce ELF browser is not an official Salesforce product we make no guarantees on the safety, security, or maintenance of the project or the deployed app and customers should not base their purchasing decision on the current feature set or future roadmap of this application.

Contributors

(Listed in no particular order)

  • Abhishek Sreenivasa - developer and maintainer
  • Adam Torman - QA and product management
  • Soumen Bandyopadhyay - QA
  • Ivan Weiss - QA
  • Justine Heritage - documentation
  • Aakash Pradeep - QA

salesforce-elf-browser's People

Contributors

abisek avatar iweiss-crm avatar momoneyriches avatar syne-sf avatar trevorscott avatar tristenmiller avatar vividboarder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

salesforce-elf-browser's Issues

Event log files do not render any items

Hello -

when I login to my instance and request an audit 'exportreports' nothing renders or shows up even when I expand the date range to a year. I notice nothing renders for any of the actions I attempt to download.

Export More Than One Day?

Hi, thank you for a great tool!

Is there a way in the configuration to export more than one day? Currently, we can only export a CSV for each day, but it would be massively helpful if we could export a whole month, say...

Thank you!

Joseph

We're sorry, but something went wrong.

When logging into the app, I immediately get a message that reads:

We're sorry, but something went wrong.
If you are the application owner check the logs for more information.

image

  • I've tried both Firefox and Chrome.
  • I've verified the logs exist for the date range presented on the url
  • I've changed the date ranges to see if that makes a difference.

Nothing I've tried so far results in anything different than the error I posted above.

What else can I try?

Daily Logs are not appearing

Hi
For the last 5 days, the Daily logs cumulative are not visible. For the past few days, even the daily logs are not visible

Error on Login

We are intermittently receiving a "We're sorry, but something went wrong. If you are the application owner check the logs for more information" error when logging into production. If we get the error, sometimes we can refresh and get into the logs, otherwise we get the same error.

Occasional 500 error

This tool works well for majority of the time, but sometimes it doesn't, and ends with 500 error code continuously whatever we try.

I typically faced this issue after login and while performing searches. But once I start getting this error, it will continue to fail irrespective of login or searches. Sometimes a refresh will bring the app back, but most of the time it will continue to fail for long time irrespective of clearing cache or trying in incognito.

It seems to match with these existing issues

#17
#39
#24

OAuth2 login failed. Reason: OAUTH_APP_ACCESS_DENIED

Hello - I have enabled event monitoring on one of our production environments, but I am getting the above error when trying to log into this tool. Are there any permission sets or system permissions I must enable to let this tool gain access to my org's data?

No Files Showing

Hi,

We're trying to view out API call logs but when I use the ELF Browser, I can see no records for anything.
I'm logged in with my production credentials and am the system admin for our Org, when I click show'All' for today, nothing at all is shown?
Do I need to set permissions or should I buy a license?
Would appreciate some help.

Many thanks,
Ed

1 month data download

Hi there,

First of all, this is a great app.
Issue : I need an option to download one month data ( Last 30 days) into as one file. Is there any possibility. let me know. thank you!

Regards
Sateesh

Extract file issue

Dear Heroku team,
I'm writing you here because there isn't any support contact and Application Issue doesn't work correctly...
I need some support for herokuapp extraction, could you please help us?
Salesforce team suggest us to use heroku.app for event monitoring of community, we simulated an user itinerary click and the day after we checked with heroku.app but we can see only some link in URI extraction,instead we have a detail itineray click on "Reffer", and we did't understand how we know that
UITracking (mobile clicks) tracks mobile clicks..
thank you in advance

no access

After clicking on 'Production login' I get the below message. Could you please check? Thanks!

image

Issue with salesforce-elf-browser

Hi,

I got this error message:

"We're sorry, but something went wrong.
If you are the application owner check the logs for more information."

when trying to access https://salesforce-elf.herokuapp.com via Salesforce Sandbox button.

When I look at login history in that org, it shows a successful login for that app:
Login Time Source IP Login Type Status Application Login URL Community Location
09/01/2018 9:33:52 EST AM 54.226.48.222 Remote Access 2.0 Success elf browser sandbox test.salesforce.com United States

But I cannot get to the page where I used to download logs for different event types.

I am seeing this problem in other sandboxes (that belong to different Prod orgs) as well. This used to work before the holidays, and I was able to run it multiple times.

Clearing my browser cache, using IE instead of Chrome, none of that helps.

Please advise asap?

Thank you!

Update API version from 37 to current

Salesforce will retire version 37 at some point, and even before then the locale changes will encourage many of us to get up above at least version 45. Perhaps update the variable in application_controller.rb to 55 now? Should be backwards compatible.

No files showing

Hello,

When we log into the Salesforce ELF Browser for a particular org, we are no longer seeing any files. We can see daily files up to May 31, 2022 and hourly files up to June 1, 2022 and then there are no records at all after that date. We can see files for other orgs. I am a system admin and log in with my production credentials. We can also run the following query on the org and it shows there is event monitoring data in that org as expected.

select Id, CreatedDate, LogFile from EventLogFile order by CreatedDate desc

Thanks,
Denise

No Daily logs available on Heroku app

Hourly data is available, but Zero files available for Daily intervals.

Current parameters:
Date Range: 2020-03-04 to 2020-03-04
Event Type: All, Interval: Daily
Results: Zero files available. Try changing query parameters.

No Event Log Files being returned

I'm trying my production and sandboxes, but keep getting

Zero files available. Try changing query parameters.

Is there an issue extracting event log files?

No Files Showing

Hi,

We're trying to view out API call logs but when I use the ELF Browser, I can see no records for anything, I looked on the SFDC Trailhead of how to use this tool and I'm wondering if I'm missing something obvious? I'm logged in with my production credentials and am the system admin for our Org, when I click show 'All' for today, nothing at all is shown? Would appreciate some help.

Many thanks,

Ed

elf

Always getting error when logging into Heroku

For last week we are always receiving "We're sorry, but something went wrong. If you are the application owner check the logs for more information" error when logging into production.

Issue Logging In Via Production

We're trying to access a Heroku App at https://salesforce-elf.herokuapp.com/. But having some issues with the Production Login. The Sandbox Login works fine, but Production returns an error with something went wrong and no specific error message.

I've tried applying different permission to my account but no luck. Was wondering if you guys have any insight?

Unable to filter log files

I constantly getting this error after setting date range.

We're sorry, but something went wrong.
If you are the application owner check the logs for more information.

logs for Bulk API in elf tool in heroku getting delayed

Hello Team, I'm checking the event logs for Bulk API in the elf tool in heroku and found that every time they check logs for Bulk API for example for today it will capture half of the logs under file with a specific file ID. Next day it will give complete records and add yesterday's logs as well in tha file and File ID is different. Is there any reason why it is delaying and the File ID is different and the previous file get disappeared? Can you see in the SS for May 10 file ID and log size got different and replaced with the previous one.

Captura de Pantalla 2022-05-11 a las 11 38 18

Captura de Pantalla 2022-05-17 a las 17 35 42

OAuth2 login failed. Reason: invalid_credentials

Trying to login into this app with both Sandbox and Production credentials and receiving the error "OAuth2 login failed. Reason: invalid_credentials" I read on another thread that this could be due to IP restrictions in sandboxes. what are the IP ranges that we need to add to our org to make sure this works. From read me page i make an assumption that we dont need to use connected apps as we are not hosting anything, we just want to access the heroku app using our salesforce credentials

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.