EdhocServerEvent

sealed interface EdhocServerEvent(source)

Something an EdhocServer did to a handshake that is not complete yet, for metrics and diagnostics, like the CoAP endpoint's EndpointEvent. The events cover what the server refuses or drops to bound the state unauthenticated clients can make it keep (RFC 9528 §9.7); completed sessions go to EdhocSessionListener.

Inheritors

Types

Link copied to clipboard

A message_3, an error message or an EDHOC + OSCORE request from peer named the C_R responderId of a session that another peer started. The server takes it for forged (RFC 9528 §9.7): it answers as for an unknown C_R and runs no cryptography, and the session keeps waiting for the peer that sent message_1.

Link copied to clipboard

A message_1 from peer was refused before any processing, because limit sessions were already pending. It was answered with an EDHOC error in a 5.00 response (RFC 9528 Appendix A.2.3). For Limit.PENDING_SESSIONS, no pending session had waited for message_3 longer than EdhocServer(pendingSessionGracePeriod), so none was evicted for it (SessionEvicted).

Link copied to clipboard
class SessionEvicted(val peer: Endpoint, val responderId: ConnectionIdentifier) : EdhocServerEvent

All EdhocServer(maxPendingSessions) places were taken when a new message_1 came, and the session responderId of peer was the oldest waiting for message_3, for longer than EdhocServer(pendingSessionGracePeriod). It was dropped for the new session and its secrets wiped; a message_3 for it now gets the answer for an unknown C_R. Many of these events mean the server is flooded with message_1 (RFC 9528 §9.7) or the bound is too low.

Link copied to clipboard
class SessionExpired(val peer: Endpoint, val responderId: ConnectionIdentifier) : EdhocServerEvent

The session responderId waited for message_3 longer than EdhocServer(pendingSessionLifetime). It was dropped and its secrets wiped; a message_3 for it now gets the answer for an unknown C_R.

Properties

Link copied to clipboard
abstract val peer: Endpoint

The peer the event concerns.