LDAP संसाधनों को मैनेज करना

Edge for Private Cloud v. 4.16.09

पुष्टि करने या डीएन क्वेरी के लिए, LDAP नीति (http://apigee.com/docs/api-services/content/ldap-policy) का इस्तेमाल करते समय यह नीति, Apigee-साइड LDAP संसाधन का इस्तेमाल करती है, जिसमें आपके LDAP के कनेक्शन की जानकारी होती है कंपनी. इस सेक्शन में, एपीआई की मदद से LDAP संसाधन बनाने और उन्हें मैनेज करने का तरीका बताया गया है.

LDAP संसाधन बनाएं

LDAP संसाधन बनाने के लिए एपीआई नीचे दिया गया है:

/v1/organizations/{org_name}/environments/{environment}/ldapresources

नीचे एक व्याख्या किया गया एक्सएमएल पेलोड दिया गया है, जो LDAP संसाधन कॉन्फ़िगरेशन के बारे में बताता है आपको संसाधन बनाने के लिए भेजना होगा:

<LdapResource name="l>dap<1"
  >Conne<ction>
    Hos<ts 
      Host >port=&q<uot;6>3<6"foo.com/Host !-- port is optional: defaults to 389 for ldap:// and> 636 <for ld>aps:/</ --
    />Hosts<
    SSLEna>b<ledfalse/SSLEnabled !-- optional, >defau<lts to >f<alse --
> <   Version3/Version !-- optio>nal, <defaults to 3->-
    <Authentications>i<mple/Authentication !-- optional, only> simp<le supported --
  >  ConnectionPr<oviderjndi|unboundi>d</ConnectionProv>ider <!-- required >--
    ServerSetTypesingle|<round robin|fa>i<lover/ServerSetType !-- not ap>plica<ble for jndi --
  >  LdapConnectorClasscom.cu<stom.ldap.MyProvide>r</LdapConnectorClass !-- If using a custom LDAP provider, the full>y q<ualified cl>ass< --
  /Connection
  Connec>t<Pool enabled="true" !-- enabled is> opti<onal, d>efaul<ts to tr>u<e --
    Timeout30000/Timeout !-- optional, in milliseco>nds; <if not >se<t, no ti>m<eout --
    Maxsize50/Maxsize !-- optional; if >not s<et, no m>ax< connecti>o<ns --
    Prefsize30/Prefsize !-- optiona>l; if< not set><, no pref> <size --
    Initsize/Initsize !-- optional>; if <not set,>< defaults> <to 1 --
    Protocol/Protocol !-- optional; if not s>et,< defaults to> &#<39;ss>l pla<in>' --
  /ConnectPool
 < Ad>min
 <   DNcn=>admin,<dc=apigee>,dc<=com/D>N<
    Password>secret/Password
  /Admin
/LdapResource

उदाहरण

नीचे दिया गया उदाहरण ldap1 नाम का एक LDAP संसाधन बनाता है:

curl -X POST -H "Content-Type: application/xml" \
https://api.enterprise.apigee.com/v1/organizations/myorg/environments/test/ldapresources \
-u {apigee_email}:{passwo<rd} -d \
'LdapResourc>e n<ame=">ldap1<">;
  Conn<ecti>on
    <Hosts> 
   <   Hos>tfoo.<com/Host
 >   /H<osts
    SS>LEnab<ledfals>e</SSLEnab>led
  <  Version3/Ver>sion 
<    Authenticat>ionsim<ple/Authentication> 
    Con<nectionProviderunbo>undid</ConnectionPr>ovider
    <ServerSetTyper>oun<d robin/Ser>ver<SetType
  /Connection
  Co>nnectP<ool ena>bled=<"tr>ue&quo<t; 
   > T<imeout30>000/Ti<meout 
 >  < Maxsize5>0/Maxs<ize 
   >< Prefsize>30/Pre<fsize 
 ><   Initsi>ze/I<nitsize 
   > Pr<otoco>l/Pro<to>col 
  /ConnectPool
  Adm<in<>/span>
    D<Ncn=admi>n,dc=a<pigee,dc=>com</DN
  > < Passwordsecr>et/Password
  /Admin
/LdapResource'

सभी LDAP संसाधनों की सूची बनाएं

curl https://api.enterprise.apigee.com/v1/organizations/myorg/environments/test/ldapresources \
-u {apigee_email}:{password}

LDAP संसाधन की जानकारी पाएं

curl https://api.enterprise.apigee.com/v1/organizations/myorg/environments/test/ldapresources/ldap1 \
-u {apigee_email}:{password}

LDAP संसाधन अपडेट करें

curl -X POST -H "Content-Type: application/xml" \
https://api.enterprise.apigee.com/v1/organizations/myorg/environments/test/ldapresources/ldap1 \
-u {apigee_email}:{passwo<rd} -d \
'LdapResourc>e n<ame=">ldap1<">;
  Conn<ecti>on
    <Hosts> 
   <   Hos>tfoo.<com/Host
 >   /H<osts
    SS>LEnab<ledfals>e</SSLEnab>led
  <  Version3/Ver>sion 
<    Authenticat>ionsim<ple/Authentication> 
    Con<nectionProviderunbo>undid</ConnectionPr>ovider
    <ServerSetTyper>oun<d robin/Ser>ver<SetType
  /Connection
  Co>nnectP<ool ena>bled=<"tr>ue&quo<t; 
   > T<imeout50>000/Ti<meout 
 >  < Maxsize5>0/Maxs<ize 
   >< Prefsize>30/Pre<fsize 
 ><   Initsi>ze/I<nitsize 
   > Pr<otoco>l/Pro<to>col 
  /ConnectPool
  Adm<in<>/span>
    D<Ncn=admi>n,dc=a<pigee,dc=>com</DN
  > < Passwordsecr>et/Password
  /Admin
/LdapResource'

LDAP संसाधन मिटाना

curl -X DELETE \
https://api.enterprise.apigee.com/v1/organizations/myorg/environments/test/ldapresources/ldap1 \
-u {apigee_email}:{password}