can i get json file by which i can create a new ldap connection in nexus3. I wanted to do automatic ldap configuration by using dockerfile.Can someone help me on this urgently
--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/e0baa01c-5d4e-4f13-89a3-ceec86ef81c5%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.
Regards,Anyway, for the particular case that you mention, the JSON should look similar to:Hi,You can easily obtain the JSON data with basic tools like Chrome Developer Tools, by checking the POST to "http://<your-nexus-base-url>/service/extdirect" whenever you save the LDAP configuration via the admin panel.
{ "action":"create", "method':'ldap_LdapServer", "data":[{ "id":"", "name":"LDAP", "protocol":"ldap", "host":"", "port":, "searchBase":"", "authScheme":"simple", "authUsername":"", "authPassword":"", "connectionTimeout":30, "connectionRetryDelay":300, "maxIncidentsCount":5, "combo-1687-inputEl":"Active Directory", "userBaseDn":"", "userSubtree":true, "userObjectClass":"person", "userLdapFilter":"", "userIdAttribute":"sAMAccountName", "userRealNameAttribute":"cn", "userEmailAddressAttribute":"mail", "userPasswordAttribute":"", "ldapGroupsAsRoles":true, "groupType":"static", "groupBaseDn":"", "groupSubtree":false, "groupObjectClass":"group", "groupIdAttribute":"sAMAccountName", "groupMemberAttribute":"member", "groupMemberFormat":"${dn}" }] "type":"rpc", "tid":26 }
2017-05-08 11:16 GMT+02:00 Gajendra Mani Tripathi <gajendra.t...@gmail.com>:
can i get json file by which i can create a new ldap connection in nexus3. I wanted to do automatic ldap configuration by using dockerfile.Can someone help me on this urgently
--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/a069a614-efbc-49bd-accf-7d5d5108f24d%40glists.sonatype.com.
You must use POST.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/f2e557b2-144c-4505-8dbc-b731b8727846%40glists.sonatype.com.
{ "name": "ldapConfig", "connection": { "host": { "protocol": "ldap|s", "hostName": "ldap.yourdomain.ext", "port": 389 }, "maxIncidentsCount": 3, "connectionRetryDelay": 300, "connectionTimeout": 15, "searchBase": "DC=yourdomain,DC=ext", "authScheme": "simple", "systemUsername": "CN=username,CN=Users,DC=yourdomain,DC=ext", "systemPassword": "password" }, "mapping": { "userBaseDn": "OU=Users group", "userSubtree": true, "userObjectClass": "user", "userIdAttribute": "sAMAccountName", "userPasswordAttribute": "", "userRealNameAttribute": "displayName", "emailAddressAttribute": "mail", "ldapGroupsAsRoles": true, "userMemberOfAttribute": "memberOf" }}import org.sonatype.nexus.ldap.persist.*
import org.sonatype.nexus.ldap.persist.entity.*
import groovy.json.JsonSlurper
def ldap = new JsonSlurper().parseText(args)
log.info("Configuring LDAP Connection.")
def manager = container.lookup(LdapConfigurationManager.class.name)
manager.addLdapServerConfiguration(
new org.sonatype.nexus.ldap.persist.entity.LdapConfiguration(ldap)
)