Created
June 27, 2022 13:45
-
-
Save jesusjavierdediego/a1b2fec2db89bf9dc9a31e455eb47d47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_format_version: "2.1" | |
_transform: true | |
services: | |
- host: <YOUR API HERE> | |
name: TiredfulAPI | |
port: 8005 | |
protocol: http | |
routes: | |
- name: CSS | |
paths: | |
- /api/v1/advertisements/ | |
strip_path: false | |
methods: | |
- GET | |
- POST | |
- name: SQLInjection | |
paths: | |
- /api/v1/activities/ | |
strip_path: false | |
methods: | |
- POST | |
- name: UserOTM | |
paths: | |
- /api/v1/exams/OTM=/ | |
strip_path: false | |
methods: | |
- GET | |
- name: UserNTY | |
paths: | |
- /api/v1/exams/NTY=/ | |
strip_path: false | |
methods: | |
- GET | |
- name: RateLimit | |
paths: | |
- /api/v1/trains/ | |
strip_path: false | |
methods: | |
- POST | |
- name: InformationDisclosure | |
paths: | |
- /api/v1/books/ | |
strip_path: false | |
methods: | |
- GET | |
plugins: | |
- name: acl | |
route: UserNTY | |
config: | |
allow: | |
- nty-group | |
hide_groups_header: true | |
- name: acl | |
route: UserOTM | |
config: | |
allow: | |
- otm-group | |
hide_groups_header: true | |
- name: key-auth | |
route: UserNTY | |
config: | |
key_names: | |
- apikey | |
key_in_body: false | |
key_in_header: true | |
key_in_query: true | |
hide_credentials: false | |
run_on_preflight: true | |
- name: key-auth | |
route: UserOTM | |
config: | |
key_names: | |
- apikey | |
key_in_body: false | |
key_in_header: true | |
key_in_query: true | |
hide_credentials: false | |
run_on_preflight: true | |
- name: mtls-auth | |
route: RateLimit | |
config: | |
ca_certificates: | |
- 7ccf0aed-0181-4c51-99fa-5ccc831cee8b | |
revocation_check_mode: SKIP | |
skip_consumer_lookup: true | |
cache_ttl: 60 | |
- name: response-transformer-advanced | |
route: InformationDisclosure | |
config: | |
replace: | |
body: '{"error": "internal server error"}' | |
if_status: | |
- "500" | |
consumers: | |
- username: otm | |
keyauth_credentials: | |
- key: otm-key-auth | |
- username: nty | |
keyauth_credentials: | |
- key: nty-key-auth | |
acls: | |
- consumer: otm | |
group: otm-group | |
- consumer: nty | |
group: nty-group | |
ca_certificates: | |
- id: 7ccf0aed-0181-4c51-99fa-5ccc831cee8b | |
cert: | | |
-----BEGIN CERTIFICATE----- | |
... | |
-----END CERTIFICATE----- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment