StevenMapes / django-aws-api-gateway-websockets

Created to allow Django projects to be used as a HTTP backend for AWS API Gateway websockets
MIT License
10 stars 2 forks source link

Add support for self registering gateways #10

Open StevenMapes opened 4 months ago

StevenMapes commented 4 months ago

Is your proposal related to a problem/issue?

https://github.com/StevenMapes/django-aws-api-gateway-websockets/discussions/9

Description

Add in support to allow the project to self register new ApiGateway by fetching the details from AWS via Boto3 based on the X-Amzn-Apigateway-Api-Id header.

This functionality should be invoked from the _check_platform_registered_api_gateways method if no known record is returned. The theory is that it should then pull the details of all API Gateway entries and populate the database so that it can then pick it up the next time that gateway is used

StevenMapes commented 4 months ago

As per the discussion on #9 as well as allowing self registering gateways which are validated via calls to the AWS account using the IAM a class property secure_infra = False should be introduced that, when set to True, should by pass these checks on the bases that the infrastructure itself is handling the security concerns. Examples of this would be private API Gateways, private VPCs.