![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
amazon-api-gateway-secure-authorizer
Advanced tools
Secure Lambda authorizer for HTTP API behind CloudFront
This is a Lambda authorizer for Amazon API Gateway that provides secure API key validation using AWS Secrets Manager. This authorizer is compatible with key rotation through AWS Secrets Manager versioning, implements constant-time comparison to prevent timing attacks, and includes comprehensive logging for security monitoring.
pip install amazon-api-gateway-secure-authorizer
SECRET_NAME
: The name or ARN of the secret in AWS Secrets ManagerSECRET_KEY_NAME
: The key name within the secret's JSON structure that contains the API keyHEADER_NAME
: (Optional) The name of the header containing the API key (default: "x-origin-verify"){
"your_key_name": "your-api-key-value"
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"secretsmanager:GetSecretValue"
],
"Resource": "arn:aws:secretsmanager:region:account-id:secret:secret-name"
}
]
}
The Lambda function handler is located at:
secure_authorizer.authorizer.handler
{
"headers": {
"x-origin-verify": "your-api-key-value"
}
}
Set up AWS Secrets Manager:
Configure Lambda Environment:
SECRET_NAME="your-secret-name"
SECRET_KEY_NAME="your-key-name"
HEADER_NAME="x-origin-verify" # Optional, this is the default
Deploy Lambda Function:
secure_authorizer.authorizer.handler
Configure API Gateway:
This authorizer supports seamless key rotation using AWS Secrets Manager's versioning:
The authorizer implements comprehensive error handling for various scenarios:
All errors are logged with appropriate detail levels while maintaining security.
The authorizer provides detailed logging at different levels:
Advantages over the simple authorizer:
This project is licensed under the MIT License. See the LICENSE file for details.
This software product is not affiliated with, endorsed by, or sponsored by Amazon Web Services (AWS) or Amazon.com, Inc. The use of the term "AWS" is solely for descriptive purposes to indicate that the software is compatible with AWS services. Amazon Web Services and AWS are trademarks of Amazon.com, Inc. or its affiliates.
FAQs
Secure Lambda authorizer for HTTP API behind CloudFront
We found that amazon-api-gateway-secure-authorizer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.