SlideShare a Scribd company logo
1 of 56
Download to read offline
User Authorization
Without You
Integrating MongoDB and LDAP
Kip Iwakiri
Technical Services Engineer, MongoDB
Table Tennis Matches on Demand
Agenda
Disclaimer: Subject to change
We need 30,000 users added to the database
Based on a True Story
Yesterday
We need 30,000 users added to the database
Please. No.
Not like this.
-Kip
Based on a True Story
Yesterday
We need LDAP for <arbitrary standard>!
Find out more tonight at 11!
Yesterday - 1
We need LDAP for <arbitrary standard>!
Actually, I can fix this.
I’ll need 80 minutes and 50’ish people in
a small auditorium.
-Kip
Find out more tonight at 11!
Yesterday - 1
LDAP PrimerWhat is LDAP?
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
• Lightweight
• Directory
• Access
• Protocol
• (Relatively) Fast Lookups
• Centralized
• Integrated with Windows
LDAP Primer
Domain Component (DC)
Organizational Unit (OU)
Security Group (SG)
Person (DN, UPN, SAM, etc)
Terminology - Structure
Abbrev. Object Description Example
DC Domain Component
Top level of directory tree. Each is a piece
of the full domain.
DC=com
OU Organizational Unit Like a folder for things. A logical structure. OU=PLACE
SG Security Group A type of Group. Logical grouping of users. CN=SecAdmins,OU=PLACE,DC=example,DC=com
---- Person Lots of aliases here! CN=kip
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP Primer
Domain Component (DC)
Organizational Unit (OU)
Security Group (SG)
Person (DN, UPN, SAM, etc)
Terminology - Structure
Abbrev. Object Description Example
DC Domain Component
Top level of directory tree. Each is a piece
of the full domain.
DC=com
OU Organizational Unit Like a folder for things. A logical structure. OU=PLACE
SG Security Group A type of Group. Logical grouping of users. CN=SecAdmins,OU=PLACE,DC=example,DC=com
---- Person Lots of aliases here! CN=kip
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP Primer
Domain Component (DC)
Organizational Unit (OU)
Security Group (SG)
Person (DN, UPN, SAM, etc)
Terminology - Structure
Abbrev. Object Description Example
DC Domain Component
Top level of directory tree. Each is a piece
of the full domain.
DC=com
OU Organizational Unit Like a folder for things. A logical structure. OU=PLACE
SG Security Group A type of Group. Logical grouping of users. CN=SecAdmins,OU=PLACE,DC=example,DC=com
---- Person Lots of aliases here! CN=kip
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP Primer
Domain Component (DC)
Organizational Unit (OU)
Security Group (SG)
Person (DN, UPN, SAM, etc)
Terminology - Structure
Abbrev. Object Description Example
DC Domain Component
Top level of directory tree. Each is a piece
of the full domain.
DC=com
OU Organizational Unit Like a folder for things. A logical structure. OU=PLACE
SG Security Group A type of Group. Logical grouping of users. CN=SecAdmins,OU=PLACE,DC=example,DC=com
---- Person Lots of aliases here! CN=kip
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP Primer
Domain Component (DC)
Organizational Unit (OU)
Security Group (SG)
Person (DN, UPN, SAM, etc)
Terminology - Structure
Abbrev. Object Description Example
DC Domain Component
Top level of directory tree. Each is a piece
of the full domain.
DC=com
OU Organizational Unit Like a folder for things. A logical structure. OU=PLACE
SG Security Group A type of Group. Logical grouping of users. CN=SecAdmins,OU=PLACE,DC=example,DC=com
Human Person Lots of aliases here! CN=kip
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP Primer
Person (DN, UPN, SAM, etc)
Terminology - Objects
Abbrev. Attribute Description Example
DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com
UPN userPrincipalName Username with domain kip@example.com
SAM sAMAccountName Just a Username kip
CN cn Common Name kip
---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
LDAP Primer
Person (DN, UPN, SAM, etc)
Terminology - Objects
Abbrev. Attribute Description Example
DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com
UPN userPrincipalName Username with domain kip@example.com
SAM sAMAccountName Just a Username kip
CN cn Common Name kip
---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP Primer
Person (DN, UPN, SAM, etc)
Terminology - Objects
Abbrev. Attribute Description Example
DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com
UPN userPrincipalName Username with domain kip@example.com
SAM sAMAccountName Just a Username kip
CN cn Common Name kip
---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
LDAP Primer
Person (DN, UPN, SAM, etc)
Terminology - Objects
Abbrev. Attribute Description Example
DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com
UPN userPrincipalName Username with domain kip@example.com
SAM sAMAccountName Just a Username kip
CN cn Common Name kip
---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
LDAP Primer
Person (DN, UPN, SAM, etc)
Terminology - Objects
Abbrev. Attribute Description Example
DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com
UPN userPrincipalName Username with domain kip@example.com
SAM sAMAccountName Just a Username kip
CN cn Common Name kip
---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
LDAP Primer
Person (DN, UPN, SAM, etc)
Terminology - Objects
Abbrev. Attribute Description Example
DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com
UPN userPrincipalName Username with domain kip@example.com
SAM sAMAccountName Just a Username kip
CN cn Common Name kip
---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
LDAP PrimerQuery Format
Attribute Description Example
Base DN
This is the full path to the object in the
directory where you will start the search
OU=place,DC=example,DC=com
Attributes to
Return
Optional field. Comma separated list of
values.
userPrincipalName,cn,mail
Scope
Depth of the search. Three options.
Default is sub.
● base - Only the base!
● one - One below, no base
● sub - Recursive lookup (Default)
Filter
Return specific objects based on attribute
values.
userPrincipalName=kip@example.com
<Base DN>?<Attributes To Return>?<Scope>?<Filter>
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format
Attribute Description Example
Base DN
This is the full path to the object in the
directory where you will start the search
OU=place,DC=example,DC=com
Attributes to
Return
Optional field. Comma separated list of
values.
userPrincipalName,cn,mail
Scope
Depth of the search. Three options.
Default is sub.
● base - Only the base!
● one - One below, no base
● sub - Recursive lookup (Default)
Filter
Return specific objects based on attribute
values.
userPrincipalName=kip@example.com
<Base DN>?<Attributes To Return>?<Scope>?<Filter>
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format
Attribute Description Example
Base DN
This is the full path to the object in the
directory where you will start the search
OU=place,DC=example,DC=com
Attributes to
Return
Optional field. Comma separated list of
values.
userPrincipalName,cn,mail
Scope
Depth of the search. Three options.
Default is sub.
● base - Only the base!
● one - One below, no base
● sub - Recursive lookup (Default)
Filter
Return specific objects based on attribute
values.
userPrincipalName=kip@example.com
<Base DN>?<Attributes To Return>?<Scope>?<Filter>
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format
Attribute Description Example
Base DN
This is the full path to the object in the
directory where you will start the search
OU=place,DC=example,DC=com
Attributes to
Return
Optional field. Comma separated list of
values.
userPrincipalName,cn,mail
Scope
Depth of the search. Three options.
Default is sub.
● base - Only the base!
● one - One below, no base
● sub - Recursive lookup (Default)
Filter
Return specific objects based on attribute
values.
userPrincipalName=kip@example.com
<Base DN>?<Attributes To Return>?<Scope>?<Filter>
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format
Attribute Description Example
Base DN
This is the full path to the object in the
directory where you will start the search
OU=place,DC=example,DC=com
Attributes to
Return
Optional field. Comma separated list of
values.
userPrincipalName,cn,mail
Scope
Depth of the search. Three options.
Default is sub.
● base - Only the base!
● one - One below, no base
● sub - Recursive lookup (Default)
Filter
Return specific objects based on attribute
values.
userPrincipalName=kip@example.com
<Base DN>?<Attributes To Return>?<Scope>?<Filter>
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuestions?
Attribute Description Example
Base DN
This is the full path to the object in the
directory where you will start the search
OU=place,DC=example,DC=com
Attributes to
Return
Optional field. Comma separated list of
values.
userPrincipalName,cn,mail
Scope
Depth of the search. Three options.
Default is sub.
● base - Only the base!
● one - One below, no base
● sub - Recursive lookup (Default)
Filter
Return specific objects based on attribute
values.
userPrincipalName=kip@example.com
<Base DN>?<Attributes To Return>?<Scope>?<Filter>
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format - Examples
Field Example
Base DN
Attributes
Scope
Filter
<Base DN>?<Attributes To Return>?<Scope>?<Filter>
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format - Examples
Field Example
Base DN
Attributes
Scope
Filter
<Base DN>?<Attributes To Return>?<Scope>?<Filter>
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format - Examples
Field Example
Base DN CN=Users,DC=example,DC=com
Attributes
Scope
Filter
CN=Users,DC=example,DC=com?<Attributes To Return>?<Scope>?<Filter>
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format - Examples
Field Example
Base DN CN=Users,DC=example,DC=com
Attributes cn,mail,memberOf
Scope
Filter
CN=Users,DC=example,DC=com?cn,mail,memberOf?<Scope>?<Filter>
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format - Examples
Field Example
Base DN CN=Users,DC=example,DC=com
Attributes cn,mail,memberOf
Scope sub
Filter
CN=Users,DC=example,DC=com?cn,mail,memberOf?sub?<Filter>
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format - Examples
Field Example
Base DN CN=Users,DC=example,DC=com
Attributes cn,mail,memberOf
Scope sub
Filter userPrincipalName=kip@example.com
CN=Users,DC=example,DC=com?cn,mail,memberOf?sub?userPrincipalName=kip@example.com
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format - Examples
Field Example
Base DN CN=Users,DC=example,DC=com
Attributes cn,mail,memberOf
Scope sub
Filter userPrincipalName=kip@example.com
CN=Users,DC=example,DC=com?cn,mail,memberOf??userPrincipalName=kip@example.com
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format - Examples
Field Example
Base DN CN=Users,DC=example,DC=com
Attributes *
Scope sub
Filter userPrincipalName=kip@example.com
CN=Users,DC=example,DC=com??sub?userPrincipalName=kip@example.com
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format - Examples
Field Example
Base DN CN=Users,DC=example,DC=com
Attributes *
Scope sub
Filter *
CN=Users,DC=example,DC=com??sub
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuery Format - Examples
Field Example
Base DN CN=Users,DC=example,DC=com
Attributes *
Scope base
Filter *
CN=Users,DC=example,DC=com??base
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuestions?
DC=net DC=com DC=org
DC=example
CN=UsersOU=PLACE
CN=kipCN=SecAdmins
LDAP PrimerQuestions?
AuthN vs AuthZ
AuthN - Authentication
• Who are you?
AuthZ - Authorization
• What are you allowed to do?
Why you want AuthZ!
Native LDAP AuthorizationIn MongoDB
Native LDAP AuthorizationIn MongoDB
security.ldap.userToDNMapping
● Converts login into a distinguishedName for searching
● Array of documents containing 2 fields
○ match
○ ldapQuery || substitution
● [ { match: "(.+)", ldapQuery: "<base>?<attributes>?<scope>?<filter>" } ]
security.ldap.authz.queryTemplate
● Query to run for authorization
● Results compared against MongoDB roles @admin
Native LDAP AuthorizationIn MongoDB
5 Easy Steps
1. Client logs in with Username
2. Username is converted via userToDNMapping
3. Run username against authorization query template
4. Check results from authorization query template against MongoDB roles@admin
5. Access! (Or not)
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
Native LDAP AuthorizationIn MongoDB
5 Easy Steps
1. Client logs in with Username
2. Username is converted via userToDNMapping
3. Run username against authorization query template
4. Check results from authorization query template against MongoDB roles@admin
5. Access! (Or not)
1. kip
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
Native LDAP AuthorizationIn MongoDB
5 Easy Steps
1. Client logs in with Username
2. Username is converted via userToDNMapping
3. Run username against authorization query template
4. Check results from authorization query template against MongoDB roles@admin
5. Access! (Or not)
1. kip
2. [ { match: "(.+)", ldapQuery: "<base>?<attributes>?<scope>?<filter>" } ]
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
Native LDAP AuthorizationIn MongoDB
5 Easy Steps
1. Client logs in with Username
2. Username is converted via userToDNMapping
3. Run username against authorization query template
4. Check results from authorization query template against MongoDB roles@admin
5. Access! (Or not)
1. kip
2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ]
a. {0} is regex capture group 0
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
Native LDAP AuthorizationIn MongoDB
5 Easy Steps
1. Client logs in with Username
2. Username is converted via userToDNMapping
3. Run username against authorization query template
4. Check results from authorization query template against MongoDB roles@admin
5. Access! (Or not)
1. CN=kip,CN=Users,DC=example,DC=com
2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ]
a. {0} is regex capture group 0
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
Native LDAP AuthorizationIn MongoDB
5 Easy Steps
1. Client logs in with Username
2. Username is converted via userToDNMapping
3. Run username against authorization query template
4. Check results from authorization query template against MongoDB roles@admin
5. Access! (Or not)
1. CN=kip,CN=Users,DC=example,DC=com
2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ]
a. {0} is regex capture group 0
3. <base>?<attributes>?<scope>?<filter>
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
Native LDAP AuthorizationIn MongoDB
5 Easy Steps
1. Client logs in with Username
2. Username is converted via userToDNMapping
3. Run username against authorization query template
4. Check results from authorization query template against MongoDB roles@admin
5. Access! (Or not)
1. CN=kip,CN=Users,DC=example,DC=com
2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ]
a. {0} is regex capture group 0
3. {USER}?memberOf?base
a. {USER} is a special token for the username dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
Native LDAP AuthorizationIn MongoDB
5 Easy Steps
1. Client logs in with Username
2. Username is converted via userToDNMapping
3. Run username against authorization query template
4. Check results from authorization query template against MongoDB roles@admin
5. Access! (Or not)
1. CN=kip,CN=Users,DC=example,DC=com
2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ]
a. {0} is regex capture group 0
3. {USER}?memberOf?base
a. {USER} is a special token for the username dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
Native LDAP AuthorizationIn MongoDB
5 Easy Steps
1. Client logs in with Username
2. Username is converted via userToDNMapping
3. Run username against authorization query template
4. Check results from authorization query template against MongoDB roles@admin
5. Access! (Or not)
1. CN=kip,CN=Users,DC=example,DC=com
2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ]
a. {0} is regex capture group 0
3. {USER}?memberOf?base
a. {USER} is a special token for the username
4. db.getSiblingDatabase(‘admin’).getRoles()
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
Native LDAP AuthorizationIn MongoDB
5 Easy Steps
1. Client logs in with Username
2. Username is converted via userToDNMapping
3. Run username against authorization query template
4. Check results from authorization query template against MongoDB roles@admin
5. Access! (Or not)
1. CN=kip,CN=Users,DC=example,DC=com
2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ]
a. {0} is regex capture group 0
3. {USER}?memberOf?base
a. {USER} is a special token for the username
4. db.getSiblingDatabase(‘admin’).getRoles()
5. ACCESS!?
dn: CN=kip,CN=Users,DC=example,DC=com
distinguishedName: CN=kip,CN=Users,DC=example,DC=com
userPrincipalName: kip@example.com
sAMAccountName: kip
cn: kip
memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com
memberOf: literallyAnyString
Native LDAP ACCESSIn Excess
5 ACCESS Steps
1. Client logs in with ACCESS
2. Username is converted via ACCESS
3. Run username against ACCESS query template
4. Check results from authorization query template against MongoDB roles@ACCESS
5. Access!
1. CN=ACCESS,CN=Users,DC=example,DC=com
2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ]
a. {0} is regex capture group 0
3. {USER}?memberOf?base
a. {USER} is a special token for the username
4. db.getSiblingDatabase(‘admin’).getRoles()
5. ACCESS!
dn: CN=ACCESS,CN=Users,DC=example,DC=com
distinguishedName:
CN=ACCESS,CN=Users,DC=example,DC=com
userPrincipalName: ACCESS@example.com
sAMAccountName: ACCESS
cn: ACCESS
memberOf: ACCESS
Quick Questions!Or not
We’ll Do It LiveTake Notes?
❏ 5m - Checking out Active Directory and Tracking Users
❏ Add a user to a group and create a group
❏ 10m - Start a MongoDB Instance!
❏ Create a new config file
❏ Start it up
❏ 5m - Create Role in mongod
❏ 5m - Example Authentication
❏ 5m - Additional Tools
❏ mongoldap
Maybe We Should Have Practiced...Take Notes
❏ Users in multiple OUs
❏ Commas, in usernames
❏ Ambiguous Users
❏ Case Sensitivity
❏ “SMART QUOTES”
Extra Reference MaterialOpen Notes Testing. Just Sayin’
● Documentation:
○ https://docs.mongodb.com/manual/core/security-ldap/
○ https://docs.mongodb.com/manual/tutorial/authenticate-nativeldap-activedirectory/
○ https://docs.mongodb.com/manual/core/security-ldap-external/
● Coursework:
○ https://university.mongodb.com/courses/M310/about
Q/AQuestions? Answers? Challenges?
Q/A
Please. No.
Not like this.
-Kip
Bring your A-game
Questions? Answers? Challenges?

More Related Content

What's hot (18)

Full Text Search In PostgreSQL
Full Text Search In PostgreSQLFull Text Search In PostgreSQL
Full Text Search In PostgreSQL
 
Pig latin
Pig latinPig latin
Pig latin
 
Apache Spark Workshop
Apache Spark WorkshopApache Spark Workshop
Apache Spark Workshop
 
LDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access ProtocolLDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access Protocol
 
Ldap
LdapLdap
Ldap
 
Jndi
JndiJndi
Jndi
 
Xcap tutorial
Xcap tutorialXcap tutorial
Xcap tutorial
 
Jndi (1)
Jndi (1)Jndi (1)
Jndi (1)
 
Domain Name System ppt
Domain Name System pptDomain Name System ppt
Domain Name System ppt
 
2001: JNDI Its all in the Context
2001:  JNDI Its all in the Context2001:  JNDI Its all in the Context
2001: JNDI Its all in the Context
 
Sqlxml vs xquery
Sqlxml vs xquerySqlxml vs xquery
Sqlxml vs xquery
 
Beyond shuffling - Scala Days Berlin 2016
Beyond shuffling - Scala Days Berlin 2016Beyond shuffling - Scala Days Berlin 2016
Beyond shuffling - Scala Days Berlin 2016
 
25dom
25dom25dom
25dom
 
LDAP Integration
LDAP IntegrationLDAP Integration
LDAP Integration
 
Big Data Processing using Apache Spark and Clojure
Big Data Processing using Apache Spark and ClojureBig Data Processing using Apache Spark and Clojure
Big Data Processing using Apache Spark and Clojure
 
DB2 Native XML
DB2 Native XMLDB2 Native XML
DB2 Native XML
 
Jsquery - the jsonb query language with GIN indexing support
Jsquery - the jsonb query language with GIN indexing supportJsquery - the jsonb query language with GIN indexing support
Jsquery - the jsonb query language with GIN indexing support
 
Oh, that ubiquitous JSON !
Oh, that ubiquitous JSON !Oh, that ubiquitous JSON !
Oh, that ubiquitous JSON !
 

Similar to MongoDB World 2018: Tutorial - User Administration Without You - Integrating LDAP with MongoDB

MongoDB.local Austin 2018: Tutorial - User Administration Without You - Integ...
MongoDB.local Austin 2018: Tutorial - User Administration Without You - Integ...MongoDB.local Austin 2018: Tutorial - User Administration Without You - Integ...
MongoDB.local Austin 2018: Tutorial - User Administration Without You - Integ...MongoDB
 
User administration without you - integrating LDAP
User administration without you - integrating LDAPUser administration without you - integrating LDAP
User administration without you - integrating LDAPMongoDB
 
Description Set profiles
Description Set profilesDescription Set profiles
Description Set profilesMikael Nilsson
 
LDAP Applied (EuroOSCON 2005)
LDAP Applied (EuroOSCON 2005)LDAP Applied (EuroOSCON 2005)
LDAP Applied (EuroOSCON 2005)Fran Fabrizio
 
UnderstandingLDAP.ppt
UnderstandingLDAP.pptUnderstandingLDAP.ppt
UnderstandingLDAP.pptEfrizal Zaida
 
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 projectClément OUDOT
 
Ldapsession 1217528612650451-9
Ldapsession 1217528612650451-9Ldapsession 1217528612650451-9
Ldapsession 1217528612650451-9rezgui
 
C++ Programming Course
C++ Programming CourseC++ Programming Course
C++ Programming CourseDennis Chang
 
Ccourse 140618093931-phpapp02
Ccourse 140618093931-phpapp02Ccourse 140618093931-phpapp02
Ccourse 140618093931-phpapp02Getachew Ganfur
 
04 data accesstechnologies
04 data accesstechnologies04 data accesstechnologies
04 data accesstechnologiesBat Programmer
 
OGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewOGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewBartosz Dobrzelecki
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowKarsten Dambekalns
 
OpenStack Keystone with LDAP
OpenStack Keystone with LDAPOpenStack Keystone with LDAP
OpenStack Keystone with LDAPJesse Pretorius
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New FeaturesEnkitec
 
Synchronize AD and OpenLDAP with LSC
Synchronize AD and OpenLDAP with LSCSynchronize AD and OpenLDAP with LSC
Synchronize AD and OpenLDAP with LSCLDAPCon
 

Similar to MongoDB World 2018: Tutorial - User Administration Without You - Integrating LDAP with MongoDB (20)

MongoDB.local Austin 2018: Tutorial - User Administration Without You - Integ...
MongoDB.local Austin 2018: Tutorial - User Administration Without You - Integ...MongoDB.local Austin 2018: Tutorial - User Administration Without You - Integ...
MongoDB.local Austin 2018: Tutorial - User Administration Without You - Integ...
 
User administration without you - integrating LDAP
User administration without you - integrating LDAPUser administration without you - integrating LDAP
User administration without you - integrating LDAP
 
Description Set profiles
Description Set profilesDescription Set profiles
Description Set profiles
 
LDAP Applied (EuroOSCON 2005)
LDAP Applied (EuroOSCON 2005)LDAP Applied (EuroOSCON 2005)
LDAP Applied (EuroOSCON 2005)
 
Using OpenLDAP
Using OpenLDAPUsing OpenLDAP
Using OpenLDAP
 
UnderstandingLDAP.ppt
UnderstandingLDAP.pptUnderstandingLDAP.ppt
UnderstandingLDAP.ppt
 
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
 
Ldapsession
LdapsessionLdapsession
Ldapsession
 
Ldapsession 1217528612650451-9
Ldapsession 1217528612650451-9Ldapsession 1217528612650451-9
Ldapsession 1217528612650451-9
 
C++ Programming Course
C++ Programming CourseC++ Programming Course
C++ Programming Course
 
Ccourse 140618093931-phpapp02
Ccourse 140618093931-phpapp02Ccourse 140618093931-phpapp02
Ccourse 140618093931-phpapp02
 
04 data accesstechnologies
04 data accesstechnologies04 data accesstechnologies
04 data accesstechnologies
 
OGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewOGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's View
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 Flow
 
OpenStack Keystone with LDAP
OpenStack Keystone with LDAPOpenStack Keystone with LDAP
OpenStack Keystone with LDAP
 
Adventures in TclOO
Adventures in TclOOAdventures in TclOO
Adventures in TclOO
 
LDAP
LDAPLDAP
LDAP
 
AD & LDAP
AD & LDAPAD & LDAP
AD & LDAP
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New Features
 
Synchronize AD and OpenLDAP with LSC
Synchronize AD and OpenLDAP with LSCSynchronize AD and OpenLDAP with LSC
Synchronize AD and OpenLDAP with LSC
 

More from MongoDB

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump StartMongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB
 

More from MongoDB (20)

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
 

