Perm-Comparator Install
Instructions to install and run Perm-Comparator locally. Ideal when your Salesforce org enforces IP restrictions — the @heroku servers are outside your IP ranges, thus you won't be able to connect using https://perm-comparator.herokuapp.com.
**Install instructions: **
Note: these instructions are for a Mac and commands to be run in terminal are prefixed with “command”
-
Get source code
- command: git clone https://github.com/john-brock/perm-comparator.git
-
Check version of Play! that is installed — Play! is a java framework, read more here: http://www.playframework.com/documentation/1.3.4/home
- command: which play
- If Play! isn't installed, download Play 1.3.4 jar.
-
extract to folder of your choice
-
create an alias for Play! in /usr/local/bin
- command: ln -s /Users/jbrock/Downloads/play-1.3.4/play /usr/local/bin
-
check: which play and play version
- play version should start Play! and version 1.3.4 should be displayed
-
Check app dependencies from directory where you cloned perm-comparator
- command: play dependencies
- you may need to run command: play dependencies —sync (read the output, Play! will tell you)
- command: play dependencies
-
Set environment variables
-
perm-comparator requires two environment variables, clientKey and clientSecret which are used to authenticate with the Salesforce connected app allowing for OAuth login / connections
-
you will need to create a new Connected App in any Salesforce org (DE or Sandbox will work)
-
Create > Apps
- New Connected App
- Fill required fields
- Enable OAuth Settings
- Callback URL: https://127.0.0.1:9000/forcedotcomoauth2/callback
- Select: Full Access and Perform Requests (refresh token)
- New Connected App
-
When app is created, keep the Consumer Key and the Consumer Secret
-
-
edit ~/.bash_profile
export clientKey= Consumer Key from Connected App in previous step
export clientSecret=Consumer Secret from Connected App in previous step- NOTE: I use a different connected app (different keys) in production on Heroku
-
command: source ~/.bash_profile
-
close and restart terminal
- ensure configs are set correctly
- command: echo $clientKey
- command: echo $clientSecret
- ensure configs are set correctly
-
-
uncomment X509 certificate settings (key and file) in conf/application.conf
- you may have to revisit this step if you have an issue connecting to https://127.0.0.1:9000 once perm-comparator starts
- not likely but may need to generate personal client and key — see this website, but also google search for X509 certificates: http://www.mobilefish.com/services/ssl_certificates/ssl_certificates.php
- you may have to revisit this step if you have an issue connecting to https://127.0.0.1:9000 once perm-comparator starts
-
uncomment https.port = 9000 in conf/application.conf
- if you don't do this or don't uncomment the X509 certs, you will get an SSL error when connecting
-
-
Start Perm-Comparator
- from directory where you cloned repository
- command: play run
- from directory where you cloned repository
-
Connect and Login
- navigate to: https://127.0.0.1:9000/ (cannot use localhost because of uri redirect mismatch for OAuth)
- login using either Production or Sandbox — uses OAuth for authentication with Salesforce -- can log into any other org, not just where connected app was created
-
Compare Users, Profiles, and Permission Sets
-
drag an item from the left-side menus to a “Drop Here” box
- drop items in multiple drop-boxes for comparisons
-
comparisons will be performed on User Permissions, Object Permissions, and Setup Entity Access (apps, connected apps, apex classes, and visualforce pages)
-