ACI tips in OpenDS? I want to restrict attribute read access to bound dn only - access-control

I want to deny read and search access to all attributes in my small ldap record except to ldap:///self
I tried
(targetattr="foo||bar||bat") (version 3.0; acl "deny-all"; deny (read, search, compare) userdn="ldap:///anyone";)
(targetattr="foo||bar||bat") (version 3.0; acl "allow-some"; allow (read, search, compare) userdn="ldap:///self";)
but this didn't work.
Any tips? Am I missing something?
thanks
-Bill

It turned out to be fairly straightforward:
(targetattr="foo||bar||bat") (version 3.0; acl "deny-all"; deny (read, search, compare) NOT userdn="ldap:///self";)

Related

Using Netscape library for performing LDAP search operation and getting limited result upto 10000 when range is provided (0-*)

I am using Netscape library for performing search operation on microsoft ADS/ADAM Ldap server
Following is the snippet I am using:
LDAPConnection connection=new LDAPConnection();
connection.connect("xx.xx.xx.xx", 389);
connection.authenticate( "CN=xx,CN=xx,DC=xx,DC=xx,DC=xx", "xxxx");
String[] attr= { "member;range=0-*" };
LDAPSearchResults resultSet = connection.search("CN=UsersGroup,CN=Builtin,DC=xx,DC=xx,DC=xx", 2, "(&(objectclass=group))", attr,false);
API is returning only 10000 records for "member" multivalued attribute.
MaxValRange value is set to 50000 on server.
Is there any way I can get more than 10K records in single search?
AFIK, besides modifying the MaxValRange, you need to override the upper-limits introduced in Windows Server 2008/R2 and restore the old-style (no upper limit enforced behavior for LDAP Query Policy in Windows Server 2003), modify the dSHeuristic attribute in Active Directory.
And of course you could use the Ranging OID.
We did, sometime ago, create some Example Java code to make the process easier.

How do I resolve this error message? Azure DevOPs TF401232:Work item does not exist, or you do not have permissions to read it

Azure DevOPs TF401232:Work item does not exist, or you do not have permissions to read it
Open project setting -> Project configuration -> Areas -> select area path( 01 - Template ) -> click “…” -> security -> search for your account and then check the permission-View work items in this node and ensure it set to allow.
ALSO, make sure you are not part of the User Group that has an access level set to deny for view work items for respective node.

How do I configure LDAP plugin for SonarQube Server?

I am trying to set the correct values for LDAP properties of a SonarQube Server. I am having difficulty finding a resource that explains the list of possible values for these properties, and understand which one to use in which scenario?
I am referring to https://docs.sonarqube.org/display/PLUG/LDAP+Plugin
For example,
Property1: ldap.user.request
Default_Value: (&(objectClass=inetOrgPerson)(uid={login}))
Example for AD: (&(objectClass=user)(sAMAccountName={login}))
Here what are all the possible values for objectClass?
When do i use value inetOrgPerson?
When do I use value user?
When do I use uid?
When do I use sAMAccountName? What does it mean?
There are several other properties like memberAttribute , idAttribute which I dont understand.
Is there a guide available which describes ALL ldap properties and ALL their possible values? I tried searching on LDAP.com, openldap.org but couldnt find relevant answers.
This is what i use as my LDAP configuration in the conf file.
Hope that helps you make a good start.
# LDAP configuration
# General Configuration
sonar.security.realm: LDAP
sonar.security.savePassword: true
sonar.authenticator.createUsers: true
sonar.security.localUsers: admin,sonar-build
ldap.url: ldap://ipadress:389
ldap.bindDn: CN=SonarUser,OU=Service Accounts,DC=domain,DC=com
ldap.bindPassword: {aes}xxx
# User Configuration
ldap.user.baseDn: DC=domain,DC=com
ldap.user.request: (&(objectClass=user)(sAMAccountName={login}))
ldap.user.realNameAttribute: cn
ldap.user.emailAttribute: mail
# Group Configuration
ldap.group.baseDn: DC=domain,DC=com
ldap.group.request: (&(objectClass=group)(memberUid={uid}))

Adding a TFS server group to access levels via command line

I am creating a group of users within TFS 2013 and I want to add them to the none default access level (ex. the full access group) but I noticed I am only able to do this through the web interface by adding a TFS Group under that certain level. I am wondering if there is a way to do this via the developer tool (command line) as everything I am doing is being done in a batch script.
Any input would be appreciated. Thanks!
Create 3 TFS server groups; add these groups to the different access levels (e.g. TFS_ACCESS_LEVEL_(NONE|STANDARD|FULL)). Now use the TFSSecurity commandline tool to add groups to these existing and mapped groups(tfssecurity /g+ TFS_ACCESS_LEVEL_NONE GroupYouWantToHaveThisAccessLevel). There is no other way to directly add people to the access levels, except probably through the Object Model using C#.
For the record, tfssecurity may require the URI, which can be obtained via API. This is easy to do in Powershell, here is how to create a TFS group
[psobject] $tfs = get-tfs -serverName $collection
$projectUri = ($tfs.CSS.ListAllProjects() | where { $_.Name -eq $project }).Uri
& $TFSSecurity /gc $projectUri $groupName $groupDescription /collection:$collection
Full script at TfsSecurity wrapper.

Cannot connect to AD using LDAP (VB.Net)

I'm writing code to connect to my Active Directory server using LDAP. I can connect using
LDAP://celtestdomdc1.celtestdom.local
but I can't connect using
LDAP://celtestdomdc1.celtestdom.local/CN=Users;DC=celtestdom
Am I using the wrong syntax or something?
Your LDAP string is wrong - use:
LDAP://celtestdomdc1.celtestdom.local/CN=Users,DC=celtestdom,DC=local
or even this (server-less binding - goes to the default DC)
LDAP://CN=Users,DC=celtestdom,DC=local
First, the parts need to be separated by comma (,) not semicolon - and second, you need to use the DC=.... for all DNS-parts of your domain.
<shameless plug>
Also you might want to look at my ADSI browser called Beavertail which is written in C# and 100% free and open-source. It will show you what your domain tree looks like and what the valid LDAP paths are.
</shameless plug>