Jump to content

Coding/Development Mandatories: Difference between revisions

From Parasol
No edit summary
No edit summary
Line 2: Line 2:
The following document contains rules and regulations, which are <u>entirely mandatory</u> for all Parasol Island projects containing web/software development.
The following document contains rules and regulations, which are <u>entirely mandatory</u> for all Parasol Island projects containing web/software development.


== For Project Managers ==
= For Project Managers =


==== Hold a kick-off meeting for every project ====
==== Hold a kick-off meeting for every project ====
Line 24: Line 24:
Please note that this article is set to be updated on a regular basis. Therefore, you should endeavour to create a new PDF from this page before each of your projects start.
Please note that this article is set to be updated on a regular basis. Therefore, you should endeavour to create a new PDF from this page before each of your projects start.


== For Developers ==
= For Developers =


==Security Basics==
==Security Basics==
Line 60: Line 60:
     if (isset($_POST[$thisExpectedField])) {
     if (isset($_POST[$thisExpectedField])) {
   
   
         $userData[$thisExpectedField] = $_POST[$thisExpectedField];
         $userData[$thisExpectedField] = filter_var(trim(strip_tags($_POST[$thisExpectedField])),FILTER_SANITIZE_STRING);
   
   
     } else {
     } else {

Revision as of 09:43, 11 February 2016

Development Rules & Regulations

The following document contains rules and regulations, which are entirely mandatory for all Parasol Island projects containing web/software development.

For Project Managers

Hold a kick-off meeting for every project

Every single project must begin with a technical kick-off before any development work can begin. The sole aim of the kick-off meeting with Mitarbeiter:Development Supervision is to align your development plan with the expectations of Parasol Island.

Topics that can/will be discussed include:

  1. Repository
  2. Web Hosting
  3. Required features (e.g. database export functionality, project monitoring etc.)
  4. Any questions that you may wish to ask

Please remember that David is here to support you with your project in regards to all development-related aspects. Therefore, if you have even the smallest question, please feel free to contact him directly and he will be more than happy to help you.

Read the following (incredibly helpful) page

As a project manager, you are not expected to be a world-class developer. However, knowing a few details regarding your developer's work is incredibly beneficial for yourself, your project and for Parasol Island. Therefore, you should give this page a read: https://wiki.parasol-island.com/Web_Development_Best_Practice_A-Z

Again, if you have any questions at all regarding any of the topics discussed on the aforementioned page, please do not hesitate to contact David Smith and he will be more than happy to help clear up any misunderstandings.

Send your developer a copy of this article

Before you brief your developer, make sure that you have already sent them a copy of this article; quickly create a PDF from this page (via File > Print > Save as PDF) and send it over to them so that, in the event of your developer having questions or queries, you can identify and answer these during your first briefing meeting.

Please note that this article is set to be updated on a regular basis. Therefore, you should endeavour to create a new PDF from this page before each of your projects start.

For Developers

Security Basics

In order to ensure that each project is planned, developed and executed in a safe and secure manner, the following basic rules must be adhered to:

Databases

When working with live databases (which contain real user information), it is forbidden to take a full or partial database dump (temporary or permanent) and to store it on a non-Parasol Island machine. No traces of real user data can ever be found on your local machines or servers.

All databases containing personally identifiable user information must be encrypted using a sufficient encryption method with an encryption key of at least 128-bits. Such key should never be stored in a publicly available location or on any Non-Parasol Island machine.

It should never be possible to decrypt a password back into clear-text.

Runtime / Execution Times

It should never be possible for a user to directly control the execution of your script(s); be it in terms of controlling the number of iterations a loop makes or in terms of the number of files permitted to be uploaded.

For example, all loops must be entirely under your control at all times and should utilise pagination where possible. Take the following as a perfect example of how not to handle posted data:

$userData = array();

foreach ($_POST as $thisIndex => $thisValue) {
    $userData[] = $thisValue;
}

echo $userData['firstName'];

Instead, you should opt to handle each posted value like so:

$expectedFields = array(
    'firstName',
    'lastName',
    'emailAddress'
);

$userData = array();

foreach ($expectedFields as $thisExpectedField) {

    if (isset($_POST[$thisExpectedField])) {

        $userData[$thisExpectedField] = filter_var(trim(strip_tags($_POST[$thisExpectedField])),FILTER_SANITIZE_STRING);

    } else {

        $userData[$thisExpectedField] = null;
    }
}

echo $userData['firstName'];

By handling only the fields that you should be expecting, you will be instantly improving both the security and performance of your code.

  • When working with live databases (containing real user information), it is forbidden to take a database dump and to run it locally on your machine. No traces of real user data should ever be found on local developer machines.
  • It should never be possible for a user to control the execution time of your script. For example, all loops must be entirely under control and should utilize pagination where possible. The number of iteractions that a loop is to perform must never be controllable by the user.
  • Only Parasol Island-owned repositories are permitted to be used. It is forbidden to use any external repository services for Parasol Island projects.
  • Only Parasol Island-owned servers are permitted to be used. It is forbidden to use any other server to host Parasol Island projects.
  • If a backend script takes a considerable amount of time to run and the default PHP max execution time must be increased, the FMA must test for any detrimental server behaviour.

Verschlüsselung Daten in DB

  • All user-centric data must only exist in the database in an encrypted manner. Non-user-centric data must not be encrypted due to performance reasons.
  • All encryption keys must be stored outside of the webroot.
  • All encryption keys must be at least 128-bit - preferably 256-bit.

Cross-Site Scripting (XSS)

  • A CSRF (cross-site request forgery) token must be generated upon the user’s first visit to the website and must be stored in their session. All user actions that interact with a database or file system must be authenticated by comparing the session CSRF token and the token provided in the request.

Sanatising

  • Cleaning any user-provided variables to be as specific as possible. For example, if the field is the DOB, only accept numerical digits in the format of DD.MM.YYYY.
  • Be selective in the acceptable values
    • If the field is “Gender”, only accept “Male” or “Female”
  • Stripping tags should be applied to almost every type of user input (with the exception of HTML-related inputs).

HTTPS

  • If possible, run your entire app using https://. Mandatory is to encrypt every private user data, e.g. forms, logins, etc. using https://. Send Data only via POST, never use GET.

Authorship

  • All author notes must be attributed to Parasol Island.
  • Only the first and last name of the FMA is permitted to be in the repository.
  • All repository commits must have the author set to FIRST_NAME LAST_NAME <FIRST_NAME.LAST_NAME@parasol-island.com>

Open Source Rules

If possible, only open-source (free / no license needed) plugins, libraries and other dependencies are permitted to be used within a Parasol Island project. Any premium (not free) dependency must be discussed with Mitarbeiter:Development Supervision, have the license provided to Parasol at no extra cost or be confirmed with the PM beforehand.

Verantwortlichkeiten (Kontrollpflicht)

Inhaltliche Verantwortung

Die inhaltliche Verantwortung liegt beim projektverantwortlichen Projektmanager. Er erstellt das inhaltliche Projekt-Briefing (Ziel: vollständiges Abbild aller projektbezogenen Erwartungen) Das Briefing enthält in der Regel ein technisches Konzept, ein Design-Konzept sowie ein Projekt-Timing Der Projektmanager ist ebenfalls verantwortlich für die Frontend-bezogenen Testings (inhaltliche und benutzerführende Vollständigkeit)

Technische Verantwortung

Die technische Verantwortung liegt beim Head of Development (Mitarbeiter:Development Supervision). Er übermittelt die technischen Anforderungen, die das Projekt erfordern. David ist ebenfalls für die dafür notwendige technische Infrastruktur verantwortlich.


Der Head of Development überprüft die technische Qualität des Developers und unterstützt den Projektmanager in allen technischen Belangen auch in der Testphase.

­IT- Infrastruktur und Kommunikationswege

Ausschliesslich unser Remote-Repository nutzen (FMA)

There is a Parasol Hosted GIT Repository for every Project. Ask your Producer for the url and credentials. It is mandatory to use our git repository and it’s strictly forbidden to use other repositories exept your local copy.

Personifizierte Schlüssel für Zugriff auf Repository und Serversysteme (PSL)

To gain you access to our repository or servers, please provide your private SSH key to David and your Producer

local Copy nach x-Monaten nach Projektabschluss löschen (FMA)

Your local git copy must be deleted in the week your final invoice is payed.

Richtline für PW und Schlüssel im Soucecode (PSL entw. Einhalten, Umsetzen FMA)

https://wiki.parasol-island.com/Passw%C3%B6rter#Passwortsicherheit

Daily commits im Entwicklungszeitraum

It is mandatory to commit your sourcecode with every milestone, at least once a day to the Parasol Island remote repository.

Entwicklung / Daten dürfen nur auf PSL-Systemen oder beim FMA lokal gespeichert sein (PW-Schutz)

It is not alowed to store data on any other machines than your local computer or a Parasol Island system.

LogIn & PW immer auf getrennten Kommunikationswegen übertragen (FMA/PSL)

https://wiki.parasol-island.com/Datenverarbeitung_durch_Parasol_Island

Kommunikationswege; nur verschlüsselte eMails? (StartTLS)

Datenschutz

Verfahren und involvierte IT-Systeme

Developer dürfen keinen Zugriff bekommen auf personenbezogene Daten

Gewährleistung der Rechte der Betroffenen

Technische und organisatorische Maßnahmen

Organisation bei PSL

Kennwortverwaltung

Kryptographie und Schlüsselmanagement

Schlüsselkomplexität mitgeben (PSL an FMA)

Datasheet

Email your developer everything he needs:

{Anschreiben}

Ticket-System (Redmine)
URL http://redmine.parasol-island.com/
Login {Your login name}
Password: {Was send to you upon account creation}

Repository
URL ssh://git@git.parasol-island.com/REPONAME
User git

Dev URL and credentials (It’s recommended to use the same DB name and user) are in Redmine as a Ticket (“Preview URL and Login credentials”)

Deploy
The “develop” Branch will be automatically deployed to the dev url (http://URL.preview.parasol-island.com).