Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🐺 A Lightweight Cloud Native API Gateway.

License

NotificationsYou must be signed in to change notification settings

Norwik/Helmet

Helmet

A Lightweight Cloud Native API Gateway.


Helmet is Cloud Native API Gateway that control who accesses your API whether from customer or other internal services. It also collect metrics about service calls count, latency, success rate and much more!

Here is some of the key features:

  • Manage Service to Service Authentication, Authorization and Communication.
  • Manage End User to Service Authentication, Authorization and Communication.
  • Basic, API Key Based and OAuth2 Authentication Support.
  • Multiple Backends Support with Load Balancing, Health Checks.
  • Runtime Metrics for both Helmet and Backend Services exposed for Prometheus.
  • CORS Support.
  • HTTP/2 support.
  • Rate Limiting Support.
  • Circuit Breaker Support.
  • Caching Layer to make it even more faster.
  • Lightweight, Easy to Deploy and Operate.

Documentation

Linux Deployment

Downloadthe latest helmet binary. Make it executable from everywhere.

$export LATEST_VERSION=$(curl --silent"https://api.github.com/repos/norwik/Helmet/releases/latest"| jq'.tag_name'| sed -E's/.*"([^"]+)".*/\1/'| tr -d v)$ curl -sL https://github.com/norwik/Helmet/releases/download/v{$LATEST_VERSION}/helmet_{$LATEST_VERSION}_Linux_x86_64.tar.gz| tar xz

Then installMySQL andRedis on the server or a separate one.

Create the configs fileconfig.yml fromconfig.dist.yml. Something like the following:

# App configsapp:# App namename:${HELMET_APP_NAME:-helmet}# Env mode (dev or prod)mode:${HELMET_APP_MODE:-dev}# HTTP portport:${HELMET_API_PORT:-8000}# Hostnamehostname:${HELMET_API_HOSTNAME:-127.0.0.1}# TLS configstls:status:${HELMET_API_TLS_STATUS:-off}crt_path:${HELMET_API_TLS_PEMPATH:-cert/server.crt}key_path:${HELMET_API_TLS_KEYPATH:-cert/server.key}# Global timeouttimeout:${HELMET_API_TIMEOUT:-50}# API Configsapi:key:${HELMET_API_KEY:-6c68b836-6f8e-465e-b59f-89c1db53afca}# CORS statuscors:status:${HELMET_CORS_STATUS:-off}# Application Databasedatabase:# Database driver (sqlite3, mysql)driver:${HELMET_DATABASE_DRIVER:-sqlite3}# Database Hosthost:${HELMET_DATABASE_MYSQL_HOST:-localhost}# Database Portport:${HELMET_DATABASE_MYSQL_PORT:-3306}# Database Namename:${HELMET_DATABASE_MYSQL_DATABASE:-helmet.db}# Database Usernameusername:${HELMET_DATABASE_MYSQL_USERNAME:-root}# Database Passwordpassword:${HELMET_DATABASE_MYSQL_PASSWORD:-root}# Key Store Configskey_store:# Cache Driverdriver:${HELMET_CACHE_DRIVER:-redis}# Redis Driver Configsredis:# Redis Addressaddress:${HELMET_CACHE_REDIS_ADDR:-localhost:6379}# Redis Passwordpassword:${HELMET_CACHE_REDIS_PASSWORD:-}# Redis Databasedatabase:${HELMET_CACHE_REDIS_DB:-0}# Endpoint Configsendpoint:# Orders Internal Service        -name:orders_serviceactive:trueproxy:listen_path:"/orders/v2/*"upstreams:balancing:roundrobintargets:                    -target:https://httpbin.org/anything/orders1/v2                    -target:https://httpbin.org/anything/orders2/v2                    -target:https://httpbin.org/anything/orders3/v2                    -target:https://httpbin.org/anything/orders4/v2http_methods:                -ANYauthentication:status:on# Rate limit use the key store for fast read writerate_limit:status:off# Circuit Breaker use the key store for fast read writecircuit_breaker:status:off# Customers Internal Service        -name:customers_serviceactive:trueproxy:listen_path:"/customer/v2/*"upstreams:balancing:randomtargets:                    -target:https://httpbin.org/anything/customers1/v2                    -target:https://httpbin.org/anything/customers2/v2                    -target:https://httpbin.org/anything/customers3/v2                    -target:https://httpbin.org/anything/customers4/v2http_methods:                -GET                -POST                -PUT                -DELETEauthentication:status:on# Rate limit use the key store for fast read writerate_limit:status:off# Circuit Breaker use the key store for fast read writecircuit_breaker:status:off# Log configslog:# Log level, it can be debug, info, warn, error, panic, fatallevel:${HELMET_LOG_LEVEL:-info}# Output can be stdout or abs path to log file /var/logs/helmet.logoutput:${HELMET_LOG_OUTPUT:-stdout}# Format can be jsonformat:${HELMET_LOG_FORMAT:-json}

The run thehelmet withsystemd

$ helmet server -c /path/to/config.yml

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, Helmet is maintained under theSemantic Versioning guidelines and release process is predictable and business-friendly.

See theReleases section of our GitHub project for changelogs for each release version of Helmet. It contains summaries of the most noteworthy changes made in each release.

Bug tracker

If you have any suggestions, bug reports, or annoyances please report them to our issue tracker athttps://github.com/norwik/helmet/issues

Security Issues

If you discover a security vulnerability within Helmet, please send an email tohello@clivern.com

Contributing

We are an open source, community-driven project so please feel free to join us. see thecontributing guidelines for more details.

License

© 2021, Clivern. Released underMIT License.

Helmet is authored and maintained by@Clivern.

Sponsor this project

    Packages

     
     
     

    Contributors6


    [8]ページ先頭

    ©2009-2026 Movatter.jp