Skip to content
View serverless-secure's full-sized avatar
💭
Serverless-Secure available on Beta
💭
Serverless-Secure available on Beta

Block or report serverless-secure

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
serverless-secure/README.md

✨ Serverless-Secure [Beta] ✨

Version Documentation Maintenance License: MIT

Lambda Secure Serverless Services - [ Beta ]

🕸️ Website 🏠 HomepageDemo

Install

$ npm install serverless-secure -D

Configure

plugins: [
    ....,
    'serverless-secure',
  ],

Usage

$ serverless secure
or
$ sls secure -p <route-path>

***Adds Secure Layer:***

# 	secureAuthorizer: {
#   		handler: "secure_layer/handler.secureAuthorizer
#   	}

***..to desired route:***

# hello: {
#     handler: 'handler.hello',
#     events: [
#         {
#           http: {
#             method: 'get',
#             path: 'hello',
#             cors: '${self:custom.corsValue}',
#             authorizer: 'secureAuthorizer'
/##############################################/

Secure a token

$ curl --location --request POST 'http://localhost:3000/dev/secure_token' \
--header 'x-api-key: <YOUR GENERATED API KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "you can also request a session token: below",
    "expires": "5" <---<< Request a Session Route!!
}'

Employ token

$ curl --location --request GET 'http://localhost:3000/dev/hello' \
--header 'Authorization: eyJhbGciOiJIUzI1NiJ9.....Z3wXEsAIdXzCIY'

Build a Session Route

$ sls secure-session -p mysession

Employ session

$ curl --location --request POST 'http://localhost:3000/dev/b34ef189e......143de480387a/session' \
--header 'Authorization: true' \
--header 'Content-Type: text/plain' \
--data-raw '{
}'

Build an Encryption Route (MITM)

$ sls secure-secret --passphrase mysecret

Employ EnCryption / DeCryption

$ curl --location --request POST 'http://localhost:3000/dev/EnCryptMessage' \
--header 'Content-Type: application/json' \
--data-raw '{"message": "Man in the middle message"}'
$ curl --location --request POST 'http://localhost:3000/dev/DeCryptMessage' \
--header 'Content-Type: application/json' \
--data-raw '{"message":"gePrUcw2F....dYLhnknBG4ttegpP0fA=="}'

Headers:

- N.B: All --header Authorization requests require a value!

header Authorization = true


Black-List IPAdresses

$ sls secure-blacklist -ip 127.0.0.1

White-List IPAdresses

$ sls secure-whitelist -ip 127.0.0.1

Run tests

$ npm run test

Utilities:

  • $ sls secure-key
  • $ sls secure-policy

Alpha Version 🛠 TODO 🛠️

  • $ sls secure-email
  • $ sls secure-message
  • $ sls secure-headers
  • $ sls secure-monitor
  • $ sls secure-database
  • ...and much much more...

Author 👤 Serverless-Secure

Contributing 🤝

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

License 📝

Copyright © 2020 Serverless-Secure Software Publishing House.
This project is MIT licensed.


Popular repositories Loading

  1. serverless-secure.github.io serverless-secure.github.io Public

    Documentation for Serverless Secure

    HTML

  2. serverless-secure-demo serverless-secure-demo Public

    Serverless Secure Demo

    TypeScript

  3. serverless-secure serverless-secure Public

    serverless secure

    JavaScript