Coder Social home page Coder Social logo

r2dedios / exate-api-gator-dora-router Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rhecosystemappeng/exate-api-gator-interceptor

0.0 0.0 0.0 112 KB

Quarkus application for routing connections between several APIGators at the same time

Home Page: https://quay.io/repository/ecosystem-appeng/gator-api-interceptor

License: Apache License 2.0

Java 99.08% Makefile 0.92%

exate-api-gator-dora-router's Introduction

Exate API-Gator Interceptor

Application build with Quarkus used for injecting Exate's API-Gator by intercepting requests to any target application.

sequenceDiagram
    autonumber
    actor U as Users
    participant S as Service<br/>Route
    box Pod
        participant I as Interceptor<br/>(sidecar)
        participant T as Target<br/>Application
    end
    participant G as Exate<br/>APIGator

    U-)S: Send requests to target
    S-)I: Intercept requests
    I-)T: Fetch dataset from target
    I-)G: Protect data in dataset
    I-)U: Return protected dataset
Loading

Usage

  • Configure and deploy the Interceptor App next to the Target App, preferably as a sidecar container.
  • Redirect the Target App's exposed service to the Interceptor App.

For any request, the Interceptor App will access the Target App and fetch the original dataset, it will then send the dataset to API-Gator, and return the Gator'ed dataset as a response to the sender.

The Interceptor App image is pushed to quay.io/ecosystem-appeng/gator-api-interceptor

Request Headers

All known headers from APIGator Docs can be added to the original request, and they will override headers in APIGator requests. This allows users to override any headers per-request.

The following headers are unique to the Interceptor App and will not appear in APIGator Docs.

Header Key Description Required Default Value
Api-Gator-Bypass Bypass API Gator No false

Application Properties

Visit APIGator Docs for possible values and types.

Property Name Environment Variable Required Default Value
target.server.host TARGET_SERVER_HOST No localhost
target.server.port TARGET_SERVER_PORT Yes
target.server.secure TARGET_SERVER_SECURE No false
api.gator.host API_GATOR_HOST No api.exate.co
api.gator.port API_GATOR_API No 443
api.gator.dataset-uri API_GATOR_DATASET_URI No /apigator/protect/v1/dataset
api.gator.token-uri API_GATOR_TOKEN_URI No /apigator/identity/v1/token
api.gator.api-key API_GATOR_API_KEY Yes
api.gator.client-id API_GATOR_CLIENT_ID Yes
api.gator.client-secret API_GATOR_CLIENT_SECRET Yes
api.gator.grant-type API_GATOR_GRANT_TYPE No client_credentials
api.gator.manifest-name API_GATOR_MANIFEST_NAME Yes
api.gator.dataset-type API_GATOR_DATASET_TYPE Yes
api.gator.job-type API_GATOR_JOB_TYPE Yes
api.gator.country-code API_GATOR_COUNTRY_CODE Yes
api.gator.data-owning-country-code API_GATOR_DATA_OWNING_COUNTRY_CODE No
api.gator.data-usage-id API_GATOR_DATA_USAGE_ID No
api.gator.protect-null-values API_GATOR_PROTECT_NULL_VALUES Yes
api.gator.restricted-text API_GATOR_RESTRICTED_TEXT No
api.gator.preserve-string-length API_GATOR_PRESERVE_STRING_LENGTH Yes
api.gator.sql-type API_GATOR_SQL_TYPE No
api.gator.classification-model API_GATOR_CLASSIFICATION_MODEL No
api.gator.third-party.name API_GATOR_THIRD_PARTY_NAME No
api.gator.third-party.id API_GATOR_THIRD_PARTY_ID No
api.gator.matchingrule.claims[#].X API_GATOR_MATCHINGRULE_CLAIMS_#__X No

Note that api.gator.third-party.name and api.gator.third-party.id are mutually exclusive. If both are set, only the name will be used. The id will be set to null.

Example for api.gator.matchingrule.claims[#].X property is: api.gator.matchingrule.claims[0].mykey=myvalue.
Example for API_GATOR_MATCHINGRULE_CLAIMS_#__X env var is: API_GATOR_MATCHINGRULE_CLAIMS_0__MYKEY=MYVALUE.
0 is the index of the claims list, mykey=myvalue is one of the objects in a claim object. Note the double underscore.

Local Container Run

The following example only uses mandatory properties. View the above table for all properties. Use API-Gator documentation for the potential values and types.

podman run --rm -p 8082:8082 --network=host \
-e TARGET_SERVER_PORT='8080' \
-e API_GATOR_API_KEY='api-key-goes-here' \
-e API_GATOR_CLIENT_ID='client-id-goes-here' \
-e API_GATOR_CLIENT_SECRET='client-secret-goes-here' \
-e API_GATOR_MANIFEST_NAME='Employee' \
-e API_GATOR_DATASET_TYPE='JSON' \
-e API_GATOR_JOB_TYPE='Restrict' \
-e API_GATOR_COUNTRY_CODE='GB' \
-e API_GATOR_PROTECT_NULL_VALUES='false' \
-e API_GATOR_PRESERVE_STRING_LENGTH='true' \
quay.io/ecosystem-appeng/gator-api-interceptor:tag-goes-here

exate-api-gator-dora-router's People

Contributors

tomerfi 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.