Giter Club home page Giter Club logo

somok's Introduction

social auth mock

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.

AWS

Ireland

Singapore (ap-southeast-1)

Ohio (us-east-2)

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

Setup instructions

Mock server

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

Appliance

  1. 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/
  1. run the following command and mark the above certs as trusted:
sudo dpkg-reconfigure ca-certificates
  1. Edit the /etc/hosts and map :
MOCK_IP   facebook.com
MOCK_IP   www.facebook.com
MOCK_IP   graph.facebook.com

Load Impact Script

Set up subscription in loadImpact.com. Copy /loadimpact/loadscript.lua to a loadimpact scenario to run the load test

Jmeter

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.

  1. 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
  1. Register setup/ca-certs/fabrikam.inter.crt:
keytool -import -alias certificate_mock1 -file fabrikam.inter.crt -keystore cacerts -storepass changeit [Return]
  1. Register setup/ca-certs/FabrikamRootCA.crt:
keytool -import -alias certificate_mock2 -file FabrikamRootCA.crt -keystore cacerts -storepass changeit [Return]
  1. Don't forget to point facebook endpoints to mock server:
MOCK_IP   facebook.com
MOCK_IP   www.facebook.com
MOCK_IP   graph.facebook.com
  1. Done Jmeter is ready to go!!

somok's People

Contributors

nachoesmite avatar zamd avatar zuahmed avatar

Watchers

 avatar

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.