Outils pour utilisateurs

Outils du site


blog

Notes YubiKey FIDO PIN

$ ykman fido access verify-pin 
Enter your PIN: 
ERROR: PIN verification failed: CTAP error: 0x32 - PIN_BLOCKED.

$ ykman fido info
AAGUID:             1fc0579f-8113-47ea-b116-bb5a8db9203b
PIN:                Blocked
Minimum PIN length: 4

$ ykman fido reset
WARNING! This will delete all FIDO credentials, including FIDO U2F credentials, and restore factory settings. Proceed? [y/N]: y
Remove your YubiKey from the USB port.

Re-insert your YubiKey now...
Touch the YubiKey to confirm.
Reset in progress, DO NOT REMOVE YOUR YUBIKEY!
FIDO application data reset.

$ ykman fido access change-pin
Enter your new PIN: 
Repeat for confirmation: 
FIDO PIN updated.

FIXME

2026/06/26 23:15 · Jean-Baptiste

Tester les flux réseaux UDP

Voir aussi remplacer_telnet_nc_sous_linux

telnet c'est pratique, mais ça ne marche que pour TCP

!! UDP n'est pas un protocole en mode connecté

Netcat est votre ami

$ nc -zvu 127.0.0.1 1-65535
Connection to 127.0.0.1 111 port [udp/*] succeeded!
Connection to 127.0.0.1 161 port [udp/*] succeeded!
Connection to 127.0.0.1 897 port [udp/*] succeeded!
Connection to 127.0.0.1 1900 port [udp/*] succeeded!
Connection to 127.0.0.1 2086 port [udp/*] succeeded!
Connection to 127.0.0.1 5353 port [udp/*] succeeded!
Connection to 127.0.0.1 32964 port [udp/*] succeeded!
Connection to 127.0.0.1 34578 port [udp/*] succeeded!
Connection to 127.0.0.1 37878 port [udp/*] succeeded!
$ nc -uvz serveur 1-162
serveur [172.17.39.87] 162 (snmp-trap) open
serveur [172.17.39.87] 123 (ntp) open
serveur [172.17.39.87] 67 (bootps) open

Sinon il existe Nmap

Netcat - bind binding NIC

nc -lnp 3306 192.168.200.62
$ ss -tln | grep 3306
LISTEN   0         1             192.168.200.62:3306            0.0.0.0:*
unixsock Unix domain sockets
echo -e "GET /containers/omsa82-snmp/stats HTTP/1.0\r\n" | nc -U /var/run/docker.sock

Autres

Bande passante :

  • bwm-ng
  • iperf

cat /sys/class/net/eth0/statistics/tx_bytes

# awk '/^Udp:/ { print $5}' /proc/1565/net/snmp
OutDatagrams
208064

Info

# cat /sys/class/net/eth0/duplex
full
# cat /sys/class/net/eth0/speed
1000
# cat /sys/class/net/eth0/address
08:00:27:56:10:6a
2026/06/26 17:47

Notes gitlab - certificats CA

cp -p *.crt /usr/local/share/ca-certificates/
update-ca-certificates
# curl -I https://arty.acme.local
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
# curl --cacert /usr/local/share/ca-certificates/acme-subca1.crt -I https://arty.acme.local
HTTP/1.1 200 OK
...
# wget https://arty.acme.local
--2026-06-11 11:41:00--  https://arty.acme.local/
Resolving arty.acme.local (arty.acme.local)... 10.245.208.69, 10.245.208.36
Connecting to arty.acme.local (arty.acme.local)|10.245.208.69|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23381 (23K) [text/html]
Saving to: ‘index.html’

index.html                                           100%[====================================================================================================================>]  22.83K  --.-KB/s    in 0.02s

2026-06-11 11:41:00 (1.00 MB/s) - ‘index.html’ saved [23381/23381]
# which curl
/opt/gitlab/embedded/bin/curl
# cat /opt/gitlab/etc/gitaly/env/SSL_CERT_DIR  ; echo
/opt/gitlab/embedded/ssl/certs/

# cat /opt/gitlab/embedded/ssl/certs/README
This directory is managed by omnibus-gitlab.
 Any file placed in this directory will be ignored
. Place certificates in /etc/gitlab/trusted-certs.

# ls -l /etc/gitlab/trusted-certs
total 0

Solution

cp -p /usr/local/share/ca-certificates/* /etc/gitlab/trusted-certs/

Redémarrer Gitlab

FIXME

2026/06/18 11:42 · Jean-Baptiste

Notes Gitlab-ci pipeline - API

Exemple 1 - avec Access Token ou Personnal Access tokens

Avec Access Token (associé au projet)

  • Aller dans le projet - puis : Settings / Access tokens
  • Attention : par défaut les Access Tokens ont une date d'expiration

Avec Personnal Access tokens (associé au compte utilisateur)

  • Profile / Edit profile / Access Token / Personal Access Tokens
  • Attention : par défaut les Personal Access Tokens ont une date d'expiration

Launch pipeline with API call - with Private / Personal access tokens

curl --request POST \
  --header "PRIVATE-TOKEN: saltxx-8888888888" \
  --header "Content-Type: application/json" \
  --data '{ "ref": "master", "variables": [ {"key": "VAR1", "value": "plop"}, {"key": "VAR2", "value": "plop"}, {"key": "VAR3", "value": "plop"}, {"key": "VAR4", "value": ""} ] }' \
  --url "${CI_API_V4_URL}/projects/100/pipeline"

Voir https://docs.gitlab.com/api/rest/

Notes

CI_API_V4_URL est une variable magique dont la valeur est de la forme : http://gitlab.acme.local/api/v4

Dans notre cas la variable ref correspond au nom de la branche

Exemple 2 - Avec Trigger Tokens

Voir :

Voir aussi :

Aller dans le projet, puis Settings/ CI/CD / Pipeline trigger tokens

Trigger pipeline with the API / Pass CI/CD variables in the API call

curl --request POST \
     --form token=glptt-99999999999999 \
     --form ref=master \
     --form "variables[VAR1]=plop" \
     --form "variables[VAR2]=plop" \
     --form "variables[VAR3]=plop" \
     --form "variables[VAR4]=plop" \
     "${CI_API_V4_URL}/projects/100/trigger/pipeline"  

Avec Ansible

.gitlab-ci.yml

launch:
  tags:
    # - gitlab-runner-sh-001
    - gitlab-runner-docker-001
  image: registry.acme.local/repository/local-docker/ansible-builder:0.0.4
  stage: build
  script: ansible-playbook play-launch-ci.yml -e url="${CI_API_V4_URL}" -e token="${TRIGGER_TOKEN}"

play-launch-ci.yml

#! /usr/bin/env ansible-playbook
 
---

- name: Launch CI
  gather_facts: false
  hosts: localhost

  vars:
    branch: "{{ lookup('env', 'BRANCH') }}"
    line: "{{ lookup('env', 'LINE') }}"
    kind: "{{ lookup('env', 'KIND') }}"

  tasks:
    - name: Assert check environment vars are correctly defined
      ansible.builtin.assert:
        that:
          - url is defined and url != ''
          - token is defined and token != ''
          - branch is defined and branch != ''
          - line is defined and line != ''
          - kind is defined and kind != ''
        msg: "Env var must be defined"

    - name: Call API
      # no_log: true
      register: reg_uri
      until: reg_uri.status == 201
      retries: 3
      delay: 5    # Every 5 seconds
      ansible.builtin.uri:
        url: "{{ url }}/projects/100/trigger/pipeline"
        # validate_certs: false
        status_code: 201
        follow_redirects: none
        method: POST
        body_format: json
        headers:
          Content-Type: "application/json"
        body: |
          {
            "ref": "main",
            "token": "{{ token }}",
            "variables": {
              "BRANCH": "{{ branch }}",
              "KIND": "{{ kind }}",
              "LINE": "{{ line }}"
            }
          }

Voir https://docs.gitlab.com/ci/triggers/

Autres
000-colo-switch:prod:
  stage: deploy
  variables:
    PROJECT: "projectname"
  rules: # whether to include the job in the pipeline
    - if: $CI_PIPELINE_SOURCE == "trigger"
      when: always
    - when: never

Source: https://forum.gitlab.com/t/triggering-a-specific-job-of-the-pipeline-via-api/42397/2

2026/06/17 17:27 · Jean-Baptiste
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki