somok
is created to load test Auth0 social connection by mocking various social providers (intially facebook only).
It's a basic OAuth2 authorization server built on top of oauth2rize framework and uses loki.js as the inmemory database to store users and OAuth2 transaction state.
Note: Cloudformation Template works for: us-east-1, us-east-2, us-west-1, us-west-2, eu-west-1, eu-central-1, ap-southeast-1
git clone https://github.com/zamd/somok.git
cd somok/setup
sudo ./setup.sh
Make sure nginx.conf
is copied to /etc/nginx
folder and certs are copied to /etc/nginx/ssl
folder
cd ..
nave use stable
node .
To see debugging output use following:
DEBUG=somok node .
The mock facebook authorization server should be running and fronted by nginx
- On all appliance nodes add the root certificate in
trusted roots
, that means:
copy setup/ca-certs/fabrikam.inter.crt &
setup/ca-certs/FabrikamRootCA.crt to /usr/share/ca-certificates/
- run the following command and mark the above certs as trusted:
sudo dpkg-reconfigure ca-certificates
- Edit the
/etc/hosts
and map :
MOCK_IP facebook.com
MOCK_IP www.facebook.com
MOCK_IP graph.facebook.com
Set up subscription in loadImpact.com
.
Copy /loadimpact/loadscript.lua
to a loadimpact scenario to run the load test
If your intention is to run the social.jmx script or any other Jmeter script you need to trust setup/ca-certs/fabrikam.inter.crt
and setup/ca-certs/FabrikamRootCA.crt
certs
in the Java keystore.
- Identify the jvm that Jmeter uses. This is generally your JAVA_HOME environment varaible. On Mac Usually is at
/Library/Java/JavaVirtualMachines/JDK_VERSION.jdk/Contents/Home/jre/lib/security
- Register
setup/ca-certs/fabrikam.inter.crt
:
keytool -import -alias certificate_mock1 -file fabrikam.inter.crt -keystore cacerts -storepass changeit [Return]
- Register
setup/ca-certs/FabrikamRootCA.crt
:
keytool -import -alias certificate_mock2 -file FabrikamRootCA.crt -keystore cacerts -storepass changeit [Return]
- Don't forget to point facebook endpoints to mock server:
MOCK_IP facebook.com
MOCK_IP www.facebook.com
MOCK_IP graph.facebook.com
- Done Jmeter is ready to go!!