Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server installation Script #156

Open
wants to merge 129 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
b38dae9
Rectified the path in the README.md to Senz-Server
alishamohanty Mar 16, 2019
1b48a31
Create a ruby client for senz (#16)
prakashujjwal1010 Mar 20, 2019
f638c51
Added an error listener on the client socket.
pragyesh007 Mar 18, 2019
d4a61e1
Update README.md
YashMeh Mar 24, 2019
88a863d
Implementing Rust client for Senz server
chaliya96 Mar 27, 2019
d35189d
Rust sender device file
chaliya96 Mar 28, 2019
3334b1a
Create README file
chaliya96 Mar 29, 2019
099fe7f
fixes #21-Changed the port in the console messgae to the dynamic one …
sarnava1 Apr 1, 2019
b378459
related to #23- removed extra lines from MainTest.scal file
sarnava1 Apr 1, 2019
4b3070d
related to #34- added a test for a python function
sarnava1 Apr 1, 2019
981fdb2
added sudo required in travis for passing the checks
sarnava1 Apr 1, 2019
5b5b6a0
changes pip3 to pip to pass travis
sarnava1 Apr 2, 2019
e989fa3
made final changes to pass travis
sarnava1 Apr 2, 2019
8910454
updating README.md
prakashujjwal1010 Apr 1, 2019
8bcf748
added eslint in the javascript folder in senz-client-samples
sarnava1 Apr 2, 2019
fa46595
minor changes in README.md
sarnava1 Apr 2, 2019
9f7e0a7
Added UNSHARE command method
YashMeh Apr 5, 2019
b70d89b
Added UNSHARE command for python client
YashMeh Apr 5, 2019
7382b70
Removed changes from master
YashMeh Apr 5, 2019
1a39b74
Added unshare command in python client
YashMeh Apr 5, 2019
4e5faf1
Implement secure encryption in rust client sample (#47)
chaliya96 Apr 8, 2019
213206c
Add unit tests for javascript client #44 (#45)
prakashujjwal1010 Apr 8, 2019
e417354
Add unshare method to js (#43)
YashMeh Apr 9, 2019
1438b6e
Update README.md (#49)
chaliya96 Apr 9, 2019
612996f
fixes #28-added the templates for the issue creation and pull request…
sarnava1 Apr 1, 2019
2ba2d40
Create Code of Conduct (#52)
chaliya96 Apr 9, 2019
c211e35
Update issue template (#53)
chaliya96 Apr 9, 2019
c188512
Fix logging in JS client to avoid console statements
SubashAravindan Apr 8, 2019
1da7836
Update gitignore
SubashAravindan Apr 8, 2019
493aef2
Create CONTRIBUTING.md (#54)
chaliya96 Apr 9, 2019
c7e4691
Fix logging in JS client to avoid console statements
SubashAravindan Apr 8, 2019
a082450
Fix all linting errors in JS client
SubashAravindan Apr 8, 2019
7c8f8ed
Remove var declarations in JS client
SubashAravindan Apr 9, 2019
ce49ea4
Moved templates files to seperate standard folder
chaliya96 Apr 10, 2019
c523854
Rename senz-switch
sumedhe May 9, 2019
23c2967
Initialize senz-web
sumedhe May 9, 2019
eb3af5a
Modify travis.yml
sumedhe May 9, 2019
b3be852
Update issue templates
charithccmc May 10, 2019
f781175
Added ignore file for the backend
YashMeh May 11, 2019
be2fa87
Added ignore file for the frontend
YashMeh May 11, 2019
02673a7
Added the backend directory
YashMeh May 11, 2019
1ea3813
Added the frontend directory
YashMeh May 11, 2019
251b46e
Deleted the old directories
YashMeh May 11, 2019
0a22858
Setup main server files
YashMeh May 13, 2019
3c38e01
Dockerized the API
YashMeh May 13, 2019
e5bfa69
Added API Documentation
YashMeh May 13, 2019
b902fb7
Added API tests
YashMeh May 13, 2019
868392a
Basic UI added
YashMeh May 23, 2019
1ca04fc
Register Login Reducers added
YashMeh May 27, 2019
3a63120
DashBoard Devices Tab and Logout done
YashMeh May 31, 2019
532d669
Updated package.json
YashMeh May 31, 2019
ed0acb2
Setup Analytics and Settings tab
YashMeh Jun 1, 2019
035c677
Project and Device Component Setup (#80)
YashMeh Jun 3, 2019
adb8fc9
Setup project reducers and added redux-persist to maintain state
YashMeh Jun 5, 2019
4d327e8
Modified project schema and project routes
YashMeh Jun 5, 2019
8b14dfb
Added delete reducer
YashMeh Jun 5, 2019
16ef2dd
More reducers routes (#85)
YashMeh Jun 8, 2019
d1ea280
Bump js-yaml from 3.13.0 to 3.13.1 in /senz-client-samples/javascript
dependabot[bot] Jun 8, 2019
d2ac1f3
Added update routes for components, corrected schema integrity
YashMeh Jun 12, 2019
305f22c
Updated components and added components
YashMeh Jun 12, 2019
73176e7
fixed duplicate device bug
YashMeh Jun 14, 2019
8276b8d
Solved switch project bug and added switch functionality to devices
YashMeh Jun 15, 2019
6ce704e
Dockerize frontend and backend (#91)
YashMeh Jun 16, 2019
e0f9b90
Add test for some components
YashMeh Jun 19, 2019
59def0e
Added pre-push git hook for CI
YashMeh Jun 19, 2019
71e6a34
Added layout tests
YashMeh Jun 21, 2019
a032271
Add project,device and auth tests
YashMeh Jun 21, 2019
a65f824
Add reducer tests
YashMeh Jun 21, 2019
a6c0de0
Add integration tests
YashMeh Jun 22, 2019
d785670
Delete storageMock.js
YashMeh Jun 22, 2019
7538304
Update index.test.js
YashMeh Jun 22, 2019
db85b3b
Tests for users,projects and devices
YashMeh Jun 23, 2019
94ca373
Added pre-push git hook
YashMeh Jun 23, 2019
855bbf3
Add query logger
YashMeh Jun 30, 2019
08b6d25
Solved winston dependency issue
YashMeh Jun 30, 2019
e6d1e5a
Add switch routes
YashMeh Jul 1, 2019
0be5b55
Add same device error
YashMeh Jul 4, 2019
199f1d6
Add functionality for error handling of monitored queries
YashMeh Jul 4, 2019
ffe17a4
Fixed switching device bug
YashMeh Jul 6, 2019
c7c1f61
Add public key mappings in backend
YashMeh Jul 6, 2019
e2f63ad
Refactored frontend tests
YashMeh Jul 7, 2019
3cdd0a4
Add query-check on registering device
YashMeh Jul 9, 2019
39df3db
Add query-check on data transfer
YashMeh Jul 10, 2019
9ca33f7
Add signature creator at backend
YashMeh Jul 12, 2019
672a22d
Modified createSignaturefunction
YashMeh Jul 12, 2019
a8b84a9
Modified JWT payload
YashMeh Jul 12, 2019
2da75db
Add ProfileView component
YashMeh Jul 12, 2019
c1cb04c
Modified query logger and error handler
YashMeh Jul 14, 2019
1824a76
Add analytics routes
YashMeh Jul 16, 2019
dbbf107
Fixed switch Bug
YashMeh Jul 18, 2019
2834c16
Add num-of-devices online-offline-analytics
YashMeh Jul 18, 2019
38ece71
Initialized log actions,reducers and analytics
YashMeh Jul 18, 2019
e7f40c4
Add 7 days total requests graph
YashMeh Jul 19, 2019
fd910be
Add device name to public key mappings
YashMeh Jul 19, 2019
3727985
Reversed python client to original
YashMeh Jul 19, 2019
1ce82b4
Add key mappings to logger
YashMeh Jul 20, 2019
c1d29e3
Complete Analytics
YashMeh Jul 20, 2019
765c858
Styled dashboard,changed font and adjusted spacing
YashMeh Jul 21, 2019
764c803
Add signature to dropdown
YashMeh Jul 21, 2019
fdf693f
Setup npm module
YashMeh Jul 30, 2019
a7d1afb
added logos
YashMeh Jul 30, 2019
9671fb2
Added npm module tests
YashMeh Jul 30, 2019
12e9ea1
Add module documentation
YashMeh Jul 31, 2019
5e7d916
sent and received logged by logger
YashMeh Aug 1, 2019
328afaf
Add online-offline device checker
YashMeh Aug 1, 2019
63c9baa
Add avatar and color scheme of rows
YashMeh Aug 3, 2019
1ef82d3
Altered lodash version for security vulnerability
YashMeh Aug 3, 2019
8fae7fd
Add project view,test for view profile component and updated axios ve…
YashMeh Aug 3, 2019
db3912c
Added package files
YashMeh Aug 3, 2019
ab4a524
Add project list test
YashMeh Aug 3, 2019
e230713
Add CI for senz-web
YashMeh Aug 13, 2019
8fc1f5b
Complete backend documentation:
YashMeh Aug 13, 2019
c348892
Bug fixes and documentation
YashMeh Aug 15, 2019
bf93fef
Add card content
YashMeh Aug 18, 2019
8db7a47
Update README
YashMeh Aug 18, 2019
3d3837c
Standard Password criteria has been implemented.
m1-key Feb 20, 2020
618b485
Sign up button fixed according to issue #124
kush-daga Feb 23, 2020
65da197
Implement Show Password feature (#135)
m1-key Feb 25, 2020
b4e7775
Add test coverage using istanbul.js and Add mockgoose for mock databa…
carpecodeum Feb 25, 2020
133f1eb
Show password feature in login page is implemented
m1-key Feb 24, 2020
5800b17
removed password validation from login page
m1-key Feb 24, 2020
3b4177e
Add backend for forgot password feature
carpecodeum Feb 24, 2020
170d4c2
Implement email Checker for Backend (#125) (#141)
bicycleman15 Feb 29, 2020
b58ece3
Add command line interface
JosephSemrai Feb 29, 2020
8f54333
Update login button with active status (#144)
m1-key Mar 2, 2020
974e263
Implement fixed password view and show confirm password (#149)
m1-key Mar 2, 2020
9ea161c
Implement unique email check (#150)
shivam-sahu Mar 2, 2020
c8ae359
Manjaro server installation script added
aker99 Mar 4, 2020
4d35220
RHEL/CentOS server installation script added
aker99 Mar 4, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
74 changes: 74 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

15 changes: 15 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the README.md with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
3. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Prerequisites

Please answer the following questions for yourself before submitting an issue. **YOU MAY DELETE THE PREREQUISITES SECTION.**

- [ ] I am running the latest version
- [ ] I checked the documentation and found no answer
- [ ] I checked to make sure that this issue has not already been filed
- [ ] I'm reporting the issue to the correct repository (for multi-repository projects)

# Expected Behavior

Please describe the behavior you are expecting

# Current Behavior

What is the current behavior?

# Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

# Mocks
[INSERT RELEVANT PNG FILE]

## Steps to Reproduce

Please provide detailed steps for reproducing the issue.

1. step 1
2. step 2
3. you get it...

## Estimation of time required
[INSERT NUMBER HERE] hours

## Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.


## Failure Logs

Please include any relevant log snippets or files here.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Description
Include a summary of the change and relevant motivation/context. List any dependencies that are required for this change.

Fixes # [ISSUE]

### Type of Change:
**Code/Quality Assurance Only**
- Bug fix (non-breaking change which fixes an issue)
- This change requires a documentation update (software upgrade on readme file)
- New feature (non-breaking change which adds functionality)

### Checklist:
**Delete irrelevant options.**

- [ ] My PR follows the style guidelines of this project
- [ ] I have performed a self-review of my own code or materials
- [ ] I have commented my code or provided relevant documentation, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] Any dependent changes have been merged

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target/
.vscode/
39 changes: 32 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
language: scala
scala:
- 2.12.6
services: mongodb
before_install: cd senz-server
script:
- sbt ++$TRAVIS_SCALA_VERSION test
sudo: required
matrix:
include:
- language: scala
scala: 2.12.6
services: mongodb
before_install:
- cd senz-switch
script:
- sbt ++$TRAVIS_SCALA_VERSION test

- language: python
python: 3.6
before_install:
- pip install pytest
script:
- pytest
- language: node_js
node_js: 10.16.2
services: mongodb
before_install:
- cd senz-web/backend
- mkdir config
- cd config/ && touch test.json
- echo '{"dbURI":"mongodb://localhost/senz-test","secretKey":"yash123"}' >>test.json
- cd ..
- npm install
- language: node_js
node_js: 10.16.2
before_install:
- cd senz-web/frontend
- npm install
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ SenZ messages follow a Twitter-like message structure.

- [Python](senz-client-samples/python/README.md)
- [JavaScript](senz-client-samples/javascript/README.md)
- [Ruby](senz-client-samples/ruby/README.md)
- [Rust](senz-client-samples/rust/README.md)

# How to Contribute

Expand Down
Binary file added logo/bottom_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added logo/no_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added logo/right_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions mongodb-org-yum.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
1 change: 1 addition & 0 deletions nodejs-module/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
98 changes: 98 additions & 0 deletions nodejs-module/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<p align="center">
<img src="https://raw.githubusercontent.com/scorelab/senz/master/logo/bottom_text.png" height=300 width=200 alt="senz logo" />
<p align="center">
A npm package to connect your devices to the senz switch for secure data transfer.
<p align="center">
<a href="https://www.npmjs.com/package/senz" >
<img src="https://img.shields.io/badge/npm-6.9.0-brightgreen" alt="npm 6.9.0" ></a> <img src="https://img.shields.io/badge/node-11.8.0-brightgreen" alt="node 11.8.0"> <a href="https://github.com/scorelab/senz/blob/master/LICENSE" alt="license"><img alt="GitHub" src="https://img.shields.io/github/license/scorelab/senz"></a><a href="https://gitter.im/scorelab/senz" alt="gitter"> <img alt="Gitter" src="https://img.shields.io/gitter/room/scorelab/senz"></a> <img alt="npm" src="https://img.shields.io/npm/dw/senz">
</p>
</p>
</p>

### Installation

```bash
npm install senz --save
```

### Importing

```javascript
const senz = require("senz");
```

#### Creating a socket

The following code is common in all the subsequent examples .

```javascript
const senz = require("senz");
const net = require("net");
//Creating a socket
const socket = new net.Socket();
//Connecting the socket to the port and host of the senz switch
socket.connect(2552, "localhost", () => {
console.log(`Connected to the server on port ${2552}`);
});
```

#### query.sendQuery(socket,query)

This function takes in the socket and query as input and returns a promise.

```javascript
//Function to send the query to the switch and get the response
senz.query.sendQuery(socket, shareQuery).then(res => {
console.log(res);
});
```

#### query.recResponse(socket)

This function takes a socket as an input and receives the response on it.

```javascript
//Function to receive the output from the server
senz.query.recResponse(socket).then(res => {
console.log(res);
});
```

The module supports data encrytion and decryption methods out of the box.

#### Encryption

```javascript
//Key should be of 16 bytes
const sharedKey = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
//Create a new object of the AESUtils class
const aes = new senz.aesUtil.AESUtils(sharedKey);
const data = "hello";
const encryptedData = aes.encrypt(data);
```

#### Decryption

```javascript
const data = aes.decrypt(encryptedData);
```

### Image functions

If you want to send an image through the query then these functions will come handy for sure.

#### imageToString(path)

This function takes the path of the image as input and returns the base64 encoded string of the image.

```javascript
const ImgString = senz.imageUtil.imageToString("<image-path>");
```

#### stringToImage(base64 String,path)

This function takes the base64 encoded string and saves the image onto the path specified.

```javascript
senz.imageUtil.stringToImage(imgString, "<image-path>");
```
18 changes: 18 additions & 0 deletions nodejs-module/__tests__/aes_utils.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
process.env.NODE_ENV = "test";

const chai = require("chai");
const AESUtil = require("../utils/aes_utils.js");
const sharedKey = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];

const expect = chai.expect;

describe("Encryption and decryption function", () => {
it("should encrypt and decrypt correctly", () => {
const aes = new AESUtil.AESUtils(sharedKey);
const text = "foo-foo-foo-foo";
const encrypted = aes.encrypt(text);
const decrypted = aes.decrypt(encrypted);

expect(decrypted).to.equal(text);
});
});
Loading