Skip to contentSkip to conversation

meta-phosphor: enable `allow-root-login`?

DISCUSSION Patrick Williams 3 participants 5 messages Dec 30, 2021 – Jan 4, 2022

lore
Share & tools
lore
#0 lore raw

Hello,

Looking for opinions, especially from security minded individuals...

In many of our local.conf.sample files we enable "debug-tweaks" but for production builds this is probably not a good idea. I had it turned off on a production build and ran into a case where we could not log in as root on SSH. We debugged this down to missing the 'priv-admin' group for root, which is typically enabled in phosphor-rootfs-postcommands.bbclass when either "debug-tweaks" or "allow-root-login" is enabled.

I am currently enabling this IMAGE_FEATURE in meta-facebook to avoid having this happen again. Is there any reason why we wouldn't want to enable it by default in meta-phosphor? There isn't really full support for non-root users in the base systems anyhow, so is there anyone that wouldn't want "allow-root-login" enabled by default?

I'm fine leaving this in meta-facebook, but I'm trying to prevent someone else from having the same issue for what seems like a default case presently.

1. https://github.com/openbmc/openbmc/blob/master/meta-phosphor/classes/phosphor-rootfs-postcommands.bbclass#L10

Signature · 1 line
Patrick Williams
#1 lore raw

Patrick....

On 12/30/21 05:52, Patrick Williams wrote:
<snip>

Quoted 6 lines

I am currently enabling this IMAGE_FEATURE in meta-facebook to avoid having this happen again. Is there any reason why we wouldn't want to enable it by default in meta-phosphor? There isn't really full support for non-root users in the base systems anyhow, so is there anyone that wouldn't want "allow-root-login" enabled by default?

Intel explicitly requires root login to be disabled for production releases. Especially since the default password is a known quantity.

The Intel security audit group enforced blocking a default user for the S2600 WF/BNP/STP series of servers. All user accounts are created using local IPMI commands.

Intel will prefer the existing behavior remain.

Quoted 6 lines

I'm fine leaving this in meta-facebook, but I'm trying to prevent someone else from having the same issue for what seems like a default case presently.

1. https://github.com/openbmc/openbmc/blob/master/meta-phosphor/classes/phosphor-rootfs-postcommands.bbclass#L10

Signature · 6 lines
Johnathan Mantey
Senior Software Engineer
*azad te**chnology partners*
Contributing to Technology Innovation since 1992
Phone: (503) 712-6764
Email: [email protected] <mailto:[email protected]>
#2 lore raw
Quoted 10 lines · Johnathan Mantey

Patrick....

Quoted 5 lines · Patrick Williams

I am currently enabling this IMAGE_FEATURE in meta-facebook to avoid having this happen again. Is there any reason why we wouldn't want to enable it by default in meta-phosphor? There isn't really full support for non-root users in the base systems anyhow, so is there anyone that wouldn't want "allow-root-login" enabled by default?

Quoted 6 lines

Intel explicitly requires root login to be disabled for production releases. Especially since the default password is a known quantity.

The Intel security audit group enforced blocking a default user for the S2600 WF/BNP/STP series of servers. All user accounts are created using local IPMI commands.

Is this currently able to be done with all upstream functionality or something that only works in your own forks?

Quoted 1 line

Intel will prefer the existing behavior remain.

It seems to me that the current behavior is broken for typical cases using currently upstreamed functionality and so that's why I'm suggesting that meta-phosphor be "fixed". It'd be pretty easy to IMAGE_FEATURE:remove this for meta-intel-bmc, right?

Signature · 1 line
Patrick Williams
#4 lore raw
In reply to Patrick Williams
Quoted 12 lines · Patrick Williams

Hello,

Looking for opinions, especially from security minded individuals...

In many of our local.conf.sample files we enable "debug-tweaks" but for production builds this is probably not a good idea. I had it turned off on a production build and ran into a case where we could not log in as root on SSH. We debugged this down to missing the 'priv-admin' group for root, which is typically enabled in phosphor-rootfs-postcommands.bbclass when either "debug-tweaks" or "allow-root-login" is enabled.

Quoted 5 lines

I am currently enabling this IMAGE_FEATURE in meta-facebook to avoid having this happen again. Is there any reason why we wouldn't want to enable it by default in meta-phosphor? There isn't really full support for non-root users in the base systems anyhow, so is there anyone that wouldn't want "allow-root-login" enabled by default?

Doesn't this directly violate the principle of least privilege? I wouldn't expect root to be usable to outside users, given that it gives significantly more permissions than any outside user should have access to. My understanding was that priv-admin was supposed to be the privilege level for "all permissions for things that an external user should be able to do". Is that not working for your use case? It'd be interesting to understand what permissions priv-admin is missing. I don't really think giving out root to external users is a good idea in general.

Quoted 8 lines

I'm fine leaving this in meta-facebook, but I'm trying to prevent someone else from having the same issue for what seems like a default case presently.

1. https://github.com/openbmc/openbmc/blob/master/meta-phosphor/classes/phosphor-rootfs-postcommands.bbclass#L10

--
Patrick Williams

#3 lore raw
In reply to Patrick Williams
Quoted 9 lines · Patrick Williams
Quoted 8 lines · Johnathan Mantey

Patrick....

Quoted 5 lines · Patrick Williams

I am currently enabling this IMAGE_FEATURE in meta-facebook to avoid having this happen again. Is there any reason why we wouldn't want to enable it by default in meta-phosphor? There isn't really full support for non-root users in the base systems anyhow, so is there anyone that wouldn't want "allow-root-login" enabled by default?

Quoted 8 lines
Quoted 6 lines

Intel explicitly requires root login to be disabled for production releases. Especially since the default password is a known quantity.

The Intel security audit group enforced blocking a default user for the S2600 WF/BNP/STP series of servers. All user accounts are created using local IPMI commands.

Is this currently able to be done with all upstream functionality or something that only works in your own forks?

As a developer for Intel I have to explicitly add 'debug-tweaks' back into our bitbake config. I've not dug into who made the decision, and which layer of the build process enforced it.

Quoted 7 lines
Quoted 2 lines

Intel will prefer the existing behavior remain.

It seems to me that the current behavior is broken for typical cases using currently upstreamed functionality and so that's why I'm suggesting that meta-phosphor be "fixed". It'd be pretty easy to IMAGE_FEATURE:remove this for meta-intel-bmc, right?

Signature · 6 lines
Johnathan Mantey
Senior Software Engineer
*azad te**chnology partners*
Contributing to Technology Innovation since 1992
Phone: (503) 712-6764
Email: [email protected]