I am following the web3 documentation and I found that its possible to sign a contract and do a transaction directly from web3.

I want to call an onlyOwner function in my contract directly from a web page. I am looking for best practices as to where to store the private key and how to go by interacting with the contract securely?

Probably not a good idea to do this. Can you create a proxy service that pushes transactions to the network?
– cleanunicornFeb 13 '18 at 18:11

The private key is usually stored in the web3 provider (most often MetaMask). So the owner just signs the transaction as they would any other. Does that answer the question or did I misunderstand?
– smarxFeb 13 '18 at 19:36