docket-fyi / docket-api

Docket API
1 stars 0 forks source link

Docket API

Build Status Test Coverage Maintainability Coverage Status David DM Known Vulnerabilities Greenkeeper badge CircleCI

Google

References

  1. https://developers.google.com/calendar/v3/reference/
  2. https://apis-nodejs.firebaseapp.com/calendar/index.html

Microsoft

References

  1. https://docs.microsoft.com/en-us/outlook/rest/node-tutorial
  2. https://apps.dev.microsoft.com
  3. https://docs.microsoft.com/en-us/azure/active-directory/develop/authentication-scenarios
  4. https://docs.microsoft.com/en-us/graph/api/resources/calendar?view=graph-rest-1.0

Stripe

References

  1. https://stripe.com/docs/api

Vault

References

  1. https://www.linode.com/docs/applications/configuration-management/use-hashicorp-vault-for-secret-management/
  2. http://taswar.zeytinsoft.com/using-hashicorp-vault-for-nodejs-application-to-store-secrets/
  3. https://github.com/kr1sp1n/node-vault/tree/c1d91b9973c0f02256112bed02cf8c4c7c5d5a31

Setup

# Bring up the Vault container
docker-compose -f docker-compose.local.yml -f docker-compose.yml up -d docket-vault

# Shell into the Vault container
docker exec -it $(docker ps -q -f "name=docket-vault") sh

# Initialize and unseal Vault
VAULT_ADDR=http://127.0.0.1:8200 vault operator init -key-shares=1 -key-threshold=1
VAULT_ADDR=http://127.0.0.1:8200 vault operator unseal
VAULT_ADDR=http://127.0.0.1:8200 vault login

# Enable the userpass auth method and create a user
VAULT_ADDR=http://127.0.0.1:8200 vault auth enable userpass
VAULT_ADDR=http://127.0.0.1:8200 vault write auth/userpass/users/john.goldsmith password=Abc123123!

# Enable the KV v1 secrets engine
VAULT_ADDR=http://127.0.0.1:8200 vault secrets enable -version=1 kv

# Enable the approle secrets engine
# See https://www.vaultproject.io/docs/auth/approle.html
VAULT_ADDR=http://127.0.0.1:8200 vault auth enable approle

# Create a new role
VAULT_ADDR=http://127.0.0.1:8200 vault write auth/approle/role/docket-api secret_id_ttl=10m token_num_uses=10 token_ttl=20m token_max_ttl=30m secret_id_num_uses=40
VAULT_ADDR=http://127.0.0.1:8200 vault write auth/approle/role/docket-api bind_secret_id=false secret_id_bound_cidrs=127.0.0.1/24

# Get the role ID
VAULT_ADDR=http://127.0.0.1:8200 vault read auth/approle/role/docket-api/role-id

# Create a token
VAULT_ADDR=http://127.0.0.1:8200 vault token create -orphan=true -policy=default -role=test

# Wrap role secret ID
VAULT_ADDR=http://127.0.0.1:8200 vault write -f -wrap-ttl=60s auth/approle/role/docket-api/secret-id

Elasticsearch

References

  1. https://blog.logrocket.com/full-text-search-with-node-js-and-elasticsearch-on-docker/
  2. https://elasticsearch-cheatsheet.jolicode.com/
  3. https://www.sitepoint.com/search-engine-node-elasticsearch/
  4. https://www.compose.com/articles/getting-started-with-elasticsearch-and-node/

Competitors

  1. Memento
  2. Any.do
  3. Todoist
  4. [iOS Reminders]()