Ticket #844 (new enhancement)
Perforce authentication is misleading
|Reported by:||pcmantz||Owned by:|
From an email I wrote the other day:
In buildbot/buildbot/changes/p4poller.py, the class takes self.p4user self.p4passwd from the config file. This isn’t exactly what you want, since perforce actually has a certificate based system (called a ticket in perforce lingo). You use your username & password to obtain a certificate via p4 login, then your certificate & username are cached in environment variables, so you can do command-line operations without authenticating manually.
Code wise, it appears that p4poller.py is actually written so that the ticket is your password. The model there would be that you’d log in, throw your ticket in your master.cfg file, then rock and roll. This is fine and dandy for your average user, but not for us.
Our company policy dictates that all perforce tickets must expire after 12 hours. Our problem is that there’s no code in the poller to automate the updating of expired keys, so we would have to manually change the password (actually the ticket) every 12 hours. Buildbot does not poll the environment for the ticket; it collects the password, so it does not work for us.
In order to fix this, we’d need to update the authentication model in p4poller.py to have a preliminary login step. Instead of storing the ticket, the poller would need to call a couple perforce commands, retrieve and cache the ticket, and then use that for authentication.
- Type changed from undecided to enhancement
- Milestone changed from undecided to 0.8.1