SlideShare une entreprise Scribd logo
1  sur  54
# 
Sven Erik Knop 
Technical Marketing Manager 
Nick Poole 
Software Engineer
#
# 
• User authentication in Perforce – a brief overview 
• What is LDAP? 
• Integrating LDAP with Perforce
#
# 
• Users are created automatically when connecting 
• security = 0 
– Passwords are not enforced (but can be set) 
– Any password is acceptable 
– Passwords can be stored in clear in the client 
• No protection table – everyone has super rights
# 
• Create a protection table 
• Set dm.user.noautocreate 
– 1 : need to run p4 user explicitly 
– 2 : need to have superuser access 
• Set security 
– 1 : Need strong password (8 mixed chars minimum) 
– 2 : Enforce strong password 
– 3 : Need to run p4 login to create ticket
# 
• Represents a session to Perforce 
– Typically time-limited (12 hours default) 
• Created by p4 login 
– Stored locally in P4TICKETS file 
– p4 tickets lists all available tickets 
Port User Ticket 
localhost:20101 p4admin F84DB47C7C7206C1120EB9F5021F83E9
# 
• Goals 
– Single password storage and rules 
– Simplifies monitoring and revoking of access 
• Authentication triggers 
– auth_check to verify a password 
– auth_set to set a password
# 
Auth 
p4 login 
user-login 
client-Prompt 
Enter Password: 
<password> dm-login 
auth-check 
<accepted> 
client-SetPassword 
User logged in.
#
# 
• Lightweight Directory Access Protocol 
– Alternative to DAP for X.500 directory service 
• Supported by different directory services, e.g. 
– Active Directory (AD, Microsoft™) 
– OpenLDAP 
bind authenticate user against password 
search find entries in the directory
# 
• A directory is a map { key  value } 
• A directory service is a database serving that map 
– Telephone directory 
– DNS (domain name service) 
– User account management (password, permissions)
#
# 
• With username, either 
– Construct DN 
– Search to find the unique identifier 
• Bind against provided password 
Field Name Description 
dn Distinguished Name Unique identifier 
dc Domain Component For example, DC=www,DC=perforce,DC=com 
ou Organizational Unit For example, a user group 
cn Common Name Person’s name, job title etc.
# 
• auth_check trigger works well, but ... 
– Needs to be installed separately 
– No standard (Python, Perl, C++ implementations) 
– One more headache for administrators 
• Most common request on P4Ideax: 
– Perforce should provide built-in LDAP integration 
• Now available in P4D 2014.2
#
# 
• The new LDAP integration is an alternative to the 
auth_check trigger 
– When enabled, any auth_* triggers are disabled 
• Configuration uses: 
– p4 ldap 
– p4 ldaps 
– p4 configure
# 
• Configuration provided to the Perforce Server as a 
spec using the new command: 
– p4 ldap 
• The fundamental parameters: 
– Hostname 
– Port number 
– Encryption method
# 
• The way that the user will be identified in the 
directory before we can authenticate needs to be 
configured. 
• 3 bind methods supported: 
– Simple 
– Search 
– SASL
#
# 
• This method takes a DN with a %user% 
placeholder 
– cn=%user%,ou=Users,dc=p4,dc=com 
– cn=npoole,ou=Users,dc=p4,dc=com 
• Only suitable for the simplest directory layouts.
#
# 
• This method takes an LDAP query with a %user% 
placeholder and expands it. 
– (&(objectClass=user)(sAMAccountName=%user%)) 
• A known read-only user is used to perform the 
search to discover the user’s DN. 
– Only one result must be returned by the query.
#
# 
• This method doesn’t normally require any 
configuration. 
– All that is required is a username and a password. 
– LDAP server is responsible for finding the user from the 
username. 
• Active Directory supports this out of the box. 
– Not all LDAP servers support this. 
– Uses the DIGEST-MD5 SASL mechanism.
• Optional feature for restricting Perforce access to 
only users in the LDAP who use Perforce. 
• Ensures that the user belongs to one or more 
named groups in the LDAP. 
• This is defined by a LDAP group search. 
– (&(objectClass=posixGroup)(cn=development)(memberUid=%user%)) 
#
# 
• The new p4 ldap and p4 ldaps commands 
both have -t <username> options. 
– This allows an LDAP configuration to be tested before it 
is enabled. 
• Authentication failures are reported with more 
detailed messages than a user would see running 
p4 login.
# 
• Use p4 configure to set the ordered list of 
LDAP configurations: 
– p4 configure set auth.ldap.order.1=MasterAD 
• This supports: 
– Fragmented user directories (directory server per-office). 
– Replicated user directories (for failover).
# 
• Users must be configured to use LDAP. 
– Many background (non-human) Perforce users are not 
stored in LDAP. 
– A new AuthMethod field on the user spec switches 
users between authenticating against the Perforce 
database and LDAP.
# 
• The default user AuthMethod can be changed to 
ldap. 
• This enables automatic user creation for any user 
who can authenticate using p4 login. 
• This works best with the group based authorization.
#
# 
Sven Erik Knop 
sknop@perforce.com 
Nick Poole 
npoole@perforce.com 
@P4Nick
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
# 
OpenLDAP ActiveDirectory
# 
OpenLDAP ActiveDirectory
# 
• Set the configurables 
– auth.ldap.order.1=openldap-search 
– auth.ldap.order.2=ad-search 
• Run p4 ldaps -t sbaker 
Testing authentication against LDAP configuration openldap-search. 
User not found by LDAP search 
"(&(objectClass=inetOrgPerson)(cn=sbaker))" starting at 
ou=employees,dc=p4,dc=com 
Testing authentication against LDAP configuration ad-search. 
Authentication successful.

Contenu connexe

En vedette

Nis Vs Ldap
Nis Vs LdapNis Vs Ldap
Nis Vs Ldap
Juan Bau
 
Ldap Synchronization Connector @ 2011.RMLL
Ldap Synchronization Connector @ 2011.RMLLLdap Synchronization Connector @ 2011.RMLL
Ldap Synchronization Connector @ 2011.RMLL
sbahloul
 
Manage password policy in OpenLDAP
Manage password policy in OpenLDAPManage password policy in OpenLDAP
Manage password policy in OpenLDAP
LDAPCon
 
OpenLDAP configuration brought to Apache Directory Studio
OpenLDAP configuration brought to Apache Directory StudioOpenLDAP configuration brought to Apache Directory Studio
OpenLDAP configuration brought to Apache Directory Studio
LDAPCon
 
Installing & Configuring OpenLDAP (Hands On Lab)
Installing & Configuring OpenLDAP (Hands On Lab)Installing & Configuring OpenLDAP (Hands On Lab)
Installing & Configuring OpenLDAP (Hands On Lab)
Michael Lamont
 
What's New in OpenLDAP
What's New in OpenLDAPWhat's New in OpenLDAP
What's New in OpenLDAP
LDAPCon
 
Synchronize OpenLDAP with Active Directory with LSC project
Synchronize OpenLDAP with Active Directory with LSC projectSynchronize OpenLDAP with Active Directory with LSC project
Synchronize OpenLDAP with Active Directory with LSC project
Clément OUDOT
 
Synchronize AD and OpenLDAP with LSC
Synchronize AD and OpenLDAP with LSCSynchronize AD and OpenLDAP with LSC
Synchronize AD and OpenLDAP with LSC
LDAPCon
 
Ldap system administration
Ldap system administrationLdap system administration
Ldap system administration
Ali Abdo
 

En vedette (20)

AD & LDAP
AD & LDAPAD & LDAP
AD & LDAP
 
Open LDAP vs. Active Directory
Open LDAP vs. Active DirectoryOpen LDAP vs. Active Directory
Open LDAP vs. Active Directory
 
