LDAP রিসোর্স ম্যানেজ করা

প্রাইভেট ক্লাউডের জন্য Edge v4.18.05

যাচাইকরণ বা DN কোয়েরির জন্য LDAP নীতি ব্যবহার করার সময়, নীতিটি Apigee-সাইড LDAP রিসোর্স ব্যবহার করে, যার মধ্যে আপনার LDAP প্রদানকারীর সাথে কানেকশন সংক্রান্ত বিবরণ থাকে। এই বিভাগে API-এর মাধ্যমে কীভাবে LDAP রিসোর্স তৈরি ও ম্যানেজ করতে হয় তা বর্ণনা করা হয়েছে।

LDAP রিসোর্স তৈরি করা

LDAP রিসোর্স তৈরি করার জন্য API নিচে দেওয়া হল:

/v1/organizations/org_name/environments/environment/ldapresources

নিম্নলিখিত হল একটি টীকাযুক্ত XML পেলোড যা LDAP রিসোর্স কনফিগারেশন বর্ণনা করে যা আপনি রিসোর্স তৈরি করতে পাঠাবেন:

<LdapResource name="ldap1">
  <Connection>
    <Hosts>
      <Host port="636">foo.com</Host> <!-- port is optional: defaults to 389 for ldap:// and 636 for ldaps:// -->
    </Hosts>
    <SSLEnabled>false</SSLEnabled> <!-- optional, defaults to false -->
    <Version>3</Version> <!-- optional, defaults to 3-->
    <Authentication>simple</Authentication> <!-- optional, only simple supported -->
    <ConnectionProvider>jndi|unboundid</ConnectionProvider> <!-- required -->
    <ServerSetType>single|round robin|failover</ServerSetType> <!-- not applicable for jndi -->
    <LdapConnectorClass>com.custom.ldap.MyProvider</LdapConnectorClass> <!-- If using a custom LDAP provider, the fully qualified class -->
  </Connection>
  <ConnectPool enabled="true"> <!-- enabled is optional, defaults to true -->
    <Timeout>30000</Timeout> <!-- optional, in milliseconds; if not set, no timeout -->
    <Maxsize>50</Maxsize> <!-- optional; if not set, no max connections -->
    <Prefsize>30</Prefsize> <!-- optional; if not set, no pref size -->
    <Initsize></Initsize> <!-- optional; if not set, defaults to 1 -->
    <Protocol></Protocol> <!-- optional; if not set, defaults to 'ssl plain' -->
  </ConnectPool>
  <Admin>
    <DN>cn=admin,dc=apigee,dc=com</DN>
    <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}:{password} -d \
  '<LdapResource name="ldap1">
    <Connection>
      <Hosts>
        <Host>foo.com</Host>
      </Hosts>
      <SSLEnabled>false</SSLEnabled>
      <Version>3</Version>
      <Authentication>simple</Authentication>
      <ConnectionProvider>unboundid</ConnectionProvider>
      <ServerSetType>round robin</ServerSetType>
    </Connection>
    <ConnectPool enabled="true">
      <Timeout>30000</Timeout>
      <Maxsize>50</Maxsize>
      <Prefsize>30</Prefsize>
      <Initsize></Initsize>
      <Protocol></Protocol>
    </ConnectPool>
    <Admin>
      <DN>cn=admin,dc=apigee,dc=com</DN>
      <Password>secret</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:password -d \
  '<LdapResource name="ldap1">
    <Connection>
      <Hosts>
        <Host>foo.com</Host>
      </Hosts>
      <SSLEnabled>false</SSLEnabled>
      <Version>3</Version>
      <Authentication>simple</Authentication>
      <ConnectionProvider>unboundid</ConnectionProvider>
      <ServerSetType>round robin</ServerSetType>
    </Connection>
    <ConnectPool enabled="true">
      <Timeout>50000</Timeout>
      <Maxsize>50</Maxsize>
      <Prefsize>30</Prefsize>
      <Initsize></Initsize>
      <Protocol></Protocol>
    </ConnectPool>
    <Admin>
      <DN>cn=admin,dc=apigee,dc=com</DN>
      <Password>secret</Password>
    </Admin>
  </LdapResource>'

LDAP রিসোর্স মুছে দেওয়া

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