xref: /openbmc/phosphor-user-manager/docs/README.md (revision e7d4559b0173596f29ceb5ba7da653b023067783)
11a80ae5aSGeorge Liu# phosphor-user-manager
21a80ae5aSGeorge Liu
323886efdSRatan Gupta## To Build
437d26c0fSPatrick Williams
523886efdSRatan GuptaTo build this package, do the following steps:
623886efdSRatan Gupta
734eb585cSGeorge Liu```sh
840419f91SRavi Teja    1. meson build
940419f91SRavi Teja    2. ninja -C build
1023886efdSRatan Gupta```
1123886efdSRatan Gupta
12*e7d4559bSGeorge Liu### LDAP Configuration
1323886efdSRatan Gupta
1423886efdSRatan Gupta#### Configure LDAP
1523886efdSRatan Gupta
1634eb585cSGeorge Liu```sh
173ab6cc28SJoseph Reynoldscurl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d '{"data":[false,"ldap://<ldap://<LDAP server ip/hostname>/", "<bindDN>", "<baseDN>","<bindDNPassword>","<searchScope>","<serverType>"]}''  https://$BMC_IP/xyz/openbmc_project/user/ldap/action/CreateConfig
1823886efdSRatan Gupta
1923886efdSRatan Gupta```
2037d26c0fSPatrick Williams
2123886efdSRatan Gupta#### NOTE
2237d26c0fSPatrick Williams
2337d26c0fSPatrick WilliamsIf the configured ldap server is secure then we need to upload the client
2437d26c0fSPatrick Williamscertificate and the CA certificate in following cases.
2537d26c0fSPatrick Williams
2623886efdSRatan Gupta- First time LDAP configuration.
2723886efdSRatan Gupta- Change the already configured Client/CA certificate
2823886efdSRatan Gupta
2923886efdSRatan Gupta#### Upload LDAP Client Certificate
3023886efdSRatan Gupta
3134eb585cSGeorge Liu```sh
3223886efdSRatan Guptacurl -c cjar -b cjar -k -H "Content-Type: application/octet-stream"
3323886efdSRatan Gupta     -X PUT -T <FILE> https://<BMC_IP>/xyz/openbmc_project/certs/client/ldap
3423886efdSRatan Gupta```
3523886efdSRatan Gupta
3623886efdSRatan Gupta#### Upload CA Certificate
3723886efdSRatan Gupta
3834eb585cSGeorge Liu```sh
3923886efdSRatan Guptacurl -c cjar -b cjar -k -H "Content-Type: application/octet-stream"
4023f82c1eSMichal Orzel     -X PUT -T <FILE> https://<BMC_IP>/xyz/openbmc_project/certs/authority/truststore
4123886efdSRatan Gupta```
4223886efdSRatan Gupta
4323886efdSRatan Gupta#### Clear LDAP Config
4423886efdSRatan Gupta
4534eb585cSGeorge Liu```sh
4623886efdSRatan Guptacurl -b cjar -k -H "Content-Type: application/json" -X POST -d '{"data":[]}' https://$BMC_IP/xyz/openbmc_project/user/ldap/config/action/delete
4723886efdSRatan Gupta```
4823886efdSRatan Gupta
4923886efdSRatan Gupta#### Get LDAP Config
5023886efdSRatan Gupta
5134eb585cSGeorge Liu```sh
5223886efdSRatan Guptacurl -b cjar -k https://$BMC_IP/xyz/openbmc_project/user/ldap/enumerate
5323886efdSRatan Gupta```
54