Skip to main content

Enables ApiKey functionality (like in ApiGateway V1) for ApiGateway V2.

Project description

B.CfnCustomApiKeyAuthorizer

Pipeline

An AWS CDK resource that enables protection of your public APIs by using Api Keys.

Description

This custom authorizer enables Api Key functionality (just like in ApiGateway V1 - https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-setup-api-key-with-console.html) for APIs that are created via ApiGateway V2 (originally ApiGateway V2 does not have Api Key functionality out-of-the-box). If you want to protect your API by generating a secret key and giving only for the intended clients - this library is just for you.

Remarks

Biomapas aims to modernise life-science industry by sharing its IT knowledge with other companies and the community. This is an open source library intended to be used by anyone. Improvements and pull requests are welcome.

Related technology

  • Python3
  • AWS CDK
  • AWS CloudFormation
  • AWS API Gateway
  • AWS API Gateway Authorizer
  • AWS Lambda

Assumptions

This project assumes you are an expert in infrastructure-as-code via AWS CloudFormation and AWS CDK. You must clearly understand how AWS API Gateway endpoints are protected with Authorizers / Custom Authorizers and how it is managed via CloudFormation or CDK.

  • Excellent knowledge in IaaC (Infrastructure as a Code) principles.
  • Excellent knowledge in API Gateway, Authorizers.
  • Good experience in AWS CDK and AWS CloudFormation.
  • Good Python skills and basics of OOP.

Useful sources

Install

Before installing this library, ensure you have these tools setup:

  • Python / Pip
  • AWS CDK
  • Docker

To install this project from source run:

pip install .

Or you can install it from a PyPi repository:

pip install b-cfn-custom-api-key-authorizer

Usage & Examples

# TODO

Testing

This package has integration tests based on pytest. To run tests simply run:

pytest b_cfn_custom_api_key_authorizer_test/integration/tests

Contribution

Found a bug? Want to add or suggest a new feature? Contributions of any kind are gladly welcome. You may contact us directly, create a pull-request or an issue in github platform. Lets modernize the world together.

Release history

0.1.0

  • Initial testing done. Authorizer works.
  • Need more tests and edge case handling before promoting to 1.0.0.

0.0.1

  • Initial build.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

b_cfn_custom_api_key_authorizer-0.1.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file b_cfn_custom_api_key_authorizer-0.1.0.tar.gz.

File metadata

  • Download URL: b_cfn_custom_api_key_authorizer-0.1.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for b_cfn_custom_api_key_authorizer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 13b47507992ee235e3eb28457f22bc6c5fdde5868bb582438551a002331e2a60
MD5 74d22978a06c9f3411b2775de1d7543a
BLAKE2b-256 0e269ffcb4825e6c539050c560e9b476a13bdaf574ef0b247d21b160ae2b3d14

See more details on using hashes here.

File details

Details for the file b_cfn_custom_api_key_authorizer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: b_cfn_custom_api_key_authorizer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for b_cfn_custom_api_key_authorizer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b0417dab5dd6a68cd83c0db96b87615e47a9d973a450cb8f5613690d16bbf82
MD5 8766d7ba46ff017653c80c2f176da031
BLAKE2b-256 4bb63c7915a415c682763b9a03fe94159d8d88bcdb718d723abf9c551a07d521

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page