Affichage des articles dont le libellé est web. Afficher tous les articles
Affichage des articles dont le libellé est web. Afficher tous les articles

jeudi 5 mai 2022

Generating a cookie secret

Generating a cookie secret 

required step for a lot of web-based use-case when a cookie must be stored on the client side, for example with oauth2-proxy to set-up remote authentication.



  • docker / python 

docker run -ti --rm python:3-alpine python -c 'import secrets,base64; print(base64.b64encode(base64.b64encode(secrets.token_bytes(16))));'



Followings solutions are from : https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/overview (v7.2.x)

  • Python

python -c 'import os,base64; print(base64.urlsafe_b64encode(os.urandom(32)).decode())'

  • Bash

dd if=/dev/urandom bs=32 count=1 2>/dev/null | base64 | tr -d -- '\n' | tr -- '+/' '-_'; echo

  • Open SSL

openssl rand -base64 32 | tr -- '+/' '-_'

  • PowerShell

# Add System.Web assembly to session, just in case
Add-Type -AssemblyName System.Web
[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes([System.Web.Security.Membership]::GeneratePassword(32,4))).Replace("+","-").Replace("/","_")

  • Terraform

# Valid 32 Byte Base64 URL encoding set that will decode to 24 []byte AES-192 secret
resource "random_password" "cookie_secret" {
length = 32
override_special = "-_"
}

Caddy + xcaddy within a docker container

Start Caddy within a docker container and add a plugin.

https://caddyserver.com/docs/modules/security


./docker-compose.yml

version: '3.4'
networks:
  monitor-net:
    driver: bridge
volumes:
    caddy_data: {}
services:
  caddy:
    # cf. https://github.com/caddyserver/caddy/releases
    # image: caddy:2.5.0
    build:
      context: ./caddy/ # where to look for the Dockerfile
      dockerfile: Dockerfile # actual name of the Dockerfile
      args:
        image_ref: caddy:2.5.0
    container_name: caddy
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./caddy:/etc/caddy
      - caddy_data:/data
    env_file:
      ./.env
    restart: unless-stopped
    networks:
      - monitor-net
    labels:
      org.label-schema.group: "monitoring"



image_ref: caddy:2.5.0 # image reference used twice in the Dockerfile, once with ${image_ref}-builder, once directly


./caddy/Dockerfile :

ARG image_ref
FROM ${image_ref}-builder AS caddy-build
RUN xcaddy build --with github.com/greenpau/caddy-security
FROM ${image_ref}
COPY --from=caddy-build /usr/bin/caddy /usr/bin/caddy


Caddyfile must exist (content not relevant here):

./caddy/Caddyfile


command :

docker-compose  up --build caddy



lundi 26 octobre 2020

make some internet noise / anti-recommendation algorithms tools

 http://makeinternetnoise.com/ : opens random webpages every 5 sec. This creates some artificial clutter in your web history => recommendation algorithms are lost.

(source : https://getpocket.com/explore/item/how-to-disappear )


jeudi 15 août 2019

HAR analyser

https://toolbox.googleapps.com/apps/har_analyzer/

mardi 17 février 2015

REF / Link : Benchmark of Python Web Servers

http://nichol.as/benchmark-of-python-web-servers

An extensive analysis of the different python web servers available on the market.

lundi 21 mai 2012

Research Social Networks

Social Networks for people doing research : Mendeley seems to be based on dealing with your PDF collection. Alternative Android application : http://blog.mendeley.com/tipstricks/android-on-mendeley-an-app-guide/ Researchgate http://www.researchgate.net/ Academia.edu http://academia.edu/

lundi 19 janvier 2009

HotCRP Conference Management Software

HotCRP Conference Management Software

HotCRP is conference management software: it accepts paper submissions and manages the review process. Many conference management packages are available nowadays, including START/Softconf, Linklings, EasyChair, and Dirk Grunwald's original CRP. (I haven't used Conferencereview.com or Continue.) HotCRP is better than the original CRP. Relative to the others, as of early 2007 it is easier for PC members to navigate from paper to paper and to search for papers in HotCRP, but START's single-page paper submission form is easier than HotCRP's paper submission process (HotCRP includes an email validation step). If you don't like HotCRP try START. Linklings is not in the same class.

HotCRP is open source and requires that you run your own server, although the initial setup process is quite easy and should take about 15 minutes on a modern Linux or BSD box. Software requirements: Apache, PHP version 5 or higher, and MySQL version 5 or higher, plus several PHP packages. The README for the latest release has more.

HotCRP was written for the HotNets V workshop in 2006, and used thereafter for USENIX 2007, SIGCOMM 2007, and SOSP 2007, among many others. It is based on Dirk Grunwald's CRP but is mostly rewritten by now.

Git repository

git clone git://read.cs.ucla.edu/git/hotcrp LOCALDIR
Gitweb source code browsing

samedi 26 janvier 2008

Firebug, tool for web development.

Remplace avantageusement le DOM inspector, puisqu'il est possible de modifier la page directement "on the fly" :-) (HTML, CSS, visualisation des entêtes, etc. )

Firebug