@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-ldap': minor
|
||||
---
|
||||
|
||||
Add new ldap vendor config 'LLDAP'
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
ActiveDirectoryVendor,
|
||||
DefaultLdapVendor,
|
||||
GoogleLdapVendor,
|
||||
LLDAPVendor,
|
||||
FreeIpaVendor,
|
||||
LdapVendor,
|
||||
} from './vendors';
|
||||
@@ -248,6 +249,8 @@ export class LdapClient {
|
||||
return AEDirVendor;
|
||||
} else if (clientHost === 'ldap.google.com') {
|
||||
return GoogleLdapVendor;
|
||||
} else if (root && root.raw?.vendorName?.toString() === 'LLDAP') {
|
||||
return LLDAPVendor;
|
||||
}
|
||||
return DefaultLdapVendor;
|
||||
})
|
||||
|
||||
@@ -94,6 +94,16 @@ export const GoogleLdapVendor: LdapVendor = {
|
||||
},
|
||||
};
|
||||
|
||||
export const LLDAPVendor: LdapVendor = {
|
||||
dnAttributeName: 'dn',
|
||||
uuidAttributeName: 'entryuuid',
|
||||
decodeStringAttribute: (entry, name) => {
|
||||
return decode(entry, name.toLocaleLowerCase('en-US'), value => {
|
||||
return value.toString();
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
// Decode an attribute to a consumer
|
||||
function decode(
|
||||
entry: SearchEntry,
|
||||
|
||||
Reference in New Issue
Block a user