Skip to content

Instantly share code, notes, and snippets.

xpack.security.authProviders: [oidc, basic]
xpack.security.authc.oidc.realm: "MYREALM"
server.xsrf.whitelist: [/api/security/v1/oidc]
# Put secret on keystore
# xpack.security.authc.realms.oidc.MYCLIENTID.rp.client_secret: dd11dd11-dd11-dd11-dd11-dd11dd11dd11
xpack.security.authc.token.enabled: true
xpack:
security:
authc:
realms:
oidc:
Server A Server B Server C
My PC Server with Public IP Server in Private Network

Connect to C from A: A ---> C

In C: ssh -i keyC -R 2222:localhost:22 userB@userB

# https://stackoverflow.com/a/52944797
mkdir -p ./etc/cas
keytool -genkeypair -alias cas -keyalg RSA \
-keypass changeit -storepass changeit \
-keystore ./etc/cas/thekeystore \
-dname "CN=localhost.xxx.com.tw,OU=xxx,OU=xxx,C=TW" \
-ext SAN="dns:localhost,ip:127.0.0.1,dns:`hostname`"
For Docker
cat Payload | gzip -d | cpio -id

Keybase proof

I hereby claim:

  • I am espacioantonio on github.
  • I am eantonio (https://keybase.io/eantonio) on keybase.
  • I have a public key ASCNAipSmIAz_eMC_Pjy9irqGCRviA6rdq8kA-AoHAMOCgo

To claim this, I am signing this object:

@espacioAntonio
espacioAntonio / ca.md
Created July 2, 2018 20:35 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@espacioAntonio
espacioAntonio / install_jdk_linux.sh
Last active January 28, 2022 22:00
How to install Java JDK on Linux
########################################################################
# Download JDK
# http://www.oracle.com/technetwork/java/javase/downloads/index.html
########################################################################
# EXAMPLE JDK 8u152 version
tar xvzf jdk-8u152-linux-x64.tar.gz
# Move directory created to /opt
sudo mv jdk1.8.0_152 /opt/jdk
# Set variables
# -*- coding: utf-8 -*-
import json
try:
# For Python 3.0 and later
from urllib.request import urlopen
except ImportError:
# Fall back to Python 2's urllib2
from urllib2 import urlopen
@espacioAntonio
espacioAntonio / change_proccess_name.py
Last active September 11, 2017 22:07
change proccess name for a python program / script
import os
import ctypes
import platform
def set_name(new_name):
if platform.system()!='Linux':
print 'Unsupported platform'
try:
libc = ctypes.CDLL('libc.so.6')
libc.prctl(15,new_name,0,0,0)