Skip to content

Instantly share code, notes, and snippets.

View rasheedamir's full-sized avatar

Rasheed Amir rasheedamir

View GitHub Profile
@rasheedamir
rasheedamir / .gitconfig
Last active August 29, 2015 14:05 — forked from pksunkara/config
[user]
name = <Your Name>
email = <Your Email>
[core]
autocrlf = input
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
@rasheedamir
rasheedamir / Jenkins CI on EC2.md
Last active August 29, 2015 14:06 — forked from jsuwo/BankAccount.java
Jenkins CI on EC2

The practice of automated continuous deployment ensures that the latest checked in code is deployed, running, and accessible to various roles within an organization.

Jenkins is a popular continuous integration server that is easy to install and configure

Continuous Delivery is about automation of the software development process. It combines four core disciplines:

  • continuous integration,
  • continuous testing,
  • continuous deployment and
  • continuous inspection
@rasheedamir
rasheedamir / httpd.conf
Last active August 29, 2015 14:07 — forked from bendo01/httpd.conf
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@rasheedamir
rasheedamir / Site Maintenance Page
Last active August 29, 2015 14:10 — forked from pitch-gist/gist:2999707
Site Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>

Integrate with IdP

In order for authentication to work properly both SP(FMU in this case) and the IdP(Säkerhetstjänster) must publish a meta-data document to each other. These documents are needed in order to redirect the User Agent(a user trying to log in) through the authentication flow. They also contain certificate data to sign/validate statements issued between the entities.

Add IdP meta-data to SP

The meta-data for the IdP is published on a URL depending on what environment is needed (test, acctest, prod, etc.). Let's assume we're going for acctest.

  1. Download the meta-data from: https://idp2.acctest.sakerhetstjanst.inera.se/idp/saml
  2. Save this file in the project (e.g. metadata/siths.xml)
@rasheedamir
rasheedamir / Dockerfile
Last active August 29, 2015 14:13 — forked from benschw/Dockerfile
FROM ubuntu
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get -y install mysql-client mysql-server
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
$ sudo vim /etc/init.d/mule
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
$script = <<SCRIPT
apt-get update
# Use docker's install script to install latest version.
curl -s https://get.docker.io/ubuntu/ | sudo sh
SCRIPT
^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$
// Match
2009-12T12:34
2009
2009-05-19
2009-05-19
20090519
2009123