archive mirror
 help / color / mirror / Atom feed
* Add SSH session idle timeouts
@ 2021-08-09 15:02 Joseph Reynolds
  2021-08-09 23:34 ` Andrew Jeffery
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Reynolds @ 2021-08-09 15:02 UTC (permalink / raw)
  To: openbmc

OpenBMC community,

This is a proposal to add idle timeouts to SSH command shell sessions 
and host console sessions (ssh port 2200).  BMCWeb has login session 
idle timeouts per Redfish SessionService property SessionTimeout 
(hard-coded at 60 minutes), and I want similar timeouts for SSH sessions.

In this email, I am looking for discussion toward which interfaces 
should have a timeout, and a technical direction how to implement that 
timeout.  Details are below.




Which interfaces are affected?

As far as I know, the BMC currently has session idle timeouts for:
- HTTPS interface to the BMC's Web server - created via port 443
     Redfish SessionService at /redfish/v1/SessionService property 
- IPMI SOL interface to the BMC's host console - created via IPMI "sol 
activate" command

I want default timeouts for:
- Serial interface to the BMC's console - physical port
- SSH connections to the BMC's command shell - created via ssh port 22
- SSH connections to the BMC's host console - created via ssh port 2200

Help wanted with the following connections (should these have idle 
- KVM-IP connections - created via REST API invocation
- USB-IP connections - created via REST API invocation
- Virtual Media - created via REST API invocation

I believe the following connections are sessionless or are covered by 
their own protocol:
- Session-less HTTPS invocations.
- Most IPMI commands, which are session-less.
- TFTP connections, which are covered by their own protocol.
- Subscriptions such as SNMP, which do not expire.
- mDNS, which is session-less.
- SLP, which is session-less.

The interfaces above were scraped from the [OpenBMC interface-overview][]
[OpenBMC interface-overview]:

Note the Yocto project declined to set a default for SSH session idle 
timeout, and instead intends to document security configuration items 
(including session idle timeouts).  See [Yocto email archive][].
[Yocto email archive]:


I want the BMC to be able to comply with NIST requirements and OWASP 

[NIST SP800-63B][] requires a timeout of 30 minutes for "assurance level 
2" (high confidence that the authentication is still valid), or 15 
minutes for "assurance level 2" (very high confidence). [NIST 
[OWASP session expiration][] suggests idle timeouts of 15-30 minutes. 
[OWASP session expiration]: 
The OpenBMC security working group generally agreed to establish these 
timeouts.  See the 2021-08-04 meeting of the OpenBMC Security Working Group.

Which layer should implement the timeout?

Idle session timeouts can technically be implemented one one of three 
1. In the communication layer, for example, the SSH client session can 
2. In the application.  For example, the Bash shell TMOUT variable.
3. In a layer between the interface and the application.  For example, 
the "screen" application can provide a timeout function.

For example, suppose you want your host console sessions (ssh -p 2200) 
to time out and close the session.  OpenSSH does not offer an session 
idle timeout, and [obmc-console][] does not offer a timeout, so how can 
we provide this function?  One idea is to have the SSH server for port 
2200 connect to an application like "screen", set its TMOUT variable, 
and connect that to the console socket.  Or can we add timeout support 
directly to obmc-console?
[obmc console]:


This proposal is specifically for "session idle timeouts"; it does not 
include other kinds of timeouts such as timeouts in protocols to 
establish new connections.

NIST SP800-63B has additional guidelines such as periodic 
re-authentication (for example, re-enter password every 12 hours). I am 
not pursuing these at this time.

The Redfish spec has an API to configure Redfish session timeouts, but 
no property to configure other kinds of sessions.  I asked if this can 
be added in the public Redfish forum.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-09 23:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 15:02 Add SSH session idle timeouts Joseph Reynolds
2021-08-09 23:34 ` Andrew Jeffery

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).