Spring Boundary conditions

Hello everyone,
I am solving a problem where I want to impose spring-like boundary conditions on some surfaces.
Indeed, I would like to impose a spring-like boundary on the internal lateral surfaces of the parallelepiped section you see in the picture.
I’ve searched the internet but haven’t found any significant resources.
Has anyone done this before?
Can you direct me to some documentation?

Thank you in advance.
for fenics discorse