“life-long” in Germany is 25 years, normally with the option for parole after 15. However there is “Sicherheitsverwahrung”, which doesn’t count as punishment but is instead justified with protecting the rest of the public from a certain person, and can be applied indefinitely.