LdifToIon
yaml
type: "io.kestra.plugin.ldap.LdifToIon"
Ionise LDIF entries.
Transform .ldif files to .ion ones.
Examples
Make ION entries from LDIF ones.
yaml
id: ldap_ldif_to_ion
namespace: company.team
inputs:
- id: file1
type: FILE
- id: file2
type: FILE
tasks:
- id: ldif_to_ion
type: io.kestra.plugin.ldap.LdifToIon
inputs:
- "{{ inputs.file1 }}"
- "{{ inputs.file2 }}"
INPUT example : here's an LDIF file content that may be inputted :
yaml
id: "ldif_to_ion"
type: "io.kestra.plugin.ldap.LdifToIon"
# simple entry
dn: cn=bob@orga.com,ou=diffusion_list,dc=orga,dc=com
description: Some description
someOtherAttribute: perhaps
description: Some other description
someOtherAttribute: perhapsAgain
# modify changeRecord
dn: cn=triss@orga.com,ou=diffusion_list,dc=orga,dc=com
changetype: modify
delete: description
description: Some description 3
-
add: description
description: Some description 4
-
replace: someOtherAttribute
someOtherAttribute: Loves herself more
-
# delete changeRecord
dn: cn=triss@orga.com,ou=diffusion_list,dc=orga,dc=com
changetype: delete
# moddn and modrdn are equals, what's mandatory is to specify in the following order : newrdn -> deleteoldrdn -> (optional) newsuperior
dn: cn=triss@orga.com,ou=diffusion_list,dc=orga,dc=com
changetype: modrdn
newrdn: cn=triss@orga.com
deleteoldrdn: 0
newsuperior: ou=expeople,dc=example,dc=com
# moddn without new superior
dn: cn=triss@orga.com,ou=diffusion_list,dc=orga,dc=com
changetype: moddn
newrdn: cn=triss@orga.com
deleteoldrdn: 1
OUTPUT example : here's an ION file content that may be outputted :
yaml
id: "ldif_to_ion"
type: "io.kestra.plugin.ldap.LdifToIon"
# simple entry
{dn:"cn=bob@orga.com,ou=diffusion_list,dc=orga,dc=com",attributes:{description:["Some description","Some other description"],someOtherAttribute:["perhaps","perhapsAgain"]}}
# modify changeRecord
{dn:"cn=triss@orga.com,ou=diffusion_list,dc=orga,dc=com",changeType:"modify",modifications:[{operation:"DELETE",attribute:"description",values:["Some description 3"]},{operation:"ADD",attribute:"description",values:["Some description 4"]},{operation:"REPLACE",attribute:"someOtherAttribute",values:["Loves herself more"]}]}
# delete changeRecord
{dn:"cn=triss@orga.com,ou=diffusion_list,dc=orga,dc=com",changeType:"delete"}
# moddn changeRecord (it is mandatory to specify a newrdn and a deleteoldrdn)
{dn:"cn=triss@orga.com,ou=diffusion_list,dc=orga,dc=com",changeType:"moddn",newDn:{newrdn:"cn=triss@orga.com",deleteoldrdn:false,newsuperior:"ou=expeople,dc=example,dc=com"}}
# moddn changeRecord without new superior (it is optional to specify a new superior field)
{dn:"cn=triss@orga.com,ou=diffusion_list,dc=orga,dc=com",changeType:"moddn",newDn:{newrdn:"cn=triss@orga.com",deleteoldrdn:true}}
Properties
inputs
- Type: array
- SubType: string
- Dynamic: ✔️
- Required: ✔️
URI(s) of file(s) containing LDIF entries.
Outputs
urisList
- Type: array
- SubType: string
- Required: ❌
URI(s) of ION translated file(s).
Definitions
Was this page helpful?