Skip to content

Instantly share code, notes, and snippets.

View jonathanbernal25's full-sized avatar
🚀
Working from home

JB jonathanbernal25

🚀
Working from home
View GitHub Profile
@jonathanbernal25
jonathanbernal25 / UDG.md
Last active September 4, 2020 07:50
Tyk's Universal Data Graph (UDG) Example

1. Fetch a user

Schema Editor
type Query {
  user(id: Int!): User 
}
type User {

Using LDAP to Perform Tyk Dashboard SSO

Prerequisites

For this example, we will be using a LDAP docker container on our local machine to authenticate the request. In order to add/modify entries in the LDAP container, we will need the following software:

  1. Apache Directory Studio

Additionally, we will need a working Tyk environment to run everything:

  1. Tyk Pro Docker Demo

Installing Tyk on RHEL7 / RHEL8

This guide is meant to be a distilled version of the information on Tyk's documentation. Refer to the official Tyk documentation for any updates, revisions, or additional details regarding this installation process.

NOTE: This guide is for installing all Tyk components and databases on a single server. This is NOT recommended for a production environment.

This guide is divided into three parts:

  1. Installing Tyk Dashboard
  2. Installing Tyk Pump
  3. Installing Tyk Gateway
@jonathanbernal25
jonathanbernal25 / tyk_middleware_go_custom_authentication.go
Created January 15, 2021 05:31
This file is for injecting custom authentication in API lifecycle, for Tyk Gateway.
package main
import (
"net/http"
"github.com/TykTechnologies/tyk/ctx"
"github.com/TykTechnologies/tyk/headers"
"github.com/TykTechnologies/tyk/log"
"github.com/TykTechnologies/tyk/user"
)
@jonathanbernal25
jonathanbernal25 / tyk-portal.md
Last active January 26, 2021 07:25
How to configure Tyk Developer Portal from base installation.
  1. Set the Developer Portal listen path via: tyk_analytics.conf
"host_config": {
      "enable_host_names": true,
     "disable_org_slug_prefix": true,
     "hostname": "",
     "override_hostname": "xyz:8080",
     "portal_domains": {},
 "portal_root_path": "/portal",
@jonathanbernal25
jonathanbernal25 / useful.md
Last active May 12, 2022 00:37
Useful commands

Logs

Follow Logs
journalctl -u tyk-gateway -f

Redis

redis-cli get KEY_NAME | jq .

Services

Status
sudo systemctl status tyk-dashboard

@jonathanbernal25
jonathanbernal25 / pumps.md
Last active May 17, 2022 22:35
Tyk Pumps

Mongo

#################### TYK_PMP_PUMPS_MAIN_TYPE=mongo TYK_PMP_PUMPS_MAIN_META_COLLECTIONNAME=tyk_analytics TYK_PMP_PUMPS_MAIN_META_MONGOURL=mongodb://tyk-mongo:27017/tyk_analytics TYK_PMP_PUMPS_MAIN_META_MAXINSERTBATCHSIZEBYTES=80000 TYK_PMP_PUMPS_MAIN_META_MAXDOCUMENTSIZEBYTES=20112

TYK_PMP_PUMPS_MAINAGG_TYPE=mongo-pump-aggregate TYK_PMP_PUMPS_MAINAGG_META_MONGOURL=mongodb://tyk-mongo:27017/tyk_analytics