Skip to content

Instantly share code, notes, and snippets.

Avatar

Simone Scarduzio sscarduzio

View GitHub Profile
View proxy.js
const http = require('http')
const httpProxy = require('http-proxy')
const l = require('chalk')
// ---- Kibana
function filterHeaders(prefix, o) {
var filtered = []
for (k of Object.keys(o)) {
if (k.indexOf(prefix) >= 0) {
var partialObj = {}
View proxy.js
const http = require('http')
const httpProxy = require('http-proxy')
const l = require('chalk')
// ---- Kibana
function filterHeaders(prefix, o) {
var filtered = []
for (k of Object.keys(o)) {
if (k.indexOf(prefix) >= 0) {
var partialObj = {}
@sscarduzio
sscarduzio / git-tag-delete-local-and-remote.sh
Last active May 13, 2020 — forked from mobilemind/git-tag-delete-local-and-remote.sh
How to delete multiple git tags locally and remote
View git-tag-delete-local-and-remote.sh
# Usage: ./git-tag-delete-local-and-remote.sh 1.19
# will delete tags: "1.19.1" "1.19.2" "1.19.3" ...
for i in `git tag|grep $1`
do
git push --delete origin "$i"
git tag -d "$i"
done
View docker-compose_1.yml
version: '3.3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
container_name: ror_elasticsearch
hostname: ror_elasticsearch
ports:
- "9200:9200"
@sscarduzio
sscarduzio / docker-compose_2.yml
Last active Mar 3, 2020
Secure Your ELK Stack via Either X-Pack or ReadonlyREST (2)
View docker-compose_2.yml
version: '3.3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
container_name: ror_elasticsearch
hostname: ror_elasticsearch
ports:
- "9200:9200"
@sscarduzio
sscarduzio / readonlyrest.yml
Last active Jan 18, 2020
ROR ACL Examples: SSL
View readonlyrest.yml
readonlyrest:
ssl:
keystore_file: "keystore.jks"
keystore_pass: "passwd"
key_pass: "passwd"
@sscarduzio
sscarduzio / readonlyrest.yml
Created Jan 17, 2020
ROR ACL Exaples: authorization
View readonlyrest.yml
readonlyrest:
access_control_rules:
- name: "LDAP users via basic auth"
ldap_auth:
name: "ldap1"
groups: ["ldap_group1"]
ldaps:
- name: ldap1
hosts:
@sscarduzio
sscarduzio / readonlyrest.yml
Created Jan 17, 2020
ROR ACL Exaples: authorization
View readonlyrest.yml
readonlyrest:
access_control_rules:
- name: "analysts group permissions"
indices: ["logstash-*"]
groups: ["analysts"]
users:
- username: ada
auth_key: ada:passwd1
groups: ["analysts"]
@sscarduzio
sscarduzio / readonlyrest.yml
Created Jan 17, 2020
ROR ACL Exaples: authentication
View readonlyrest.yml
readonlyrest:
access_control_rules:
- name: "user1 can see logstash data"
auth_key: "user1:password"
indices: ["logstash-*"]
@sscarduzio
sscarduzio / readonlyrest.yml
Last active Jan 17, 2020
ROR ACL Examples: field level security
View readonlyrest.yml
readonlyrest:
access_control_rules:
- name: "No sensitive fields in search"
fields: ["~credit_card", "~birth_date"]
You can’t perform that action at this time.