Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Table of Contents

Overview

...

The following set up will allow you to work on the Raft3 app in your local environment (

http://localhost

...

)

...

by

...

using

...

a

...

node.js

...

proxy

...

server

...

to

...

connect

...

to

...

the

...

dev

...

servers

...

for

...

authentication

...

and

...

services.

...

Note:

...

This

...

environment

...

will

...

not

...

work

...

until

...

you

...

have

...

a

...

valid

...

Kerberos

...

account

...

and

...

have

...

been

...

created

...

as

...

a

...

Raft

...

user.

...

Installation

...

of

...

Required Software 

Download and install node from here: http://nodejs.org/download/

...

(doc

...

written

...

using

...

V0.10.16)

...

Checkout

...

Raft3

...

code

...

Create

...

a

...

new

...

project

...

in

...

PHPStorm

...

(or

...

your

...

favorite

...

IDE)

...

and

...

pull

...

the

...

code.

...

svn

...

root:

...

svn+ssh://svn.mit.edu/mitbi

...

project:

...

php/trunk

...

You'll

...

get

...

more

...

than

...

just

...

the

...

front

...

end

...

app

...

but

...

this

...

allows

...

us

...

to

...

be

...

consistent

...

when

...

merging

...

Create

...

a

...

local

...

server

...

directory

...

The

...

app

...

lives

...

in

...

the

...

public

...

directory

...

(trunk/zend_framework/public/)

...

In

...

this

...

public

...

directory

...

you

...

need

...

to

...

create

...

a

...

copy

...

of

...

the

...

existing

...

server

...

directory.

...

Call

...

it

...

local_server

...

and

...

configure

...

it

...

so

...

svn

...

will

...

ignore

...

it

...

(we

...

want

...

this

...

to

...

remain

...

locally

...

on

...

your

...

machine

...

only).

...

Certificate

...

Installation

...

These

...

certificates

...

are

...

used

...

to

...

proxy

...

to

...

the

...

test

...

server

...

using

...

your

...

credentials.

...

  1. Go

...

  1. to

...

  1. Firefox/Preferences/Advanced/Encryption/View

...

  1. Certificates

...

  1. and

...

  1. click

...

  1. on

...

  1. your

...

  1. certificate

...

  1. and

...

  1. click

...

  1. the

...

  1. Backup

...

  1. button.

...

  1. In

...

  1. the

...

  1. Save

...

  1. Dialog

...

  1. box,

...

  1. save

...

  1. your

...

  1. certificate

...

  1. as

...

  1. a

...

  1. pks12

...

  1. (.p12)

...

  1. file

...

  1. in

...

  1. your

...

  1. server

...

  1. directory

...

  1. (neatest

...

  1. if

...

  1. you

...

  1. save

...

  1. it

...

  1. in

...

  1. a

...

  1. cert

...

  1. subdirectory).

...

  1. Using

...

  1. your

...

  1. terminal,

...

  1. CD

...

  1. to

...

  1. the

...

  1. cert

...

  1. subdirectory

...

  1. (/zend_framework/public/local_server/certs).

...

  1. Create

...

  1. a

...

  1. .pem

...

  1. file:

...

  1. openssl

...

  1. pkcs12

...

  1. -nodes

...

  1. -in

...

  1. yourcert.p12

...

  1. -out

...

  1. yourcert.pem

...

  1. Now

...

  1. remove

...

  1. the

...

  1. password

...

  1. from

...

  1. your

...

  1. .pem

...

  1. file

...

  1. this

...

  1. way:

...

  1. openssl

...

  1. rsa

...

  1. -in

...

  1. yourcert.pem

...

  1. -out

...

  1. yourcertNoPassword.pem

...

  1. From the Authorities tab in FF, export and save the "MIT Certification Authority..."

...

  1. certification

...

  1. to

...

  1. a

...

  1. file

...

  1. name

...

  1. mitCA.pem

...

  1. in

...

  1. /zend_framework/public/local_server

...

  1. /certs

...

  1. folder

...

  1. .

Configure auth.json

...

Edit /zend_framework/public/local_server/auth_yours.json

...

and

...

rename

...

this

...

file

...

to

...

auth_me.json

...

or

...

whatever

...

you

...

like:

{
Code Block
}{
	"what_do_I_do_with_this_file": "Rename this file to auth_me.json or whatever you like then reference it on the command line with the '-a' parameter",
	"keyFile": ".pem file containing your cert with password removed",
	"certsFile": ".pem file containing your key",
	"caFile": "certs/mitCA.pem"
}{code}

h1. Install Required Node Module Dependencies

# Navigate to 

Install Required Node Module Dependencies

  1. Navigate to /zend_framework/public/local_server/

...

  1. Execute

...

  1. npm

...

  1. (node

...

  1. package

...

  1. manager)

...

  1. which

...

  1. will

...

  1. read

...

  1. the

...

  1. package.json

...

  1. file

...

  1. and

...

  1. install

...

  1. the

...

  1. listed

...

  1. dependencies.

...

  1.  
    1. npm install

Testing The Local Server

  1. Navigate to zend_framework/public/local_server

...

  1. Start

...

  1. the

...

  1. server

...

  1. via

...

  1. command:

...

  1. node

...

  1. bin/mitserv.js

...

  1. -a

...

  1. auth_me.json

...

  1. In

...

  1. a

...

  1. browser,

...

  1. navigate

...

  1. to

...

  1. http:/localhost:8080/app.html

...

Possible Issues

  • Issue:
    • Proxy starts but errors related to .pem files seen
  • Fix:
    • Make sure you did not mix up the key and cert files in your auth.json file.
  • Issue:
    • Proxy starts but no response is returned at all
  • Fix:
    • Make sure you have been added everywhere required to be a valid Raft user (Amon knows)
  • Issue:
    • Proxy starting but never returning
  • Fix:
    • Make sure you're connecting using either the MIT N or MIT SECURE N wireless network

...

    • 403

...

    • (Forbidden)

...

    • With body content including:

...

    • "SyntaxError:

...

    • Unexpected

...

    • token

...

    • ILLEGAL"

...

  • Fix:

...

    • The

...

    • Apache

...

    • server

...

    • needs

...

    • to

...

    • include

...

    • the

...

    • username

...

  • Issue:

...

    • Error:

...

    • EBADF,

...

    • Bad

...

    • file

...

    • descriptor

...

    • './certs/hij1nx.pem'

...

  • Fix:

...

    • The

...

    • certs

...

    • are

...

    • missing

...

    • and/or

...

    • misconfigured.

...

    • See

...

    • the

...

    • section

...

    • on

...

    • installing

...

    • certificates.