I am using multiple Gitlab pipelines to run 4 PowerShell scripts on a Windows host on an hourly basis. These scripts differ in functionality but all require access to the Bitwarden vault, to read or update vault items. The issue comes in as some of these scripts run at the same time and the CLI only supports one active session on a host. So script A starts, logs into the vault, unlocks it and then runs a series of vault item updates. While that is happening script B starts and “steals” the CLI session from script A, causing said script to fail.
I would like to avoid to built a queuing logic in my pipelines just for CLI sessions. Is there a smart way to allow multiple, concurrent CLI sessions on the same host?
I was looking at running a service on the host with “bw serve”. However that would probably mean there is an unlocked vault at all times on the host, which is not ideal from a security point of view.
Thankful for any hints.