hhei
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Fips test --- Copy fromhttps://github.com/coreos/coreos-assembler/pull/4477#issuecomment-4156120051 Do a test that verifies that attempting to use algorithms that aren't FIPS compliant will make the connection fail. For example, attempting to use the ChaCha20-Poly1305 cipher, or the X25519 key exchange method should not yield a successful connection. Of course in the context of TLS, which is a negotating protocol, you typically won't see a failure until you change the configuration to only support those. On server side (none FIPS): * Build nginx container, add `ssl_ecdh_curve X25519` in nginx.conf, that means: When a client connects, I want to use the X25519 curve to negotiate the encryption keys (that is none FIPS-compliant). ``` #!/usr/bin/env bash # Run the image using command: # podman run -d --name nginx -p 8443:8443 nginx set -euo pipefail # Check if argument is provided if [ $# -eq 0 ]; then echo "Error: Missing IP address argument" echo "Usage: $0 <ip-address>" exit 1 fi IP="$1" tmpdir="$(mktemp -d)" cp Containerfile ${tmpdir} cd ${tmpdir} # Prepare index.html cat <<EOF > index.html This file was for testing. EOF # Prepare nginx.conf cat <<EOF > nginx.conf events {} http { server { listen 8443 ssl; ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; ssl_ecdh_curve X25519; -----> add here location / { root /usr/share/nginx/html; index index.html index.htm; } } } EOF mkdir -p ssl pushd ssl/ # Prepare openssl.cnf cat <<SSLEOF > openssl.cnf [ req ] distinguished_name = dn prompt = no [ dn ] CN = Test Server [ req_ext ] subjectAltName = IP:${IP} SSLEOF # Prepare key and crt ## Generate the private key openssl genpkey \ -algorithm RSA \ -out server.key ## Generate CSR openssl req -new -key server.key -out server.csr -config openssl.cnf ## Self-sign the certificate openssl x509 -req \ -in server.csr \ -signkey server.key \ -out server.crt \ -days 365 \ -extfile openssl.cnf \ -extensions req_ext rm server.csr openssl.cnf popd podman build -t nginx . ``` Containerfile ``` FROM registry.redhat.io/rhel10/nginx-126:10.1 ADD nginx.conf "${NGINX_CONF_PATH}" COPY index.html /usr/share/nginx/html/index.html # TLS material USER 0 COPY ssl/ /etc/nginx/ssl/ RUN chown -R 1001:0 /etc/nginx/ssl USER 1001 CMD ["nginx", "-g", "daemon off;"] ``` * Run nginx `podman run -d --name nginx -p 8443:8443 localhost/nginx:latest` On client: * Start with FIPS enabled, use ignition to fetch file from server failed ``` [ 12.981770] ignition[1123]: files: createFilesystemsFiles: createFiles: op(4): GET https://192.168.122.149:8443/index.html: attempt #1 [ 13.030651] ignition[1123]: files: createFilesystemsFiles: createFiles: op(4): GET error: Get "https://192.168.122.149:8443/index.html": remote error: tls: handshake failure ``` #### client config: enabled FIPS ``` variant: fcos version: 1.5.0 passwd: users: - name: core ssh_authorized_keys: - ssh-rsa xxx groups: - wheel - sudo ignition: security: tls: certificate_authorities: - inline: | -----BEGIN CERTIFICATE----- server.crt -----END CERTIFICATE----- storage: files: - path: /etc/ignition-machine-config-encapsulated.json mode: 0644 overwrite: true contents: inline: | { "spec": { "fips": true } } - path: /var/resource/https contents: source: https://192.168.122.152:8443/index.html ``` ------- ------- **ignore!!!** The tests confirm that Ignition can successfully fetch resources over HTTPS regardless of whether the client or server has FIPS mode active. Both client and server are using rhcos-9.8.20260314-0-qemu.x86_64.qcow2 Test Summary Results ``` Server (FIPS) Client (FIPS) Result Enabled Enabled OK Enabled Disabled OK Disabled Enabled OK ``` Test server enabled FIPS and client disabled FIPS * Start server with FIPs enabled ``` IGNITION_CONFIG="/home/fedora/data/ign/fips-enable.ign" virt-install --connect="qemu:///system" --name=rhcos1 --vcpus=2 --memory=2048 \ --os-variant="rhel9-unknown" --import --graphics=none \ --disk=size=16,backing_store=/home/fedora/data/rhcos-9.8.20260314-0-qemu.x86_64.qcow2 \ --network network=default,mac=52:54:00:ab:ef:6a --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=${IGNITION_CONFIG}" [core@localhost ~]$ cat /proc/sys/crypto/fips_enabled 1 ``` 1. Create cert and run nginx on server ``` podman run -d --name nginx -p 8443:8443 localhost/nginx:latest ``` 2. Start client none FIPs with igintion to fetch the file successfully ``` IGNITION_CONFIG="/home/fedora/data/ign/non-fips.ign" virt-install --connect="qemu:///system" --name=rhcos2 --vcpus=2 --memory=2048 \ --os-variant="rhel9-unknown" --import --graphics=none \ --disk=size=16,backing_store=/home/fedora/data/rhcos-9.8.20260314-0-qemu.x86_64.qcow2 \ --network network=default,mac=52:54:00:7b:55:63 --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=${IGNITION_CONFIG}" [core@localhost ~]$ cat /proc/sys/crypto/fips_enabled 0 [core@localhost ~]$ cat /var/resource/https This file was for testing. ``` --- Test server disabled FIPS and client enabled FIPS * Start server with none FIPs ``` IGNITION_CONFIG="/home/fedora/data/ign/ssh.ign" virt-install --connect="qemu:///system" --name=rhcos1 --vcpus=2 --memory=2048 \ --os-variant="rhel9-unknown" --import --graphics=none \ --disk=size=16,backing_store=/home/fedora/data/rhcos-9.8.20260314-0-qemu.x86_64.qcow2 \ --network network=default,mac=52:54:00:ab:ef:6a --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=${IGNITION_CONFIG}" [core@localhost ~]$ cat /proc/sys/crypto/fips_enabled 0 ``` 1. Create cert and run nginx on server ``` podman run -d --name nginx -p 8443:8443 localhost/nginx:latest ``` 2. Start client enabled FIPs with igintion to fetch the file successfully ``` IGNITION_CONFIG="/home/fedora/data/ign/fips-comp.ign" virt-install --connect="qemu:///system" --name=rhcos2 --vcpus=2 --memory=2048 \ --os-variant="rhel9-unknown" --import --graphics=none \ --disk=size=16,backing_store=/home/fedora/data/rhcos-9.8.20260314-0-qemu.x86_64.qcow2 \ --network network=default,mac=52:54:00:7b:55:63 --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=${IGNITION_CONFIG}" [core@localhost ~]$ cat /proc/sys/crypto/fips_enabled 1 [core@localhost ~]$ cat /var/resource/https This file was for testing. ``` ---- Run butane to translate the config to ign ``` butane -p fips.bu -o fips.ign ``` Create cert and build nginx (with default setting) ``` #!/usr/bin/env bash # Run the image using command: # podman run -d --name nginx -p 8443:8443 nginx set -euo pipefail # Check if argument is provided if [ $# -eq 0 ]; then echo "Error: Missing IP address argument" echo "Usage: $0 <ip-address>" exit 1 fi IP="$1" tmpdir="$(mktemp -d)" cp Containerfile ${tmpdir} cd ${tmpdir} # Prepare index.html cat <<EOF > index.html This file was for testing. EOF # Prepare nginx.conf cat <<EOF > nginx.conf events {} http { server { listen 8443 ssl; ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; location / { root /usr/share/nginx/html; index index.html index.htm; } } } EOF mkdir -p ssl pushd ssl/ # Prepare openssl.cnf cat <<SSLEOF > openssl.cnf [ req ] distinguished_name = dn prompt = no [ dn ] CN = Test Server [ req_ext ] subjectAltName = IP:${IP} SSLEOF # Prepare key and crt ## Generate the private key openssl genpkey \ -algorithm RSA \ -out server.key ## Generate CSR openssl req -new -key server.key -out server.csr -config openssl.cnf ## Self-sign the certificate openssl x509 -req \ -in server.csr \ -signkey server.key \ -out server.crt \ -days 365 \ -extfile openssl.cnf \ -extensions req_ext rm server.csr openssl.cnf popd podman build -t nginx . ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully