54ef88a6fa
* rework Root DSE Signed-off-by: Jens Langhammer <jens@goauthentik.io> * always parse filter objectClass Signed-off-by: Jens Langhammer <jens@goauthentik.io> * start adding LDAP Schema Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add more schema Signed-off-by: Jens Langhammer <jens@goauthentik.io> * update schema more Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix cn for schema Signed-off-by: Jens Langhammer <jens@goauthentik.io> * only include main DN in namingContexts Signed-off-by: Jens Langhammer <jens@goauthentik.io> * use schema from gh Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add description Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add response filtering Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix response filtering Signed-off-by: Jens Langhammer <jens@goauthentik.io> * don't return rootDSE entry when searching for singleLevel Signed-off-by: Jens Langhammer <jens@goauthentik.io> * remove currentTime Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix attribute filtering Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * set SINGLE-VALUE Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix numbers Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
83 lines
1.6 KiB
Go
83 lines
1.6 KiB
Go
package constants
|
|
|
|
const OC = "objectClass"
|
|
|
|
const (
|
|
OCTop = "top"
|
|
OCDomain = "domain"
|
|
OCNSContainer = "nsContainer"
|
|
OCSubSchema = "subschema"
|
|
)
|
|
|
|
const (
|
|
SearchAttributeNone = "1.1"
|
|
SearchAttributeAllUser = "*"
|
|
SearchAttributeAllOperational = "+"
|
|
)
|
|
|
|
const (
|
|
OCGroup = "group"
|
|
OCGroupOfUniqueNames = "groupOfUniqueNames"
|
|
OCGroupOfNames = "groupOfNames"
|
|
OCAKGroup = "goauthentik.io/ldap/group"
|
|
OCAKVirtualGroup = "goauthentik.io/ldap/virtual-group"
|
|
OCPosixGroup = "posixGroup"
|
|
)
|
|
|
|
const (
|
|
OCUser = "user"
|
|
OCOrgPerson = "organizationalPerson"
|
|
OCInetOrgPerson = "inetOrgPerson"
|
|
OCAKUser = "goauthentik.io/ldap/user"
|
|
OCPosixAccount = "posixAccount"
|
|
)
|
|
|
|
const (
|
|
OUUsers = "users"
|
|
OUGroups = "groups"
|
|
OUVirtualGroups = "virtual-groups"
|
|
)
|
|
|
|
func GetDomainOCs() map[string]bool {
|
|
return map[string]bool{
|
|
OCTop: true,
|
|
OCDomain: true,
|
|
}
|
|
}
|
|
|
|
func GetContainerOCs() map[string]bool {
|
|
return map[string]bool{
|
|
OCTop: true,
|
|
OCNSContainer: true,
|
|
}
|
|
}
|
|
|
|
func GetUserOCs() map[string]bool {
|
|
return map[string]bool{
|
|
OCUser: true,
|
|
OCOrgPerson: true,
|
|
OCInetOrgPerson: true,
|
|
OCAKUser: true,
|
|
OCPosixAccount: true,
|
|
}
|
|
}
|
|
|
|
func GetGroupOCs() map[string]bool {
|
|
return map[string]bool{
|
|
OCGroup: true,
|
|
OCGroupOfUniqueNames: true,
|
|
OCGroupOfNames: true,
|
|
OCAKGroup: true,
|
|
OCPosixGroup: true,
|
|
}
|
|
}
|
|
|
|
func GetVirtualGroupOCs() map[string]bool {
|
|
return map[string]bool{
|
|
OCGroup: true,
|
|
OCGroupOfUniqueNames: true,
|
|
OCGroupOfNames: true,
|
|
OCAKVirtualGroup: true,
|
|
}
|
|
}
|