Better HN
topnewbestaskshowjobs
Log inSign up

eriksjolund

127 karma · joined Aug 15, 2016 (10y ago) · 39 submissions

Submissions

comment 4d ago · link · parent

The ONLYOFFICE release 10.0.0 (12 October 2026) https://github.com/ONLYOFFICE/DocumentServer/blob/master/CHA... lists 46 security related fixes.

At first sight it seems some (or all) of them are missing here: https://github.com/Euro-Office/DocumentServer/blob/main/CHAN...

comment 1y ago · link · parent

Sometimes it's possible to not use the Podman API at all. Convert the compose file to quadlet files with the command-line tool podlet and start the container with "systemctl --user start myapp.service". Due to the fork/exec architecture of podman, the container can then be started without using the Podman API.

comment 1y ago · link · parent

That workaround is not needed if the web server container supports socket activation. Due to the fork-exec architecture of Podman, the socket-activated socket is inherited by the container process. Network traffic sent over this socket-activated socket has native performance. https://github.com/containers/podman/blob/main/docs/tutorial...

comment 1y ago · link · parent

The license would no longer be open source if you limit use to only community.

See "6. No Discrimination Against Fields of Endeavor" in The Open Source Definition https://opensource.org/osd

comment 1y ago · link · parent

I did it out of pure interest, just to explore ways of locking down a web server.

comment 1y ago · link · parent

You can use the podman option `--network=none` together with the systemd directive `RestrictAddressFamilies=`

I wrote a demo: https://www.redhat.com/en/blog/podman-systemd-limit-access

Podman will then not have the privilege to pull the container image, but a web server container can still serve the internet with socket activation.

comment 1y ago · link · parent

Podman quadlet supports "Socket activation of containers" https://github.com/containers/podman/blob/main/docs/tutorial... This allows you to run a network server with `Network=none` (--network=none). If the server would be compromised, the intruder would not have the privileges to use the compromised server as a spam bot. There are other advantages, such as support for preserved source IP address and better performance when running a container with rootless Podman + Pasta in a custom network.

comment 1y ago · link · parent

Socket activation can be used with quadlets but not with docker-compose. That is a big advantage.

https://github.com/containers/podman/blob/main/docs/tutorial...

comment 1y ago · link · parent

If you want to know why bootc is needed check this list of goals: https://containers.github.io/bootable/

I found that URL by following the link in "bootc is the key component in a broader mission of bootable containers."

(https://bootc-dev.github.io/bootc/intro.html)

comment 1y ago · link · parent

Another tool that can be used by an unprivileged user for analysing network traffic is rootless Podman with Pasta.

Just add the podman run option

--network=pasta:--pcap,myfile.pcap

Pasta then records the network traffic into a PCAP file that could later be analysed.

I wrote a simple example where I used tshark to analyse the recorded PCAP file https://github.com/eriksjolund/podman-networking-docs?tab=re...

comment 2y ago · link · parent

How to display circles on top of zoomable images without getting flickering is an interesting problem. (This comment does not refer specifically to displaying a tree map)

I noticed that painting the circles on top of an overlay with OpenSeadragon caused flickering [1]. However, when painting circles on top of the pyramid image tiles that OpenSeadragon loaded, there was no flickering.

This was my conclusion in 2016 when I created a web viewer that showed circles on top of a microscope photo [2]. Architecture: single file format containing an index, pyramid image tiles and measurement data for circles. To make this work, I intercepted the function call that OpenSeadragon usually uses to download an image tile. Instead, I provided OpenSeadragon with an image tile that already had the circle painted on it.

[1] https://openseadragon.github.io/examples/ui-overlays/ [2] demo: https://eriksjolund.github.io/osd-spot-viewer-webpack-build/... (The demo only worked on Linux. I'm not sure if it still works) source code: https://github.com/eriksjolund/osd-spot-viewer

comment 3y ago · link · parent

Here are some documentation and demos from me and others if you're interested:

https://github.com/eriksjolund/podman-networking-docs https://github.com/eriksjolund/podman-nginx-socket-activatio... https://github.com/eriksjolund/socket-activate-httpd https://github.com/eriksjolund/mariadb-podman-socket-activat... https://github.com/PhracturedBlue/podman-socket-activated-se...

comment 3y ago · link · parent

Rootless Podman uses slirp4netns by default. The default will soon change to pasta. Pasta has better performance than slirp4netns. For best performance if your container supports it, use systemd socket activation because the traffic over the activated socket will have native network performance.

comment 3y ago · link · parent

Podman can run a socket-activated network server (such as docker.io/library/nginx) with the "--network=none" option. This improves security.

comment 3y ago · link · parent

It seems Red Hat believes in Loki

Red Hat logging product manager says: "We made the decision to move to Loki and Vector" https://www.youtube.com/watch?v=QZ4Hv85lEJ0&t=938s

comment 3y ago · link · parent

I just tried this out. The new systemd directive OpenFile= opens up the possibility to pass the file descriptor of a file from the host to a container running in a container. (using rootless Podman running rootless Podman)

sudo systemd-run --property User=test --property OpenFile=/etc/secretfile.txt --collect --pipe --wait --quiet podman run --security-opt label=disable --user podman --device /dev/fuse quay.io/podman/stable podman run -q alpine sh -c "cat <&3"

comment 3y ago · link · parent

I wrote a mini tutorial (as a Reddit comment) about how to deal with UID/GID mappings when you run rootless podman and you want a specific container user to write to a bind-mounted directory:

https://www.reddit.com/r/podman/comments/103ut7z/comment/j31...

Short summary: My best tip is to see if either "--user $uid:$gid" or "--user 0:0" works together with this command:

podman run --rm --user $uid:$gid --volume ./dir:/dir:Z --userns keep-id:uid=$uid,gid=$gid IMAGE

(requires podman > 4.3.0)

comment 4y ago · link · parent

Podman has a feature that Docker does not yet have: Socket activation of containers. I created a proof-of-concept demo of how to run an nginx container with rootless Podman and socket activation.

Using socket activation has some security and performance advantages:

- Native network performance over the socket-activated socket

- Possibility to restrict the network in the container

- Possibility to at the same time restrict the network in Podman and the OCI runtime

- The source IP address is preserved

- Podman installation size can be reduced

19.

Show HN: Run Nginx with Podman and socket activation(github.com ↗)

4 points · by eriksjolund · 4y ago · 1 comment

comment 4y ago · link · parent

Ok, I understand your concern about Slirp.

Regarding the other idea: I've now tested it and verified that it works. The remote address is available when running a socket-activated container with rootless Podman.

comment 4y ago · link · parent

The remote address is available when running a socket-activated container with rootless Podman. I verified it in a test.

comment 4y ago · link · parent

Not exactly what you are asking for but there is a Systemd feature request to add Connect= setting to service unit files. https://github.com/systemd/systemd/issues/23067#issuecomment... (That could a be cool feature)

Also interesting would be to fix the security considerations of using bypass4netns:

"However, it is probably possible to connect to host loopback IPs by exploiting TOCTOU of struct sockaddr * pointers."

There seems to be an implementation idea for how the problem could be fixed:

https://github.com/rootless-containers/bypass4netns/issues/2...

comment 4y ago · link · parent

You could detect the source IP address by using the command-line option:

--net=slirp4netns:port_handler=slirp4netns

See https://github.com/containers/podman/discussions/10472#discu...

Shouldn't it also be possible to detect the source IP address if you use socket activation? (I haven't tried it out, though).

