New lemonldap-ng-cli subcommand: merge
Summary
I propose adding a new command in lemonldap-ng-cli
to do batch config modifications, very useful when adding complex configuration objects such as applications, or when installing a new instance
Design proposition
lemonldap-ng-cli merge myapp1.yaml [can specify more than one file, json/yaml is allowed]
myapp1.yaml
:
# Comments are allowed in YAML!
samlSPMetaDataExportedAttributes:
newsp:
myattr: "0;myattr"
samlSPMetaDataOptions:
newsp:
samlSPMetaDataOptionsCheckSLOMessageSignature: 0
samlSPMetaDataOptionsCheckSSOMessageSignature: 0
samlSPMetaDataOptionsEnableIDPInitiatedURL: 0
samlSPMetaDataOptionsEncryptionMode: none
samlSPMetaDataOptionsForceUTF8: 1
samlSPMetaDataOptionsNotOnOrAfterTimeout: 72000
samlSPMetaDataOptionsOneTimeUse: 0
samlSPMetaDataOptionsSessionNotOnOrAfterTimeout: 72000
samlSPMetaDataOptionsSignSLOMessage: -1
samlSPMetaDataOptionsSignSSOMessage: -1
samlSPMetaDataOptionsSignatureMethod: ""
samlSPMetaDataXML:
newsp:
samlSPMetaDataXML:|
<md:EntityDescriptor
... metadata here ...
</md:EntityDescriptor>
# Add application to menu
applicationList:
mycategory:
newapp:
options:
description: "My new application"
display: auto
logo: app.png
name: "My new application"
uri: "https://test3.example.com/"
order: 1
type: application
I use Hash::Merge::Simple to combine input files with existing configuration
Edited by Maxime Besson