Skip to content

Instantly share code, notes, and snippets.

View asoorm's full-sized avatar

Ahmet Soormally asoorm

View GitHub Profile
{
"api_definition": {
"jwt_issued_at_validation_skew": 0,
"upstream_certificates": {},
"use_keyless": true,
"enable_coprocess_auth": false,
"base_identity_provided_by": "",
"custom_middleware": {
"pre": [],
"post": [],
{
"name": "httpbin",
"use_keyless": true,
"version_data": {
"not_versioned": true,
"versions": {
"Default": {
"name": "Default",
"use_extended_paths": true
}
module.exports = users =
[
{
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "Sincere@april.biz",
"address": {
"street": "Kulas Light",
"suite": "Apt. 556",
module.exports = posts =
[
{
"userId": 1,
"id": 1,
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
},
{
"userId": 1,
@asoorm
asoorm / udg-kafka.yaml
Created March 22, 2023 16:04
Publish a Kafka topic as a GraphQL Subscription declaratively with Tyk's Univeral Data Graph
apiVersion: tyk.tyk.io/v1alpha1
kind: ApiDefinition
metadata:
name: udg-kafka
spec:
name: Universal Data Graph Kafka # name of the API Definition
use_keyless: true # make the api keyless (no security)
active: true # API can be active or inactive
graphql:
enabled: true # enable GraphQL Mode
@asoorm
asoorm / hmac-postman-pre-request-script.js
Last active February 14, 2024 17:10
Postman pre-request script to sign http requests with a HMAC shared secret
/* CHANGE THIS STUFF */
const KEY_ID = "61eaf3e25ebd3aa2f8d2958953bc5cc49e754195ac07e70c4f6d8fb6";
const HMAC_SECRET = "NWU0MzQ0ZjZmY2JiNGU4N2I1NmEyZjJlYTRlOTE0YzI=";
const SIGN_REQUEST_TARGET = true;
const SIGN_REQUEST_DATE = true;
const HEADERS_TO_SIGN = ["x-test-1", "x-test-2"];
const SIGNING_ALGORITHM = "hmac-sha512"; // supported algorithms: hmac-sha1, hmac-sha256, hmac-sha384, hmac-sha512
/* DO NOT CHANGE BELOW THIS LINE */