WIN-ADCS-10
WIN-ADCS-10WIN-ADCS-10
WIN-ADCS-10
 
LDAP and Active Directory Authentication in Plone
LDAP and Active Directory Authentication in PloneLDAP and Active Directory Authentication in Plone
LDAP and Active Directory Authentication in Plone
 
Nis Vs Ldap
Nis Vs LdapNis Vs Ldap
Nis Vs Ldap
 
IAO’s importance on sound student services in educational institutions
IAO’s importance on sound student services in educational institutionsIAO’s importance on sound student services in educational institutions
IAO’s importance on sound student services in educational institutions
 
Ldap Synchronization Connector @ 2011.RMLL
Ldap Synchronization Connector @ 2011.RMLLLdap Synchronization Connector @ 2011.RMLL
Ldap Synchronization Connector @ 2011.RMLL
 
Manage password policy in OpenLDAP
Manage password policy in OpenLDAPManage password policy in OpenLDAP
Manage password policy in OpenLDAP
 
LSC - Synchronizing identities @ Loadays 2010
 LSC - Synchronizing identities @ Loadays 2010 LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010
 
OpenLDAP configuration brought to Apache Directory Studio
OpenLDAP configuration brought to Apache Directory StudioOpenLDAP configuration brought to Apache Directory Studio
OpenLDAP configuration brought to Apache Directory Studio
 
Installing & Configuring OpenLDAP (Hands On Lab)
Installing & Configuring OpenLDAP (Hands On Lab)Installing & Configuring OpenLDAP (Hands On Lab)
Installing & Configuring OpenLDAP (Hands On Lab)
 
What's New in OpenLDAP
What's New in OpenLDAPWhat's New in OpenLDAP
What's New in OpenLDAP
 
RMLL 2013 - Synchronize OpenLDAP and Active Directory with LSC
RMLL 2013 - Synchronize OpenLDAP and Active Directory with LSCRMLL 2013 - Synchronize OpenLDAP and Active Directory with LSC
RMLL 2013 - Synchronize OpenLDAP and Active Directory with LSC
 
Synchronize OpenLDAP with Active Directory with LSC project
Synchronize OpenLDAP with Active Directory with LSC projectSynchronize OpenLDAP with Active Directory with LSC project
Synchronize OpenLDAP with Active Directory with LSC project
 
Rhel6
Rhel6Rhel6
Rhel6
 
Synchronize AD and OpenLDAP with LSC
Synchronize AD and OpenLDAP with LSCSynchronize AD and OpenLDAP with LSC
Synchronize AD and OpenLDAP with LSC
 
RMLL 2014 - OpenLDAP - Manage password policy
RMLL 2014 - OpenLDAP - Manage password policyRMLL 2014 - OpenLDAP - Manage password policy
RMLL 2014 - OpenLDAP - Manage password policy
 
Implementing a Secure and Effective PKI on Windows Server 2012 R2
Implementing a Secure and Effective PKI on Windows Server 2012 R2Implementing a Secure and Effective PKI on Windows Server 2012 R2
Implementing a Secure and Effective PKI on Windows Server 2012 R2
 
System Engineer: OpenLDAP and Samba Server
System Engineer: OpenLDAP and Samba ServerSystem Engineer: OpenLDAP and Samba Server
System Engineer: OpenLDAP and Samba Server
 
Ldap system administration
Ldap system administrationLdap system administration
Ldap system administration
 

Similaire à Active Directory & LDAP Authentication Without Triggers

Ldap 121020013604-phpapp01
Ldap 121020013604-phpapp01Ldap 121020013604-phpapp01
Ldap 121020013604-phpapp01
SANE Ibrahima
 
Install ldap server
Install ldap serverInstall ldap server
Install ldap server
Mawardi 12
 
Install ldap server
Install ldap serverInstall ldap server
Install ldap server
Mawardi 12
 

Similaire à Active Directory & LDAP Authentication Without Triggers (20)

