Giter Club home page Giter Club logo

gravitee-policy-apikey's Introduction

API key policy

Gravitee.io License Releases CircleCI

Phase

onRequest onResponse

X

Description

You can use the api-key policy to enforce API key checks during request processing, allowing only apps with approved API keys to access your APIs.

This policy ensures that API keys are valid, have not been revoked or expired and are approved to consume the specific resources associated with your API.

Configuration

Policy

You can configure the following policy level options:

Property Required Description Type Default

propagateApiKey

-

Propagate API key to upstream API

boolean

false

Configuration
"api-key": {
  "propagateApiKey": false
}

Gateway

You can also configure the policy in the APIM Gateway configuration file (gravitee.yml). You can customize the X-Gravitee-Api-Key header and api-key query parameter.

Configuration
policy:
  api-key:
    header: My-Custom-Api-Key
    param: custom-api-key

Errors

You can use the response template feature to override the default response provided by the policy. These templates must be defined at the API level (see the API Console Response Templates option in the API Proxy menu).

The error keys sent by this policy are as follows:

Key Parameters

API_KEY_MISSING

-

API_KEY_INVALID_KEY

-

gravitee-policy-apikey's People

Contributors

graviteeio avatar brasseld avatar nicolasgeraud avatar aelamrani avatar phiz71 avatar jhaeyaert avatar guillaumelamirand avatar renovate-bot avatar ytvnr avatar plsstephenson avatar tcompiegne avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.