Is your feature request related to a problem? Please describe.
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
I want this to be VERY clear, this is not from an experience of being hacked (well, yet anyway, knock on wood). This is completely theoretical based on my experience creating a webapp that interacts with bitcoind via RPC calls and thus it got me to thinking about how the hotwallet could be hacked, how to prevent it, etc.
Unlocking the wallet for X amount of time is a MASSIVE security flaw imo. Let's say you have 10 'withdraw' processes running and they all have to 'unlock' the wallet to processes their sends. Thats fine if they finish quickly (this isnt always the case btw). But what if you have 100s or 1000s or something just causes it to go slowly and you have to increase the unlock period for some reason? Then what you've got is a wallet that is essentially in an "unlocked" stated almost constantly. This is a really bad idea. It would be better to ask for the pw on specific functions instead of a global scope.
Use case: Server 1: Apache webserver, maybe has other services on it like mysql, ssh, etc, something that's vulnerable to be hacked Server 2: Hotwallet server, has absolutely nothing on it other than bitcoind in RPC mode, it's buttoned down as much as possible short of actually unplugging it from the router.
Server 1 has RPC creds on it so that some application (like a web app) can interact with a BTC wallet. It does NOT have the BTC wallet encryption pw on it however. So it's only means of sending out BTC or creating transactions is when Server 2 checks a queue that resides on server 1......... Months go by and one day the machine is HACKED. The hacker then monitors the server and notices that they can make RPC calls to the wallet (oh crap). But the wallet is encrypted so we're good right?! HA. WRONG. They have access to the queue which seems to take a long time to empty. Then they notice that the wallet is being unlocked consistently to empty the queue...... It this point it's game over for mr wallet.
Server 2 Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->
I'd like to see at minimum sendtoaddress, sendmany, sendrawtransaction, send, and createrawtransaction refuse to function if a pw on an encrypted wallet is detected. Essentially anything that isnt a Read (except for something like dumping keys, obviously that should be as well).
Describe alternatives you've considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
There are alternatives but I'm not interested in ANY of them as they are overly convoluted, difficult to setup, and just not a good user experience as a developer at all, all the while solving no security problems at all, at some point on some device (whether connected to other devices or not) that unlock period is going to come into play and when it does, this vulnerability rears it's head. I realize I can setup a 'read only' wallet (and I have), but had bitcoind not had this issue, I would not have had to do this for my purposes. I can see other use cases involving cell phones as well.
Additional context
<!-- Add any other context or screenshots about the feature request here. -->