News for hackers. Stuff that matters.
Re:Alpine Linux Docker images have NULL for root password by yegle on Wednesday May 08, 2019 @03:22PM (#19862002)
For anyone who want a small image but with glibc, https://github.com/GoogleContainerTools/distroless is a good choice, especially if you are writing in static linked language e.g. Go and Rust.
Re:Alpine Linux Docker images have NULL for root password by catern on Wednesday May 08, 2019 @03:32PM (#19862093)
"distroless" is just Debian packages. Their self-description is fairly annoyingly misleading, since they don't mention that they are just using packages from Debian.
Re:Alpine Linux Docker images have NULL for root password by yegle on Wednesday May 08, 2019 @03:35PM (#19862109)
Why is that a bad thing? Binaries are binaries, whether you copied from a deb package or completely built from source code (assuming reproducible build, which Debian supports), they are the same.
Re:Alpine Linux Docker images have NULL for root password by catern on Wednesday May 08, 2019 @04:05PM (#19862368)
It's absolutely not a bad thing, indeed I think it's a good thing to use binaries from Debian. I just think the name of the project is strongly misleading. "distroless" is built from the Debian distribution, not something new made from scratch.
Re:Alpine Linux Docker images have NULL for root password by hobofan on Wednesday May 08, 2019 @06:17PM (#19863513)
Not sure how widespread that view is, but that's never the association I would have made.

"Xless" is just a different way of saying "without X". "fearless" = "without fear"; "serverless" = "without a server" (yes, I know, not really); so "distroless" = "(comes) without a distribution"

So in my opinon the name correctly suggests that it's "just the package" and comes "without a distro", and not "was built without the help of a distribution".

Re:Alpine Linux Docker images have NULL for root password by geezerjay on Thursday May 09, 2019 @03:46AM (#19866195)
> Binaries are binaries, whether you copied from a deb package or completely built from source code

No, they are not.

Debian packages are deployable packages, which are built around packages and services and conventions adopted and provided by the target distribution.

Re:Alpine Linux Docker images have NULL for root password by collinmanderson on Thursday May 09, 2019 @11:26AM (#19869112)
it should probably be called "package-manager-less" because there's no package manager in the final build, but there's also no ls, etc, so distroless kinda makes sense. Maybe systemless?
Re:Alpine Linux Docker images have NULL for root password by snarfy on Wednesday May 08, 2019 @03:26PM (#19862037)
For statically linked binaries, why wouldn't you use the SCRATCH (0 kb) 'image'?
Re:Alpine Linux Docker images have NULL for root password by alpb on Wednesday May 08, 2019 @03:36PM (#19862122)
You would. Except most statically linked binaries may still need ca-certificates, tzdata, and some other files that libraries expect it to be present on the system.

Not to mention, you still need runtimes if you are programming in Java, Python or many other languages. https://github.com/GoogleContainerTools/distroless project gives a way to have these runtimes + their lib dependencies while still maintaining a minimal attack surface.

Re:Alpine Linux Docker images have NULL for root password by yegle on Wednesday May 08, 2019 @03:36PM (#19862119)
For almost any serious job running in production, you might need CA certificates and openssl.
Re:Alpine Linux Docker images have NULL for root password by sofaofthedamned on Wednesday May 08, 2019 @03:50PM (#19862243)
Unless you're behind a load balancer which terminates TLS and the traffic you deal with is purely http.
Re:Alpine Linux Docker images have NULL for root password by mark242 on Wednesday May 08, 2019 @04:12PM (#19862431)
Please don't do this anymore. End-to-end encryption is extremely easy to set up and maintain. P2PE will absolutely lull you into a false sense of security.
Re:Alpine Linux Docker images have NULL for root password by res0nat0r on Wednesday May 08, 2019 @05:26PM (#19863136)
Everyone seems to think E2E encryption is needed everywhere (I know because the security guys at work think it is needed everywhere, even for everything inside a VPC), but even AWS here is advertising the fact that you don't need to do this:

https://aws.amazon.com/blogs/aws/new-tls-termination-for-net...

>Today we are simplifying the process of building secure web applications by giving you the ability to make use of TLS (Transport Layer Security) connections that terminate at a Network Load Balancer (you can think of TLS as providing the “S” in HTTPS). This will free your backend servers from the compute-intensive work of encrypting and decrypting all of your traffic, while also giving you a host of other features and benefits:

Re:Alpine Linux Docker images have NULL for root password by __jal on Wednesday May 08, 2019 @05:54PM (#19863369)
If you trust Amazon to know your risk profile better than your security people, you have a management problem of some sort.
Re:Alpine Linux Docker images have NULL for root password by res0nat0r on Wednesday May 08, 2019 @07:58PM (#19864118)
I trust myself who setup our infrastructure vs. the security guys who's automatic response to everything is deny all everywhere, encrypt everything everywhere (at rest encryption isn't enough, what can you do to get the db to work on the data encrypted internally 100% of the time?), and enable 2 factor on everything (the github gui has 2fa enabled, why aren't push/pull requests using 2fa?).

I think may main point is that kneejerk reactions to satisfy a security list checkbox are just as useless as a default "encrypt everything everywhere" stance must be better.

Re:Alpine Linux Docker images have NULL for root password by growse on Thursday May 09, 2019 @06:28AM (#19866883)
Sounds like you need better security people.
Re:Alpine Linux Docker images have NULL for root password by candu on Friday May 10, 2019 @07:51AM (#19876869)
...which, sadly, is true of many larger organizations: "security" ends up as just another middle management approval committee whose only job is to apply byzantine security checklists dreamed up by some Certified Security Architect (tm) way too late in the development process, right when it's hardest for product teams to reshuffle their entire architecture to comply, and with no consideration to the actual circumstances / risk profile of specific projects.

IMHO this should be viewed as a big, glaring anti-pattern, as it fundamentally puts security team goals at odds with product team goals.

Re:Alpine Linux Docker images have NULL for root password by res0nat0r on Thursday May 09, 2019 @11:39AM (#19869232)
Agreed.
Re:Alpine Linux Docker images have NULL for root password by __jal on Thursday May 09, 2019 @02:44PM (#19870964)
...Which sounds like a management problem.
Re:Alpine Linux Docker images have NULL for root password by res0nat0r on Thursday May 09, 2019 @05:32PM (#19872653)
Agreed.
Re:Alpine Linux Docker images have NULL for root password by disiplus on Wednesday May 08, 2019 @05:48PM (#19863304)
but without tls amazon can "decrypt" your traffic and see whats inside. its one thing to have a backdoor inside a server that they rent to you that would have to be actively exploited and another to passively clone the traffic and analyze it in the name of making the service better.
Re:Alpine Linux Docker images have NULL for root password by fao_ on Wednesday May 08, 2019 @09:26PM (#19864546)
If you believe that amazon are potentially an adversary, but you still want to host it on their servers, there is essentially nothing you can do to stop them getting at your data. At some point, to process the data, you have to do that unencrypted. That is an unpluggable achilles heel.
Re:Alpine Linux Docker images have NULL for root password by smolder on Wednesday May 08, 2019 @06:39PM (#19863621)
Why do they have to actively exploit hardware/vms that they own? Isn't it pretty trivial for a hypervisor to "passively clone" data right out of the memory of the VM? Or to use management interfaces/custom peripherals to exfiltrate data if it were bare metal? AWS is kind of a black box to me but it seems hopeless to try to protect data from people that physically control the systems.
Re:Alpine Linux Docker images have NULL for root password by disiplus on Thursday May 09, 2019 @03:21AM (#19866078)
i was especially talking about passively mirroring/analysing network traffic. afak there is no easy and trivial way to "passively clone" aka dump memory of the hypervisor all the time without it being detectable in slowdowns and so on. my concern was not that i need to protect myself from amazon for the fear that they will hack my server, but to the way that they can get insight into my customers, maybe get a snippet of the data i get and so on.

we once saw this from some other company where they noticed we where talking to the competitors and wanted to talk.

Re:Alpine Linux Docker images have NULL for root password by solatic on Wednesday May 08, 2019 @04:29PM (#19862590)
Last time I checked, mTLS incurred significant performance penalties and required significant soak testing to ensure that performance would be acceptable for a given application. If you're a small company, you have much lower hanging fruit to chase.
Re:Alpine Linux Docker images have NULL for root password by jacques_chester on Thursday May 09, 2019 @07:26AM (#19867166)
In my understanding there's additional overhead at handshake, but after that the performance is basically identical. The client certificate mostly acts to identify the client to the server, but otherwise the business of picking session keys etc is the same. At this point TLS overhead is close to free.

I think the start of this thread was a plea not to terminate HTTPS at the edge, but instead to plumb it all the way to the serving container. That's unlikely to be mTLS in any case.

Re:Alpine Linux Docker images have NULL for root password by crehn on Wednesday May 08, 2019 @09:26PM (#19864544)
What's an extremely easy solution to set up and maintain automated certificate signing and provisioning?
Re:Alpine Linux Docker images have NULL for root password by dserodio on Thursday May 09, 2019 @07:50AM (#19867315)
Re:Alpine Linux Docker images have NULL for root password by StreamBright on Wednesday May 08, 2019 @05:55PM (#19863375)
It does not matter how easy it is, what is the security threat you are mitigating with E2E encryption? In a large scale system it is often not trivial to build a proper E2E, far from being impossible though.
Re:Alpine Linux Docker images have NULL for root password by sofaofthedamned on Wednesday May 08, 2019 @04:13PM (#19862437)
Eh, don't teach my about the systems I run. I'd love to run TLS end to end but in this one? Nah, not worth it.
Re:Alpine Linux Docker images have NULL for root password by arcticbull on Wednesday May 08, 2019 @04:58PM (#19862856)
"Don't teach me about ..." -- aren't we all here to learn? Let's keep the tone civil and assume the best.
Re:Alpine Linux Docker images have NULL for root password by baq on Wednesday May 08, 2019 @04:33PM (#19862620)
I work at $CORP. I don't trust my enterprise IT department with unencrypted traffic for fear of falling victim to stupid traffic shaping or deep packet inspection intrusion prevention going haywire.
Re:Alpine Linux Docker images have NULL for root password by sofaofthedamned on Wednesday May 08, 2019 @04:45PM (#19862737)
Good for you. In my current gig the trade-off is different. I don't work for Google.
Re:Alpine Linux Docker images have NULL for root password by mschuster91 on Wednesday May 08, 2019 @04:34PM (#19862636)
> and the traffic you deal with is purely http.

Which is a truly rare case as many backend APIs these days are mandatory secured by HTTPS (or LDAPS, SMTPS, IMAPS to name a couple other openssl-based secure protocols).

Re:Alpine Linux Docker images have NULL for root password by briffle on Wednesday May 08, 2019 @04:09PM (#19862406)
sure, as long as you don't connect to ANY outside url's for anything
Re:Alpine Linux Docker images have NULL for root password by aflag on Wednesday May 08, 2019 @05:56PM (#19863394)
Which you probably shouldn't be doing for most of your services anyway.
Re:Alpine Linux Docker images have NULL for root password by icebraining on Wednesday May 08, 2019 @06:07PM (#19863453)
I don't remember the last project I did which didn't have some sort of integration with an external service. I guess if you use microservices, most components won't need it; I mostly use monoliths.
Re:Alpine Linux Docker images have NULL for root password by aflag on Thursday May 09, 2019 @01:43PM (#19870400)
I guess if everything is in a single service you're bound to have some sort of outbound connection at some point. Although, in my experience, you can go very far within your vpc.
Re:Alpine Linux Docker images have NULL for root password by Gladdyu on Wednesday May 08, 2019 @05:05PM (#19862933)
Re:Alpine Linux Docker images have NULL for root password by alanwreath on Wednesday May 08, 2019 @04:10PM (#19862416)
I wonder if this would be important with service mesh and mutual tls...
Re:Alpine Linux Docker images have NULL for root password by jacques_chester on Thursday May 09, 2019 @07:30AM (#19867189)
Service meshes make in-cluster mTLS a more-or-less automatic feature, which is worth having. Some will terminate TLS at ingress and convert to mTLS internally. The argument above is that you shouldn't do this and should instead plumb that ingressing TLS traffic all the way to the container.

The downside of plumbing directly to the container is that you lose many of the routing features of a service mesh. If it can't inspect the traffic, it can't do layer 7 routing. It can only route and shape at layer 4.

Re:Alpine Linux Docker images have NULL for root password by Thaxll on Thursday May 09, 2019 @09:38AM (#19868144)
This has nothing to do with being a LB, if you need to do outgoing calls with https you most likely need ca-certificates.
Re:Alpine Linux Docker images have NULL for root password by jupp0r on Wednesday May 08, 2019 @04:14PM (#19862445)
With static linking your binary would contain openssl.
Re:Alpine Linux Docker images have NULL for root password by matthewbauer on Wednesday May 08, 2019 @06:41PM (#19863633)
Not the certificates though, unless you do some special tricks. I think GP is probably thinking of kerberos/NSS, which has a plugin system that requires dynamic linking.
Re:Alpine Linux Docker images have NULL for root password by yegle on Wednesday May 08, 2019 @08:04PM (#19864152)
There are two basic flavors of distroless image, one is base, the other one is static.

The `static` image is very bare minimal and only contains things like nsswitch.conf and ca certificates. This is the recommended base image for statically linked languages.

There's also a `base` image that I usually use as the base image of C programs, e.g. stunnel/unbound DNS. In those cases, I usually use Debian Stretch as build environment (distroless uses binary from Debian stable, so ABI is compatible), build a dynamically linked binary, then copy the result binary along with all dynamic object files to a distroless base image.

So when I talk about openssl in the image, I was referring to the `base` flavor. If you are happy with the provided openssl version, the openssl in the base image is indeed useful.

Re:Alpine Linux Docker images have NULL for root password by dastx on Thursday May 09, 2019 @01:03AM (#19865549)
You can easily use multi stage docker files to copy the certs.
Re:Alpine Linux Docker images have NULL for root password by hssys on Wednesday May 08, 2019 @03:34PM (#19862099)
You might want at least a shell in the container for debugging?
Re:Alpine Linux Docker images have NULL for root password by ImJasonH on Wednesday May 08, 2019 @07:27PM (#19863948)
Distroless has debug images for this purpose: https://github.com/GoogleContainerTools/distroless/blob/mast...
Re:Alpine Linux Docker images have NULL for root password by souterrain on Wednesday May 08, 2019 @04:00PM (#19862325)
Adding a shell seems antithetical to deploying production code as a static-linked binary, not to mention an expansion of the attack surface of the container.
Re:Alpine Linux Docker images have NULL for root password by hibbelig on Wednesday May 08, 2019 @05:08PM (#19862958)
Without a shell, how does one debug if anything goes wrong?
Re:Alpine Linux Docker images have NULL for root password by hundt on Thursday May 09, 2019 @01:35PM (#19870307)
You can start a container with a shell that shares the PID and network namespaces of the container you want to debug.
Re:Alpine Linux Docker images have NULL for root password by antsar on Wednesday May 08, 2019 @05:27PM (#19863140)
Reading logs/traces on your log aggregation service and reproducing in a dev system?
Re:Alpine Linux Docker images have NULL for root password by jeremyjh on Wednesday May 08, 2019 @05:53PM (#19863357)
How do you debug in the dev env without a shell?
Re:Alpine Linux Docker images have NULL for root password by the8472 on Wednesday May 08, 2019 @05:56PM (#19863393)
from the host system, containers don't exist in a vacuum
Re:Alpine Linux Docker images have NULL for root password by y04nn on Wednesday May 08, 2019 @05:49PM (#19863314)
With remote debugging?
Re:Alpine Linux Docker images have NULL for root password by lstodd on Wednesday May 08, 2019 @06:10PM (#19863465)
remote debugging is a shell
Re:Alpine Linux Docker images have NULL for root password by the8472 on Wednesday May 08, 2019 @06:21PM (#19863529)
not necessarily. e.g. java runtimes can expose debugging ports when needed that operate on a custom protocol.

or you can just build gdb into the container and run the process under gdb, then attach to the tty.

or you can debug from the host system where the container's pid namespace is a descendant of the root namespace and the other namespaces can be accessed via /proc or unshare.

Re:Alpine Linux Docker images have NULL for root password by lstodd on Thursday May 09, 2019 @02:53PM (#19871062)
What I meant is having a remote debugger is as good as having a remote shell in terms of remote code execution.
Re:Alpine Linux Docker images have NULL for root password by discreteevent on Wednesday May 08, 2019 @05:59PM (#19863412)
Debugging is about when the difference between theory and practice breaks down.
Re:Alpine Linux Docker images have NULL for root password by ecnahc515 on Wednesday May 08, 2019 @06:52PM (#19863714)
You can use nsenter
Re:Alpine Linux Docker images have NULL for root password by sofaofthedamned on Wednesday May 08, 2019 @03:49PM (#19862233)
Depends. Normally I would do with golang apps. But if I need to debug an issue I'll redeploy them with Ubuntu underneath so I can use the debugging tools.
Re:Alpine Linux Docker images have NULL for root password by stephenr on Thursday May 09, 2019 @12:51AM (#19865495)
If your binary is static, why do you need a container at all?
Re:Alpine Linux Docker images have NULL for root password by jpwgarrison on Thursday May 09, 2019 @08:40AM (#19867725)
So you can justify using k8s and shine up your resume!
Re:Alpine Linux Docker images have NULL for root password by stephenr on Thursday May 09, 2019 @09:14AM (#19867951)
It’s the new 3x SQLServer + 2x IIS + 2x SharePoint cluster to serve an intranet for 100 staff when a single <insert oss wiki on linux> would be more than sufficient.
Re:Alpine Linux Docker images have NULL for root password by Jonanin on Wednesday May 08, 2019 @03:23PM (#19862016)
For Python I'd also highly recommend Clear Linux for raw performance. It's not quite as easy to get started as with something like Ubuntu though.
Re:Alpine Linux Docker images have NULL for root password by mixmastamyk on Wednesday May 08, 2019 @04:16PM (#19862461)
Checked it out, is Intel supported with compiler tweaks to get the most out of their CPUs, for libs like math, pandas, etc.
Re:Alpine Linux Docker images have NULL for root password by svacko on Thursday May 09, 2019 @02:12AM (#19865815)
Clear Linux is definitely an interesting project, however, using base image with 'latest' tag (only tag existing for https://hub.docker.com/r/clearlinux/python/tags) in the production is not a best strategy as the breaking changes can arrive anytime
Re:Alpine Linux Docker images have NULL for root password by pella on Wednesday May 08, 2019 @05:47PM (#19863297)
Re:Alpine Linux Docker images have NULL for root password by sprydevl on Wednesday May 08, 2019 @11:18PM (#19865073)
If you want small images, why not use a tool like https://github.com/docker-slim/docker-slim Then it doesn’t matter which distro you favor?
Re:Alpine Linux Docker images have NULL for root password by GordonS on Thursday May 09, 2019 @03:47AM (#19866196)
Wow, I've never heard of this before - I'm looking forward to seeing how much this shrinks my images!
Re:Alpine Linux Docker images have NULL for root password by onlydeadheroes on Thursday May 09, 2019 @07:22AM (#19867138)
Search for "awesome-docker" and make sure you have some free time. :)
Re:Alpine Linux Docker images have NULL for root password by nurettin on Wednesday May 08, 2019 @11:51PM (#19865219)
I don't quite get it. If you've somehow statically compiled all your dependencies, shouldn't that just run without a container?

Perhaps the point is not to enable program execution, but to make use of the benefits that may come with container orchestration.

Re:Alpine Linux Docker images have NULL for root password by spacenick88 on Thursday May 09, 2019 @05:28AM (#19866655)
Well at the very least running in a container gives you filesystem and network and PID space isolation, optionally also user namespace isolation.