- ceneterlized authentication and authorization server.
- simple interface to configure clients permision.
- permision changes should propagated immediately e.g. api_rate_limit
- no username/password send throw wires, tokens instead
- token is generated using secret keys, which change automtically. whithout effecting any client
- should use the right application and have the right permission to do anything
- no need to hit auth server everytime you need to check the permission of your client rfc7519
- no more than 25ms for doing authentication, is it to low?
- easy use solution, proivide shared libraries(based in your programming language to use)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
### | |
## install: curl https://gist.githubusercontent.com/waleedsamy/6a8a214ade791a4df60777336328206f/raw/5fd0d9bbdcc2deaf3d023fcf8b682ea24350baa6/release.sh > ~/release.sh && chmod +x ~/release.sh | |
## usage: ~/release.sh | |
## usage: ~/release.sh master stable | |
## depends on: https://gist.github.com/waleedsamy/921294a0e5bdd49cf4c4 | |
### | |
usage(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables-save > /root/iptables-$(date +"%Y%m%d%H%M%S") | |
# iptables-restore < /root/iptables-20160915151528 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centurylink/openssl | |
apk add --update curl bash vim tree | |
echo "PS1='\w\$ '" >> ~/.bashrc && \ | |
source ~/.bashrc && cd | |
curl https://raw.githubusercontent.com/coreos/coreos-kubernetes/master/lib/init-ssl-ca > ~/init-ssl-ca && \ | |
chmod +x ~/init-ssl-ca | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# should have your public key added in every machine server | |
user=deploybot | |
servers=(127.18.34.122 127.18.34.123 127.18.34.124 127.18.34.125 127.18.34.126 127.18.34.127 127.18.34.128 127.18.34.129 127.18.34.130) | |
count=${#servers[@]} | |
deploy(){ | |
cluster=("$@") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Waleed Samy | |
email = waleedsamy634@gmail.com | |
[core] | |
editor = vim | |
[push] | |
default = matching | |
[sendemail] | |
smtpserver = smtp.gmail.com | |
smtpserverport = 587 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see the current limits | |
$ sysctl -a | grep maxproc | |
# increase it | |
$ sudo sysctl -w kern.maxproc=xxxx | |
$ sudo sysctl -w kern.maxprocperuid=xxx | |
# run at startup | |
$ sudo vim /etc/sysctl.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]') | |
docker build -t apps/app:latest -t apps/app:v$PACKAGE_VERSION . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ab -k -r -c 500 -n 1000 172.18.34.122:8080/ && \ | |
siege -c500 -d10 -t1M 172.18.34.122:8080/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://github.com/simonair/homebrew-dupes | |
# That repo seems to be dead, and I don't really feel like making a pull request. | |
require 'formula' | |
class Ab < Formula | |
homepage 'http://httpd.apache.org/docs/trunk/programs/ab.html' | |
url 'http://mirror.23media.de/apache//httpd/httpd-2.4.20.tar.bz2' | |
sha1 'cefe8ea4a3f81c7a08e36c80ebbd792c67ab361b' | |
depends_on 'libtool' => :build |