Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
/* | |
This is using the JS port of Google's libphonenumber. | |
As far as I know, though, all of the APIs are the same or similar | |
*/ | |
// I just hardcoded "US" as the country, but of course you can use any country iso code | |
var ctry = 'US'; | |
var exampleNumber = i18n.phonenumbers.PhoneNumberUtil.getInstance() | |
.getExampleNumberForType(ctry, i18n.phonenumbers.PhoneNumberType.MOBILE); // returns PhoneNumber instance |
realm=Sonatype Nexus Repository Manager | |
host=nexus.company.com | |
user=admin | |
password=admin123 |
""" | |
base64's `urlsafe_b64encode` uses '=' as padding. | |
These are not URL safe when used in URL paramaters. | |
Functions below work around this to strip/add back in padding. | |
See: | |
https://docs.python.org/2/library/base64.html | |
https://mail.python.org/pipermail/python-bugs-list/2007-February/037195.html | |
""" |
# Add this snippet to the top of your playbook. | |
# It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
# gwillem@gmail.com | |
- hosts: all | |
gather_facts: False | |
tasks: | |
- name: install python 2 | |
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
I implemented an auth API for a SPA. This is rarely documented and therefore I want to share here how I did it hoping it will be a help for others.
We are still working on it and I'll update this document accordingly.
This tutorial uses following versions:
Package | Version |
---|
Inspired By: grafana/loki#333
version: "3"
networks:
loki: