Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

5 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Session Isolation Test

Use this code to replicate our Session Isolation testing enviroment.

The code is:

You can run this code directly from the source or by using the docker image.

Running the code from the source

Install Golang: https://go.dev/doc/install

Download the modules:

go mod download

Run the code:

go run main.go

The server will be listening at port 9007.

Using the docker image

Build the Docker image:

docker build -t session-isolation-test .

Run the Docker image:

docker run -p 9007:9007 -v $(pwd)/output/:/output/ --rm session-isolation-test

The server will be listening at port 9007.

Test results

The output folder will contains the output.log file.

If you can see the effect of the tests in the page content and page titles as well.

Page Content

Page content will contains a list of failed tests.

Page Titles

Page titles (e.g. TestPage1) will get failed tests appended:

TestPage12 - CK/TestPage1- LS/TestPage1 - IDB/TestPage1

Log format

IP X-Forwarded-For timestamp User-agent URL Tests
Log field Description
IP Request IP (includes port if localhost)
X-Forwarded-For Originating IP address when using a proxy to expose the server on the internet
timestamp Timestamp of the request
User-agent User Agent of the request
URL Page from where the POST message has been sent
Tests List of failed test

Example #1

[::1]:58894 - 1664281928538 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" http://localhost:9007/testpage/1 []
Log field Value
IP [::1]:58894
X-Forwarded-For -
timestamp 1664281928538
User-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
URL http://localhost:9007/testpage/1
Tests []

Example #2

[::1]:58894 1.2.3.4 1664281928756 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" http://localhost:9007/testpage/1 [CK/TestPage2 CK/TestPage3 CK/TestPage4 LS/TestPage2 LS/TestPage3 LS/TestPage4]
Log field Value
IP [::1]:57467
X-Forwarded-For 1.2.3.4
timestamp 1664281928538
User-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
URL http://localhost:9007/testpage/1
Tests [CK/TestPage2 CK/TestPage3 CK/TestPage4 LS/TestPage2 LS/TestPage3 LS/TestPage4]

Test list format

Failed test have a standard format:

PREFIX/PAGEID

Here below is the list of all prefixes:

Prefix Description
CK Cookie
IDB IndexedDB
LS LocalStorage
SS SessionStorage
BC Broadcast Channel
SW Shared Worker

For instance, the line of log below means that TestPage1 failed the tests for Cookies and LocalStorage.

[::1]:58894 1.2.3.4 1664281928756 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" http://localhost:9007/testpage/1 [CK/TestPage2 CK/TestPage3 CK/TestPage4 LS/TestPage2 LS/TestPage3 LS/TestPage4]

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages