Jump to content


Apache authentication using Perforce

apache authentication perforce

  • Please log in to reply
4 replies to this topic

#1 rthur

rthur

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 08 February 2014 - 12:28 AM

Hi everyone,

We've decided to integrate redmine with perforce for the additional features compared to the basic Perforce jobs. Idealy we'd like to avoid having seperate accounts and passwords for both services.

Redmine has an easy way to integrate authentication with other services (link), but I can't seem to find out how to actually use perforce to test a username / password combination without just running p4 login commands in a shell.

Is there an API for user managment?

Cheers,

Arthur

#2 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 08 February 2014 - 01:16 AM

I wrote something to do Apache authentication via Perforce using mod_authnz_external, but it just runs login in the shell. Here's a link:

https://swarm.worksh...ripts/p4auth.sh

There are a number of Perforce APIs, but in all cases though it will boil down to running 'p4 login -p'. We don't have a separate authentication API or a way to pretend to be an LDAP server.

#3 rthur

rthur

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 08 February 2014 - 01:22 AM

Brilliant! Thanks a lot for that - looks nice and simple. I had been looking at the MediaWiki plugin and could not for the life of me figure out how it's supposed to work.

Cheers,

Arthur

#4 rthur

rthur

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 08 February 2014 - 01:28 AM

Assuming I use
 p4 user -o $user 
to get the email and name of a user, what kind of permissions do I need to give the user that will run these commands?

Cheers,

Arthur

#5 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 08 February 2014 - 06:11 AM

List access should do the trick.





Also tagged with one or more of these keywords: apache, authentication, perforce

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users