Add support for FreeIPA as an LDAP vendor
Signed-off-by: Marc Rooding <marc@mrooding.me>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
})
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user