comment 4y ago · link · parent

I haven't tried it out, but shouldn't you be able to detect the true remote address by using a socket that has been passed in via socket activation?

comment 4y ago · link · parent

I like this Podman feature:

Socket activation of containers

Advantages:

- Faster network. Rootless Podman will run with native network speed. Normally rootless Podman runs with reduced network speed due to the performance penalty that comes from using slirp4netns.

- Improved security as you can disable the ability to establish outgoing connections with --network=none. The container can still communicate over the socket-activated socket with a client that has connected via the internet.

I contributed a Podman socket activation tutorial: https://github.com/containers/podman/blob/main/docs/tutorial...

and I wrote two blogs about the security advantages

https://www.redhat.com/sysadmin/socket-activation-podman

https://www.redhat.com/sysadmin/podman-systemd-limit-access

Docker does not support socket activation of containers. (Docker only supports socket activation of the Docker daemon)

Edit: A clarification about the network speed. The improved speed is about the communication that passes over the socket-activated socket. This communication does not pass through slirp4netns so it has the same performance characteristics as the normal network on the host.

comment 4y ago · link · parent

The --uidmap and --gidmap options can map your regular user on the host to any specific user inside the container.

These options may look to be a bit complicated to use, but as soon as you understand how rootless Podman maps UIDs and GIDs it will be pretty straight forward.

I wrote two troubleshooting tips about how to use them:

https://github.com/containers/podman/blob/main/troubleshooti...

https://github.com/containers/podman/blob/main/troubleshooti...

comment 4y ago · link · parent

To try it out, click the button "open some example data files and layouts".

About the software design:

All pyramidal photo tiles and gene expression measurement data are combined into one single file.

Instead of downloading the whole experiment data file, the viewer makes use of HTTP Range requests to first download an index and then only fetch the relevant parts of the file. The viewer can also be used offline for viewing locally stored experiment data files.

To avoid flickering while zooming in and out, the measurement points were painted on the photo tiles instead of making use of an overlay. The software is open source and availalbe on GitHub

https://github.com/eriksjolund/osd-spot-viewer

https://github.com/eriksjolund/st_exp_protobuf

Tweet from today https://twitter.com/eriksjolundcomp/status/15018687107845529...

28.

Show HN: Web viewer for gene measurements (single data file and OpenSeadragon)(eriksjolund.github.io ↗)

1 points · by eriksjolund · 4y ago · 1 comment

comment 4y ago · link · parent

I like this Podman feature: Support for socket activation

Podman will pass on the socket-activated socket to the container.

I wrote a small example demo for setting up socket activation with systemd, Podman, and a MariaDB container:

https://github.com/eriksjolund/mariadb-podman-socket-activat...

12