Hello there and welcome to Just Answer. My name is XXXXX XXXXX I will be assisting you today. I am an engineer with over 30 years of electrical and electronic training, repair and installation experience. I will try and answer your question accurately and precisely so that we can get you on your way.
Unless I am understanding this wrong, what you are describing is normal practice. Just wire nut up the tails and put a cover plate on the box. This is no different to removing a light fixture and putting a cover on the outlet box.
The box must be accessible - obviously...to do the final connections but after that, it can't be hidden behind the cabinet. It must be accessible inside the cabinet.
Look sgood to me.
Thanks, XXXXX XXXXX helpful, and the analogy to removing the light fixture makes sense. One other item, while I'm pretty sure the driver can be hardwire, if it doesn't have screw terminals then it will be need to be plugged in. Is it legal to place a recepticle inside the cabinet?
Thanks again for your prompt response.
Yes, there is nothing wrong with fixing a plug to the end of your string of lights and plugging it in to a receptacle. And the receptacle can be inside the cabinet.
Think of Christmas Tree bulbs :)