Recently uploaded

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 textsMaria Levchenko
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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 Processorsdebabhi2
 
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 Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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...apidays
 
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 RobisonAnna Loughnan Colquhoun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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.pdfUK Journal
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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.pptxHampshireHUG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
[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.pdfhans926745
 
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 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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...
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
[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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

MongoDB World 2018: Tutorial - User Administration Without You - Integrating LDAP with MongoDB

  • 2. Kip Iwakiri Technical Services Engineer, MongoDB Table Tennis Matches on Demand
  • 4. We need 30,000 users added to the database Based on a True Story Yesterday
  • 5. We need 30,000 users added to the database Please. No. Not like this. -Kip Based on a True Story Yesterday
  • 6. We need LDAP for <arbitrary standard>! Find out more tonight at 11! Yesterday - 1
  • 7. We need LDAP for <arbitrary standard>! Actually, I can fix this. I’ll need 80 minutes and 50’ish people in a small auditorium. -Kip Find out more tonight at 11! Yesterday - 1
  • 8. LDAP PrimerWhat is LDAP? DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins • Lightweight • Directory • Access • Protocol • (Relatively) Fast Lookups • Centralized • Integrated with Windows
  • 9. LDAP Primer Domain Component (DC) Organizational Unit (OU) Security Group (SG) Person (DN, UPN, SAM, etc) Terminology - Structure Abbrev. Object Description Example DC Domain Component Top level of directory tree. Each is a piece of the full domain. DC=com OU Organizational Unit Like a folder for things. A logical structure. OU=PLACE SG Security Group A type of Group. Logical grouping of users. CN=SecAdmins,OU=PLACE,DC=example,DC=com ---- Person Lots of aliases here! CN=kip DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 10. LDAP Primer Domain Component (DC) Organizational Unit (OU) Security Group (SG) Person (DN, UPN, SAM, etc) Terminology - Structure Abbrev. Object Description Example DC Domain Component Top level of directory tree. Each is a piece of the full domain. DC=com OU Organizational Unit Like a folder for things. A logical structure. OU=PLACE SG Security Group A type of Group. Logical grouping of users. CN=SecAdmins,OU=PLACE,DC=example,DC=com ---- Person Lots of aliases here! CN=kip DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 11. LDAP Primer Domain Component (DC) Organizational Unit (OU) Security Group (SG) Person (DN, UPN, SAM, etc) Terminology - Structure Abbrev. Object Description Example DC Domain Component Top level of directory tree. Each is a piece of the full domain. DC=com OU Organizational Unit Like a folder for things. A logical structure. OU=PLACE SG Security Group A type of Group. Logical grouping of users. CN=SecAdmins,OU=PLACE,DC=example,DC=com ---- Person Lots of aliases here! CN=kip DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 12. LDAP Primer Domain Component (DC) Organizational Unit (OU) Security Group (SG) Person (DN, UPN, SAM, etc) Terminology - Structure Abbrev. Object Description Example DC Domain Component Top level of directory tree. Each is a piece of the full domain. DC=com OU Organizational Unit Like a folder for things. A logical structure. OU=PLACE SG Security Group A type of Group. Logical grouping of users. CN=SecAdmins,OU=PLACE,DC=example,DC=com ---- Person Lots of aliases here! CN=kip DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 13. LDAP Primer Domain Component (DC) Organizational Unit (OU) Security Group (SG) Person (DN, UPN, SAM, etc) Terminology - Structure Abbrev. Object Description Example DC Domain Component Top level of directory tree. Each is a piece of the full domain. DC=com OU Organizational Unit Like a folder for things. A logical structure. OU=PLACE SG Security Group A type of Group. Logical grouping of users. CN=SecAdmins,OU=PLACE,DC=example,DC=com Human Person Lots of aliases here! CN=kip DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 14. LDAP Primer Person (DN, UPN, SAM, etc) Terminology - Objects Abbrev. Attribute Description Example DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com UPN userPrincipalName Username with domain kip@example.com SAM sAMAccountName Just a Username kip CN cn Common Name kip ---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 15. LDAP Primer Person (DN, UPN, SAM, etc) Terminology - Objects Abbrev. Attribute Description Example DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com UPN userPrincipalName Username with domain kip@example.com SAM sAMAccountName Just a Username kip CN cn Common Name kip ---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 16. LDAP Primer Person (DN, UPN, SAM, etc) Terminology - Objects Abbrev. Attribute Description Example DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com UPN userPrincipalName Username with domain kip@example.com SAM sAMAccountName Just a Username kip CN cn Common Name kip ---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 17. LDAP Primer Person (DN, UPN, SAM, etc) Terminology - Objects Abbrev. Attribute Description Example DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com UPN userPrincipalName Username with domain kip@example.com SAM sAMAccountName Just a Username kip CN cn Common Name kip ---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 18. LDAP Primer Person (DN, UPN, SAM, etc) Terminology - Objects Abbrev. Attribute Description Example DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com UPN userPrincipalName Username with domain kip@example.com SAM sAMAccountName Just a Username kip CN cn Common Name kip ---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 19. LDAP Primer Person (DN, UPN, SAM, etc) Terminology - Objects Abbrev. Attribute Description Example DN distinguishedName The full path to your object. CN=kip,CN=Users,DC=example,DC=com UPN userPrincipalName Username with domain kip@example.com SAM sAMAccountName Just a Username kip CN cn Common Name kip ---- memberOf Distinguished Names of groups CN=SecAdmins,OU=PLACE,dc=example,dc=com DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 20. LDAP PrimerQuery Format Attribute Description Example Base DN This is the full path to the object in the directory where you will start the search OU=place,DC=example,DC=com Attributes to Return Optional field. Comma separated list of values. userPrincipalName,cn,mail Scope Depth of the search. Three options. Default is sub. ● base - Only the base! ● one - One below, no base ● sub - Recursive lookup (Default) Filter Return specific objects based on attribute values. userPrincipalName=kip@example.com <Base DN>?<Attributes To Return>?<Scope>?<Filter> DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 21. LDAP PrimerQuery Format Attribute Description Example Base DN This is the full path to the object in the directory where you will start the search OU=place,DC=example,DC=com Attributes to Return Optional field. Comma separated list of values. userPrincipalName,cn,mail Scope Depth of the search. Three options. Default is sub. ● base - Only the base! ● one - One below, no base ● sub - Recursive lookup (Default) Filter Return specific objects based on attribute values. userPrincipalName=kip@example.com <Base DN>?<Attributes To Return>?<Scope>?<Filter> DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 22. LDAP PrimerQuery Format Attribute Description Example Base DN This is the full path to the object in the directory where you will start the search OU=place,DC=example,DC=com Attributes to Return Optional field. Comma separated list of values. userPrincipalName,cn,mail Scope Depth of the search. Three options. Default is sub. ● base - Only the base! ● one - One below, no base ● sub - Recursive lookup (Default) Filter Return specific objects based on attribute values. userPrincipalName=kip@example.com <Base DN>?<Attributes To Return>?<Scope>?<Filter> DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 23. LDAP PrimerQuery Format Attribute Description Example Base DN This is the full path to the object in the directory where you will start the search OU=place,DC=example,DC=com Attributes to Return Optional field. Comma separated list of values. userPrincipalName,cn,mail Scope Depth of the search. Three options. Default is sub. ● base - Only the base! ● one - One below, no base ● sub - Recursive lookup (Default) Filter Return specific objects based on attribute values. userPrincipalName=kip@example.com <Base DN>?<Attributes To Return>?<Scope>?<Filter> DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 24. LDAP PrimerQuery Format Attribute Description Example Base DN This is the full path to the object in the directory where you will start the search OU=place,DC=example,DC=com Attributes to Return Optional field. Comma separated list of values. userPrincipalName,cn,mail Scope Depth of the search. Three options. Default is sub. ● base - Only the base! ● one - One below, no base ● sub - Recursive lookup (Default) Filter Return specific objects based on attribute values. userPrincipalName=kip@example.com <Base DN>?<Attributes To Return>?<Scope>?<Filter> DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 25. LDAP PrimerQuestions? Attribute Description Example Base DN This is the full path to the object in the directory where you will start the search OU=place,DC=example,DC=com Attributes to Return Optional field. Comma separated list of values. userPrincipalName,cn,mail Scope Depth of the search. Three options. Default is sub. ● base - Only the base! ● one - One below, no base ● sub - Recursive lookup (Default) Filter Return specific objects based on attribute values. userPrincipalName=kip@example.com <Base DN>?<Attributes To Return>?<Scope>?<Filter> DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 26. LDAP PrimerQuery Format - Examples Field Example Base DN Attributes Scope Filter <Base DN>?<Attributes To Return>?<Scope>?<Filter> DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 27. LDAP PrimerQuery Format - Examples Field Example Base DN Attributes Scope Filter <Base DN>?<Attributes To Return>?<Scope>?<Filter> DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 28. LDAP PrimerQuery Format - Examples Field Example Base DN CN=Users,DC=example,DC=com Attributes Scope Filter CN=Users,DC=example,DC=com?<Attributes To Return>?<Scope>?<Filter> DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 29. LDAP PrimerQuery Format - Examples Field Example Base DN CN=Users,DC=example,DC=com Attributes cn,mail,memberOf Scope Filter CN=Users,DC=example,DC=com?cn,mail,memberOf?<Scope>?<Filter> DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 30. LDAP PrimerQuery Format - Examples Field Example Base DN CN=Users,DC=example,DC=com Attributes cn,mail,memberOf Scope sub Filter CN=Users,DC=example,DC=com?cn,mail,memberOf?sub?<Filter> DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 31. LDAP PrimerQuery Format - Examples Field Example Base DN CN=Users,DC=example,DC=com Attributes cn,mail,memberOf Scope sub Filter userPrincipalName=kip@example.com CN=Users,DC=example,DC=com?cn,mail,memberOf?sub?userPrincipalName=kip@example.com DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 32. LDAP PrimerQuery Format - Examples Field Example Base DN CN=Users,DC=example,DC=com Attributes cn,mail,memberOf Scope sub Filter userPrincipalName=kip@example.com CN=Users,DC=example,DC=com?cn,mail,memberOf??userPrincipalName=kip@example.com DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 33. LDAP PrimerQuery Format - Examples Field Example Base DN CN=Users,DC=example,DC=com Attributes * Scope sub Filter userPrincipalName=kip@example.com CN=Users,DC=example,DC=com??sub?userPrincipalName=kip@example.com DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 34. LDAP PrimerQuery Format - Examples Field Example Base DN CN=Users,DC=example,DC=com Attributes * Scope sub Filter * CN=Users,DC=example,DC=com??sub DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 35. LDAP PrimerQuery Format - Examples Field Example Base DN CN=Users,DC=example,DC=com Attributes * Scope base Filter * CN=Users,DC=example,DC=com??base DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 36. LDAP PrimerQuestions? DC=net DC=com DC=org DC=example CN=UsersOU=PLACE CN=kipCN=SecAdmins
  • 38. AuthN vs AuthZ AuthN - Authentication • Who are you? AuthZ - Authorization • What are you allowed to do? Why you want AuthZ! Native LDAP AuthorizationIn MongoDB
  • 39. Native LDAP AuthorizationIn MongoDB security.ldap.userToDNMapping ● Converts login into a distinguishedName for searching ● Array of documents containing 2 fields ○ match ○ ldapQuery || substitution ● [ { match: "(.+)", ldapQuery: "<base>?<attributes>?<scope>?<filter>" } ] security.ldap.authz.queryTemplate ● Query to run for authorization ● Results compared against MongoDB roles @admin
  • 40. Native LDAP AuthorizationIn MongoDB 5 Easy Steps 1. Client logs in with Username 2. Username is converted via userToDNMapping 3. Run username against authorization query template 4. Check results from authorization query template against MongoDB roles@admin 5. Access! (Or not) dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 41. Native LDAP AuthorizationIn MongoDB 5 Easy Steps 1. Client logs in with Username 2. Username is converted via userToDNMapping 3. Run username against authorization query template 4. Check results from authorization query template against MongoDB roles@admin 5. Access! (Or not) 1. kip dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 42. Native LDAP AuthorizationIn MongoDB 5 Easy Steps 1. Client logs in with Username 2. Username is converted via userToDNMapping 3. Run username against authorization query template 4. Check results from authorization query template against MongoDB roles@admin 5. Access! (Or not) 1. kip 2. [ { match: "(.+)", ldapQuery: "<base>?<attributes>?<scope>?<filter>" } ] dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 43. Native LDAP AuthorizationIn MongoDB 5 Easy Steps 1. Client logs in with Username 2. Username is converted via userToDNMapping 3. Run username against authorization query template 4. Check results from authorization query template against MongoDB roles@admin 5. Access! (Or not) 1. kip 2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ] a. {0} is regex capture group 0 dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 44. Native LDAP AuthorizationIn MongoDB 5 Easy Steps 1. Client logs in with Username 2. Username is converted via userToDNMapping 3. Run username against authorization query template 4. Check results from authorization query template against MongoDB roles@admin 5. Access! (Or not) 1. CN=kip,CN=Users,DC=example,DC=com 2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ] a. {0} is regex capture group 0 dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 45. Native LDAP AuthorizationIn MongoDB 5 Easy Steps 1. Client logs in with Username 2. Username is converted via userToDNMapping 3. Run username against authorization query template 4. Check results from authorization query template against MongoDB roles@admin 5. Access! (Or not) 1. CN=kip,CN=Users,DC=example,DC=com 2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ] a. {0} is regex capture group 0 3. <base>?<attributes>?<scope>?<filter> dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 46. Native LDAP AuthorizationIn MongoDB 5 Easy Steps 1. Client logs in with Username 2. Username is converted via userToDNMapping 3. Run username against authorization query template 4. Check results from authorization query template against MongoDB roles@admin 5. Access! (Or not) 1. CN=kip,CN=Users,DC=example,DC=com 2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ] a. {0} is regex capture group 0 3. {USER}?memberOf?base a. {USER} is a special token for the username dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 47. Native LDAP AuthorizationIn MongoDB 5 Easy Steps 1. Client logs in with Username 2. Username is converted via userToDNMapping 3. Run username against authorization query template 4. Check results from authorization query template against MongoDB roles@admin 5. Access! (Or not) 1. CN=kip,CN=Users,DC=example,DC=com 2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ] a. {0} is regex capture group 0 3. {USER}?memberOf?base a. {USER} is a special token for the username dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 48. Native LDAP AuthorizationIn MongoDB 5 Easy Steps 1. Client logs in with Username 2. Username is converted via userToDNMapping 3. Run username against authorization query template 4. Check results from authorization query template against MongoDB roles@admin 5. Access! (Or not) 1. CN=kip,CN=Users,DC=example,DC=com 2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ] a. {0} is regex capture group 0 3. {USER}?memberOf?base a. {USER} is a special token for the username 4. db.getSiblingDatabase(‘admin’).getRoles() dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 49. Native LDAP AuthorizationIn MongoDB 5 Easy Steps 1. Client logs in with Username 2. Username is converted via userToDNMapping 3. Run username against authorization query template 4. Check results from authorization query template against MongoDB roles@admin 5. Access! (Or not) 1. CN=kip,CN=Users,DC=example,DC=com 2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ] a. {0} is regex capture group 0 3. {USER}?memberOf?base a. {USER} is a special token for the username 4. db.getSiblingDatabase(‘admin’).getRoles() 5. ACCESS!? dn: CN=kip,CN=Users,DC=example,DC=com distinguishedName: CN=kip,CN=Users,DC=example,DC=com userPrincipalName: kip@example.com sAMAccountName: kip cn: kip memberOf: CN=SecAdmins,OU=PLACE,dc=example,dc=com memberOf: literallyAnyString
  • 50. Native LDAP ACCESSIn Excess 5 ACCESS Steps 1. Client logs in with ACCESS 2. Username is converted via ACCESS 3. Run username against ACCESS query template 4. Check results from authorization query template against MongoDB roles@ACCESS 5. Access! 1. CN=ACCESS,CN=Users,DC=example,DC=com 2. [ { match: "(.+)", ldapQuery: "dc=example,dc=com??sub?userPrincipalName={0}@example.com" } ] a. {0} is regex capture group 0 3. {USER}?memberOf?base a. {USER} is a special token for the username 4. db.getSiblingDatabase(‘admin’).getRoles() 5. ACCESS! dn: CN=ACCESS,CN=Users,DC=example,DC=com distinguishedName: CN=ACCESS,CN=Users,DC=example,DC=com userPrincipalName: ACCESS@example.com sAMAccountName: ACCESS cn: ACCESS memberOf: ACCESS
  • 52. We’ll Do It LiveTake Notes? ❏ 5m - Checking out Active Directory and Tracking Users ❏ Add a user to a group and create a group ❏ 10m - Start a MongoDB Instance! ❏ Create a new config file ❏ Start it up ❏ 5m - Create Role in mongod ❏ 5m - Example Authentication ❏ 5m - Additional Tools ❏ mongoldap
  • 53. Maybe We Should Have Practiced...Take Notes ❏ Users in multiple OUs ❏ Commas, in usernames ❏ Ambiguous Users ❏ Case Sensitivity ❏ “SMART QUOTES”
  • 54. Extra Reference MaterialOpen Notes Testing. Just Sayin’ ● Documentation: ○ https://docs.mongodb.com/manual/core/security-ldap/ ○ https://docs.mongodb.com/manual/tutorial/authenticate-nativeldap-activedirectory/ ○ https://docs.mongodb.com/manual/core/security-ldap-external/ ● Coursework: ○ https://university.mongodb.com/courses/M310/about
  • 56. Q/A Please. No. Not like this. -Kip Bring your A-game Questions? Answers? Challenges?