diff --git a/docs/integrations/ldap/org.md b/docs/integrations/ldap/org.md index e7028f34f1..5b49e762a7 100644 --- a/docs/integrations/ldap/org.md +++ b/docs/integrations/ldap/org.md @@ -12,6 +12,14 @@ groups - directly from an LDAP compatible service. The result is a hierarchy of [`Group`](../../features/software-catalog/descriptor-format.md#kind-group) kind entities that mirror your org setup. +## Suported vendors + +Currently, Backstage only supports the following LDAP vendors: + +1. OpenLDAP (default) +2. Active Directory +3. FreeIPA + ## Installation This guide will use the Entity Provider method. If you for some reason prefer diff --git a/plugins/catalog-backend-module-ldap/src/ldap/client.ts b/plugins/catalog-backend-module-ldap/src/ldap/client.ts index a9283ecb94..d9d0faf9a2 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/client.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/client.ts @@ -23,6 +23,7 @@ import { errorString } from './util'; import { ActiveDirectoryVendor, DefaultLdapVendor, + FreeIpaVendor, LdapVendor, } from './vendors'; @@ -199,6 +200,8 @@ export class LdapClient { .then(root => { if (root && root.raw?.forestFunctionality) { return ActiveDirectoryVendor; + } else if (root && root.raw?.ipaDomainLevel) { + return FreeIpaVendor; } return DefaultLdapVendor; }) diff --git a/plugins/catalog-backend-module-ldap/src/ldap/vendors.ts b/plugins/catalog-backend-module-ldap/src/ldap/vendors.ts index 447df8aaa5..d2df250638 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/vendors.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/vendors.ts @@ -63,6 +63,16 @@ export const ActiveDirectoryVendor: LdapVendor = { }, }; +export const FreeIpaVendor: LdapVendor = { + dnAttributeName: 'dn', + uuidAttributeName: 'ipaUniqueID', + decodeStringAttribute: (entry, name) => { + return decode(entry, name, value => { + return value.toString(); + }); + }, +}; + // Decode an attribute to a consumer function decode( entry: SearchEntry,