Skip to content

Instantly share code, notes, and snippets.

View weboAp's full-sized avatar

WeboAp weboAp

  • 03:35 (UTC -04:00)
View GitHub Profile
@weboAp
weboAp / README.md
Created September 21, 2023 03:45 — forked from AlanD20/README.md
Visual Studio Code Configuration / vscode / vs code / extensions / settings

VS Code Configuration

Export VSCode Extensions:

code --list-extensions | xargs -L 1 echo code --install-extension # Unix

code --list-extensions | % { "code --install-extension $_" } # Windows PowerShell

Shortcuts:

@weboAp
weboAp / bucket-policies-primer.md
Created November 23, 2022 03:31 — forked from krishnasrinivas/bucket-policies-primer.md
Explanation of bucket polices by example

Bucket Policy

Bucket policy is an access policy available for you to grant anonymous permissions to your Minio resources. Bucket policy uses JSON-based access policy language.

This section presents a few examples of typical use cases for bucket policies. The policies use testbucket strings in the resource value. To test these policies, you need to replace these strings with your bucket name. For more information please read Amazon S3 access policy language

Granting Read-Only Permission to an Anonymous User

The following example policy grants the s3:GetObject permission to any public anonymous users. This permission allows anyone to read the object data under testbucket, which is useful for when you have publicly readable assets. A typical example is a website assets stored in testbucket.

@weboAp
weboAp / hashicorp-vault-auth-cert-and-token-role-creation.md
Created April 17, 2022 11:08 — forked from davidmintz/hashicorp-vault-auth-cert-and-token-role-creation.md
notes on setting up and using Vault TLS authentication, policies, and tokens with named roles

Our goal is to save sensitive data in a MySQL database in a responsible way, and be able to read/write it programmatically in a PHP web application. Asymmetric encryption would be best, but is not practical here. Symmetric encryption with a strong algorithm and hard-to-guess cipher is acceptable, but not if we store the cipher in plain text on the same server where the database credentials also live in plain text!

This work-in-progress is subject to change if/when I come up with a better scheme, but for now, the plan is to:

  • store the cipher as a vault secret;
  • configure TLS authentication so that our PHP application can log in, and then
  • create a token that allows its bearer to read the secret (our cipher);
  • use a PHP component and our cipher to encrypt/decrypt our sensitive data.
@weboAp
weboAp / sftp.yaml
Created February 5, 2022 05:24 — forked from jujhars13/sftp.yaml
kubernetes pod example for atmoz/sftp
apiVersion: v1
kind: Namespace
metadata:
name: sftp
---
kind: Service
apiVersion: v1
metadata:
set -e
set -u
CERT_HOSTNAME=www.example.com
# create private CA key
openssl genrsa -out $CERT_HOSTNAME-CA.key 2048
# create private CA certificate
@weboAp
weboAp / 1-operator.yaml
Created September 7, 2019 07:46 — forked from fr34kyn01535/1-operator.yaml
Rook on Rancher
apiVersion: v1
kind: Namespace
metadata:
name: rook-ceph-system
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: cephclusters.ceph.rook.io
spec: