canonical / canonical/cloud-init

ssh_pwauth: false fails to disable challenge/response authentication

Open
#2,837 3 comments 0 reactions 0 assignees View on GitHub
bug launchpad
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

This bug was originally filed in Launchpad as [LP: #1675021](https://bugs.launchpad.net/cloud-init/+bug/1675021)

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = None
date_created = 2017-03-22T13:46:04.967839+00:00
date_fix_committed = None
date_fix_released = None
id = 1675021
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1675021
milestone = None
owner = fghaas
owner_name = Florian Haas
private = False
status = confirmed
submitter = fghaas
submitter_name = Florian Haas
tags = []
duplicates = []

_Launchpad user **Florian Haas(fghaas)** wrote on 2017-03-22T13:46:04.967839+00:00_

cc_set_passwords.py interprets the ssh_pwauth boolean configuration option, and depending on its setting will either enable, disable, or not touch the PasswordAuthentication option in sshd_config.

This neglects to also set ChallengeResponseAuthentication. It defaults to yes upstream, but many distributions, including Ubuntu, ship a default sshd_config that sets this to no. On a system with "ChallengeResponseAuthentication yes" however, "ssh_pwauth: false" has no real effect — and this poses a security problem for users of those systems, as they will most likely inadvertently leave password authentication enabled.

How to best address this is tricky. Obviously, "ssh_pwauth: false" should disable both PasswordAuthentication and ChallengeResponseAuthentication. What "ssh_pwauth: true" should do is debatable.

What complicates matters still is that one of the affected systems that ship with "ChallengeResponseAuthentication yes" is SLES, including the official JeOS OpenStack image, and SLES ships its own fork of cloud-init. So even if this does gets fixed in upstream cloud-init, someone still has to remind the SUSE folks to merge the patch (or update their default image).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.