Reputation: 1596
I started to create a Perforce wrapper for the Origen revision control module. I don't see anything about how username and passwords are handled. I know there is an existing User solution which can take care of passing in the username but what about the password?
thx
Upvotes: 1
Views: 16
Reputation: 3501
There is currently no support for securely asking the user for their password and then storing it locally within Origen, though I would like to see this added in future.
We currently use our own in-house solution, which just boils down to extending the User
class from Origen to add a password
method.
We typically reference this when making calls to some 3rd party API services, e.g. my_service.lookup(:blah, user: User.current.id, password: User.current.password)
If the password is not present, then it will prompt the user to enter it on the command line and it will then store it locally for next time so that the user does not have to continually enter it. We encrypt the password (really just to avoid storing it in plain text, it could be de-crypted by anyone who has the responsible Origen source code to see the algorithm) and then store it in the user's home directory. The file is then made read only by the user which is the real protection from access by a 3rd party.
As I was writing this, I just remembered that we already have an open ticket for this, but no progress on it yet: https://github.com/Origen-SDK/origen/issues/97
Upvotes: 1