Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation:latest:cli_examples [2019/05/17 14:53]
coudot [Configure SAML Identity Provider]
documentation:latest:cli_examples [2019/11/22 19:21] (current)
Line 2: Line 2:
  
 This page shows some examples of LL::NG Command Line Interface. See [[configlocation#​command_line_interface_cli|how to use the command]]. This page shows some examples of LL::NG Command Line Interface. See [[configlocation#​command_line_interface_cli|how to use the command]].
 +
 +===== Save/​restore configuration =====
 +
 +This part requires LLNG 2.0.5 at least.
 +
 +Save:
 +<code sh>
 +/​usr/​share/​lemonldap-ng/​bin/​lemonldap-ng-cli save >​config.json
 +</​code>​
 +
 +Restore:
 +<code shell>
 +/​usr/​share/​lemonldap-ng/​bin/​lemonldap-ng-cli restore config.json
 +# Or
 +/​usr/​share/​lemonldap-ng/​bin/​lemonldap-ng-cli restore - <​config.json
 +</​code>​
  
 ===== Configure HTTPS ===== ===== Configure HTTPS =====
Line 11: Line 27:
     set \     set \
         portal https://​auth.example.com \         portal https://​auth.example.com \
 +        mailUrl https://​auth.example.com/​resetpwd \
 +        registerUrl https://​auth.example.com/​register \
         https 1 \         https 1 \
         securedCookie 1         securedCookie 1
Line 189: Line 207:
 </​code>​ </​code>​
  
-Import them in configuration:​+Fix the certificate key format (you can skip this step if you are running >= 2.0.6)
 <​code>​ <​code>​
-/usr/share/lemonldap-ng/bin/lemonldap-ng-cli -yes 1 +sed -e "s/END PRIVATE/END RSA PRIVATE/" \ 
-    ​set \ +    ​-e "s/BEGIN PRIVATE/BEGIN RSA PRIVATE/" ​
-        samlServicePrivateKeySig "​`cat ​saml.key`" \ +    ​-i saml.key
-        samlServicePublicKeySig "`cat saml.pem`"​+
 </​code>​ </​code>​
  
-Activate ​the SAML Issuer:+Import them in configuration and activate ​the SAML issuer
 <​code>​ <​code>​
 /​usr/​share/​lemonldap-ng/​bin/​lemonldap-ng-cli -yes 1 \ /​usr/​share/​lemonldap-ng/​bin/​lemonldap-ng-cli -yes 1 \
     set \     set \
 +        samlServicePrivateKeySig "`cat saml.key`"​ \
 +        samlServicePublicKeySig "`cat saml.pem`"​ \
         issuerDBSAMLActivation 1         issuerDBSAMLActivation 1
 </​code>​ </​code>​
Line 329: Line 348:
 </​code>​ </​code>​
  
 +===== Encryption key =====
 +
 +To update the master encryption key:
 +<​code>​
 +/​usr/​share/​lemonldap-ng/​bin/​lemonldap-ng-cli -yes 1 \
 +    set \
 +        key '​xxxxxxxxxxxxxxx'​
 +</​code>​