Skip to content

Instantly share code, notes, and snippets.

@andrew-qa
andrew-qa / eck_okta_oidc.md
Last active August 4, 2023 07:09
ECK Okta OIDC settings

Starting point: https://www.elastic.co/blog/how-to-set-up-openid-connect-on-elastic-cloud-with-azure-google-okta#okta

First of all, you should have Elastic license from Platinum and higher in order to use SSO of any kind. So check yoour license.

If you're eligible for SSO then start with congiuration:

  1. Install ECK. E.g. using this method https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-eck.html
  2. Deploy Elasticsearch CRD. E.g. https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-elasticsearch.html
  3. Add proper app to the OKTA and get Client ID and Client secret
  4. Add kubernetes secret with OIDC client secret.
@syndrill
syndrill / xxtea.py
Last active December 8, 2019 21:55 — forked from shuax/xxtea.py
cocos2d-x implementation of XXTEA
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import struct
_DELTA = 0x9E3779B9
def _long2str(v, w):
n = (len(v) - 1) << 2
if w:
@adamhaney
adamhaney / dag.py
Created June 14, 2017 18:10
DBT Airflow DAG with model/graph introspection
from datetime import datetime, timedelta
import networkx as nx
from airflow import DAG
from airflow.operators import BashOperator, SubDagOperator
start_date = datetime(year=2017, month=6, day=13, hour=19, minute=0)
schedule_interval = '0 * * * 1-5'
default_args = {
import struct
_DELTA = 0x9E3779B9
def _long2str(v, w):
n = (len(v) - 1) << 2
if w:
m = v[-1]
if (m < n - 3) or (m > n): return ''
n = m