Modern Deployment Strategies
Modern Deployment StrategiesModern Deployment Strategies
Modern Deployment Strategies
 
Ldap 121020013604-phpapp01
Ldap 121020013604-phpapp01Ldap 121020013604-phpapp01
Ldap 121020013604-phpapp01
 
Ldap introduction (eng)
Ldap introduction (eng)Ldap introduction (eng)
Ldap introduction (eng)
 
Install ldap server
Install ldap serverInstall ldap server
Install ldap server
 
Install ldap server
Install ldap serverInstall ldap server
Install ldap server
 
introduction to ldap
introduction to ldapintroduction to ldap
introduction to ldap
 
LDAP Applied (EuroOSCON 2005)
LDAP Applied (EuroOSCON 2005)LDAP Applied (EuroOSCON 2005)
LDAP Applied (EuroOSCON 2005)
 
LDAP Integration
LDAP IntegrationLDAP Integration
LDAP Integration
 
LDAP(In_Linux).pptx
LDAP(In_Linux).pptxLDAP(In_Linux).pptx
LDAP(In_Linux).pptx
 
Directory services by SAJID
Directory services by SAJIDDirectory services by SAJID
Directory services by SAJID
 
Mastering Your Universe with P4 Search
Mastering Your Universe with P4 SearchMastering Your Universe with P4 Search
Mastering Your Universe with P4 Search
 
Big Data Warehousing Meetup: Securing the Hadoop Ecosystem by Cloudera
Big Data Warehousing Meetup: Securing the Hadoop Ecosystem by ClouderaBig Data Warehousing Meetup: Securing the Hadoop Ecosystem by Cloudera
Big Data Warehousing Meetup: Securing the Hadoop Ecosystem by Cloudera
 
REDIS327
REDIS327REDIS327
REDIS327
 
Top ten-list
Top ten-listTop ten-list
Top ten-list
 
Demystifying SharePoint Infrastructure – for NON-IT People
 Demystifying SharePoint Infrastructure – for NON-IT People  Demystifying SharePoint Infrastructure – for NON-IT People
Demystifying SharePoint Infrastructure – for NON-IT People
 
Best And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsBest And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM Connections
 
Open Source Logging and Metrics Tools
Open Source Logging and Metrics ToolsOpen Source Logging and Metrics Tools
Open Source Logging and Metrics Tools
 
Open Source Logging and Monitoring Tools
Open Source Logging and Monitoring ToolsOpen Source Logging and Monitoring Tools
Open Source Logging and Monitoring Tools
 
RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018
RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018
RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018
 
Plone pas.plugins.ldap user/group search
Plone pas.plugins.ldap user/group searchPlone pas.plugins.ldap user/group search
Plone pas.plugins.ldap user/group search
 

Plus de Perforce

Plus de Perforce (20)

How to Organize Game Developers With Different Planning Needs
How to Organize Game Developers With Different Planning NeedsHow to Organize Game Developers With Different Planning Needs
How to Organize Game Developers With Different Planning Needs
 
Regulatory Traceability: How to Maintain Compliance, Quality, and Cost Effic...
Regulatory Traceability:  How to Maintain Compliance, Quality, and Cost Effic...Regulatory Traceability:  How to Maintain Compliance, Quality, and Cost Effic...
Regulatory Traceability: How to Maintain Compliance, Quality, and Cost Effic...
 
Efficient Security Development and Testing Using Dynamic and Static Code Anal...
Efficient Security Development and Testing Using Dynamic and Static Code Anal...Efficient Security Development and Testing Using Dynamic and Static Code Anal...
Efficient Security Development and Testing Using Dynamic and Static Code Anal...
 
Understanding Compliant Workflow Enforcement SOPs
Understanding Compliant Workflow Enforcement SOPsUnderstanding Compliant Workflow Enforcement SOPs
Understanding Compliant Workflow Enforcement SOPs
 
Branching Out: How To Automate Your Development Process
Branching Out: How To Automate Your Development ProcessBranching Out: How To Automate Your Development Process
Branching Out: How To Automate Your Development Process
 
How to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOpsHow to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOps
 
How to Spark Joy In Your Product Backlog
How to Spark Joy In Your Product Backlog How to Spark Joy In Your Product Backlog
How to Spark Joy In Your Product Backlog
 
Going Remote: Build Up Your Game Dev Team
Going Remote: Build Up Your Game Dev Team Going Remote: Build Up Your Game Dev Team
Going Remote: Build Up Your Game Dev Team
 
Shift to Remote: How to Manage Your New Workflow
Shift to Remote: How to Manage Your New WorkflowShift to Remote: How to Manage Your New Workflow
Shift to Remote: How to Manage Your New Workflow
 
Hybrid Development Methodology in a Regulated World
Hybrid Development Methodology in a Regulated WorldHybrid Development Methodology in a Regulated World
Hybrid Development Methodology in a Regulated World
 
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the EnterpriseBetter, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
 
Easier Requirements Management Using Diagrams In Helix ALM
Easier Requirements Management Using Diagrams In Helix ALMEasier Requirements Management Using Diagrams In Helix ALM
Easier Requirements Management Using Diagrams In Helix ALM
 
How To Master Your Mega Backlog
How To Master Your Mega Backlog How To Master Your Mega Backlog
How To Master Your Mega Backlog
 
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
 
How to Scale With Helix Core and Microsoft Azure
How to Scale With Helix Core and Microsoft Azure How to Scale With Helix Core and Microsoft Azure
How to Scale With Helix Core and Microsoft Azure
 
Achieving Software Safety, Security, and Reliability Part 2
Achieving Software Safety, Security, and Reliability Part 2Achieving Software Safety, Security, and Reliability Part 2
Achieving Software Safety, Security, and Reliability Part 2
 
Should You Break Up With Your Monolith?
Should You Break Up With Your Monolith?Should You Break Up With Your Monolith?
Should You Break Up With Your Monolith?
 
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
 
What's New in Helix ALM 2019.4
What's New in Helix ALM 2019.4What's New in Helix ALM 2019.4
What's New in Helix ALM 2019.4
 
Free Yourself From the MS Office Prison
Free Yourself From the MS Office Prison Free Yourself From the MS Office Prison
Free Yourself From the MS Office Prison
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Active Directory & LDAP Authentication Without Triggers

  • 1. # Sven Erik Knop Technical Marketing Manager Nick Poole Software Engineer
  • 2. #
  • 3. # • User authentication in Perforce – a brief overview • What is LDAP? • Integrating LDAP with Perforce
  • 4. #
  • 5. # • Users are created automatically when connecting • security = 0 – Passwords are not enforced (but can be set) – Any password is acceptable – Passwords can be stored in clear in the client • No protection table – everyone has super rights
  • 6. # • Create a protection table • Set dm.user.noautocreate – 1 : need to run p4 user explicitly – 2 : need to have superuser access • Set security – 1 : Need strong password (8 mixed chars minimum) – 2 : Enforce strong password – 3 : Need to run p4 login to create ticket
  • 7. # • Represents a session to Perforce – Typically time-limited (12 hours default) • Created by p4 login – Stored locally in P4TICKETS file – p4 tickets lists all available tickets Port User Ticket localhost:20101 p4admin F84DB47C7C7206C1120EB9F5021F83E9
  • 8. # • Goals – Single password storage and rules – Simplifies monitoring and revoking of access • Authentication triggers – auth_check to verify a password – auth_set to set a password
  • 9. # Auth p4 login user-login client-Prompt Enter Password: <password> dm-login auth-check <accepted> client-SetPassword User logged in.
  • 10. #
  • 11. # • Lightweight Directory Access Protocol – Alternative to DAP for X.500 directory service • Supported by different directory services, e.g. – Active Directory (AD, Microsoft™) – OpenLDAP bind authenticate user against password search find entries in the directory
  • 12. # • A directory is a map { key  value } • A directory service is a database serving that map – Telephone directory – DNS (domain name service) – User account management (password, permissions)
  • 13. #
  • 14. # • With username, either – Construct DN – Search to find the unique identifier • Bind against provided password Field Name Description dn Distinguished Name Unique identifier dc Domain Component For example, DC=www,DC=perforce,DC=com ou Organizational Unit For example, a user group cn Common Name Person’s name, job title etc.
  • 15. # • auth_check trigger works well, but ... – Needs to be installed separately – No standard (Python, Perl, C++ implementations) – One more headache for administrators • Most common request on P4Ideax: – Perforce should provide built-in LDAP integration • Now available in P4D 2014.2
  • 16. #
  • 17. # • The new LDAP integration is an alternative to the auth_check trigger – When enabled, any auth_* triggers are disabled • Configuration uses: – p4 ldap – p4 ldaps – p4 configure
  • 18. # • Configuration provided to the Perforce Server as a spec using the new command: – p4 ldap • The fundamental parameters: – Hostname – Port number – Encryption method
  • 19. # • The way that the user will be identified in the directory before we can authenticate needs to be configured. • 3 bind methods supported: – Simple – Search – SASL
  • 20. #
  • 21. # • This method takes a DN with a %user% placeholder – cn=%user%,ou=Users,dc=p4,dc=com – cn=npoole,ou=Users,dc=p4,dc=com • Only suitable for the simplest directory layouts.
  • 22. #
  • 23. # • This method takes an LDAP query with a %user% placeholder and expands it. – (&(objectClass=user)(sAMAccountName=%user%)) • A known read-only user is used to perform the search to discover the user’s DN. – Only one result must be returned by the query.
  • 24. #
  • 25. # • This method doesn’t normally require any configuration. – All that is required is a username and a password. – LDAP server is responsible for finding the user from the username. • Active Directory supports this out of the box. – Not all LDAP servers support this. – Uses the DIGEST-MD5 SASL mechanism.
  • 26. • Optional feature for restricting Perforce access to only users in the LDAP who use Perforce. • Ensures that the user belongs to one or more named groups in the LDAP. • This is defined by a LDAP group search. – (&(objectClass=posixGroup)(cn=development)(memberUid=%user%)) #
  • 27. # • The new p4 ldap and p4 ldaps commands both have -t <username> options. – This allows an LDAP configuration to be tested before it is enabled. • Authentication failures are reported with more detailed messages than a user would see running p4 login.
  • 28. # • Use p4 configure to set the ordered list of LDAP configurations: – p4 configure set auth.ldap.order.1=MasterAD • This supports: – Fragmented user directories (directory server per-office). – Replicated user directories (for failover).
  • 29. # • Users must be configured to use LDAP. – Many background (non-human) Perforce users are not stored in LDAP. – A new AuthMethod field on the user spec switches users between authenticating against the Perforce database and LDAP.
  • 30. # • The default user AuthMethod can be changed to ldap. • This enables automatic user creation for any user who can authenticate using p4 login. • This works best with the group based authorization.
  • 31. #
  • 32. # Sven Erik Knop sknop@perforce.com Nick Poole npoole@perforce.com @P4Nick
  • 33. #
  • 34. #
  • 35. #
  • 36. #
  • 37. #
  • 38. #
  • 39. #
  • 40. #
  • 41. #
  • 42. #
  • 43. #
  • 44. #
  • 45. #
  • 46. #
  • 47. #
  • 48. #
  • 49. #
  • 50. #
  • 51. #
  • 54. # • Set the configurables – auth.ldap.order.1=openldap-search – auth.ldap.order.2=ad-search • Run p4 ldaps -t sbaker Testing authentication against LDAP configuration openldap-search. User not found by LDAP search "(&(objectClass=inetOrgPerson)(cn=sbaker))" starting at ou=employees,dc=p4,dc=com Testing authentication against LDAP configuration ad-search. Authentication successful.