Skip to content

Instantly share code, notes, and snippets.

View rasheedamir's full-sized avatar

Rasheed Amir rasheedamir

View GitHub Profile

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 / Continuous Delivery.md
Last active August 29, 2015 14:11
Continuous Delivery

Docker

Fact: docker is an abstraction on top of LXC Containers. This means you can run an isolated “virtual machine” (container) within your Linux-based distro. Containers are extremely lightweight and you can start a new container very quickly. You can use containers to run your websites, databases, etc, in a isolated environment. In theory you should be able to use containers to run low-latency operations such as an individual database transaction

12 Factors App!

@rasheedamir
rasheedamir / solid principles.md
Last active August 29, 2015 14:11
solid principles
@rasheedamir
rasheedamir / Git.md
Last active August 29, 2015 14:11
Git

Workflow

Git Workflow

Pull Requests

Aside from isolating feature development, branches make it possible to discuss changes via pull requests. Once someone completes a feature, they don’t immediately merge it into upstream branch (i.e. develop/master). Instead, they push the feature branch to the central server and file a pull request asking to merge their additions into upstream (i.e. develop/master). This gives other developers an opportunity to review the changes before they become a part of the main codebase.

Code review is a major benefit of pull requests, but they’re actually designed to be a generic way to talk about code. You can think of pull requests as a discussion dedicated to a particular branch. This means that they can also be used much earlier in the development process. For example, if a developer needs help with a particular feature, all they have to do is file a pull request. Interested parties will be notified automaticall

@rasheedamir
rasheedamir / Log Management.md
Last active May 31, 2023 09:19
Log Management: elastic-search, logstash & kibana (ELK)!

The Log!

Setup a Log Management Solution with the ELK Stack

Logstash is an open source tool for collecting, parsing, and storing logs for future use. Kibana 3 is a web interface that can be used to search and view the logs that Logstash has indexed. Both of these tools are based on Elasticsearch. Elasticsearch, Logstash, and Kibana, when used together is known as an ELK stack.

@rasheedamir
rasheedamir / Software Load Balancers.md
Last active July 10, 2020 08:01
Software Load Balancers - Apache vs HAProxy or Nginx

Why use frontend server (Apache or HAProxy or Nginx)?

Scalability - You can load balance multiple instances of your application behind front end server. This will allow you to handle more volume, and increase stability in the event one of your instances goes down.

Security - Apache, Tomcat, and Glassfish all support SSL, but if you decide to use Apache, most likely thats where you should configure it. If you want additional protection against attacks (DoS, XSS, SQL injection, etc.) you can install the mod_security web application firewall.

Additional Features - Apache has a bunch of nice modules available for URL rewriting, interfacing with other programming languages, authentication, and a ton of other stuff.

Clustering - By using Apache HTTP as a front end you can let Apache HTTP act as a front door to your content to multiple Apache Tomcat instances. If one of your Apache Tomcats fails, Apache HTTP ignores it and your Sysadmin can sleep through the nigh

@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>
@rasheedamir
rasheedamir / Ubuntu - Install Tomcat.md
Last active August 29, 2015 14:10
Ubuntu - Install Tomcat
  • Step 1: Download Tomcat from here: http://tomcat.apache.org/download-70.cgi

  • Step 2: Right click and extract the file.

  • Step 3: Copy (or better Cut) the extracted folder (e.g. apache-tomcat-7.0.53) and paste it to ~/Tools/Tomcat

  • Step 4: Open Terminal and cd ~/Tools/Tomcat/apache-tomcat-7.0.53/conf

  • Step 5: nano tomcat-users.xml Add following at the end of the file before ""

@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 / Install SSL Certificate for Apache2.md
Created October 3, 2014 20:53
Install free “recognized” SSL certificates for Apache2