Skip to content

REST server to facilitate data exchange between clients in private networks deployed on Azure

Notifications You must be signed in to change notification settings

raokrutarth/data-proxy

Repository files navigation

data-proxy

REST based data proxy server to facilitate data exchange between services in private networks and sporadic inter-service network connectivity.

Deployment

Code depoyed via Azure web application free tier. REST server accepts data in POST calls and makes it available via authenticated GET calls. See OpenAPI spec by running the server locally.

debug=1 ./start-proxy.sh
# Navigate to localhost:8000/docs

Azure

  • Add custom start command with Settings > Configuration > General settings > Startup Command

    start-proxy.sh
  • Set env variables for the authentication via Settings > Configuration > "+ Application Setting".

  • Goto Configuration > General settings > FTP state > Disable.

Test

portal_url="pytestapp.azurewebsites.net"

curl -X POST "https://${portal_url}/slack_poxy/event" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{\"token\":\"errteddt\",\"team_id\":\"T061EG9RZ\",\"api_app_id\":\"A0FFV41KK\",\"event\":{\"type\":\"reaction_added\",\"user\":\"U061F1EUR\",\"item\":{\"type\":\"message\",\"channel\":\"C061EG9SL\",\"ts\":\"1464196127.000002\"},\"reaction\":\"slightly_smiling_face\",\"item_user\":\"U0M4RL1NY\",\"event_ts\":\"1465244570.336841\"},\"type\":\"event_callback\",\"authed_users\":[\"U061F7AUR\"],\"authorizations\":{\"enterprise_id\":\"E12345\",\"team_id\":\"T12345\",\"user_id\":\"U12345\",\"is_bot\":false},\"event_id\":\"Ev9UQ52YNA\",\"event_context\":\"EC12345\",\"event_time\":1234567890}"

Resources

TODOs

CI/CD

Code

Testing

  • Add production_tests with production_secrets.secret file to test production instances.

About

REST server to facilitate data exchange between clients in private networks deployed on Azure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published