22 Commits

Author SHA1 Message Date
Andy Ning
8b59e0c8bc Add ppolicy-check-password library for ldap on Debian
This change added ppolicy-check-password package from
https://github.com/cedric-dufour/ppolicy-check-password

This package contains check_password.so that is used by ldap
to enforce password complexity for ldap users.

Test Plan for Debian:
PASS: package build, image build
PASS: system bootstrap, controller unlock
PASS: after controller unlock, login by "admin" user on
      console, and su to "admin" on ssh session.
PASS: failure path with incompliant passwords for ldap user
      password change (eg, change password when first login)

Story: 2009101
Task: 44864
Signed-off-by: Andy Ning <andy.ning@windriver.com>
Change-Id: If5a1e5c6784c7354c0a4903e1d1c4abb21d8a01f
2022-03-28 10:47:00 -04:00
Zuul
52093f16ab Merge "meta_data.yaml: add sha256sum checksum" 2022-03-09 22:54:45 +00:00
Andy Ning
fc13f4db8b Change openldap pid and args file location for Debian
Change openldap pid and args file location from /var/run/slapd
to /run so it's aligned with CentOS. This will enable openldap
to be managed by SM.

Test Plan for Debian:
PASS: package build, image build
PASS: system boostrap
PASS: controller unlock, open-ldap service state in SM is
      enabled-active enabled-active

Story: 2009101
Task: 44664
Signed-off-by: Andy Ning <andy.ning@windriver.com>
Change-Id: I108a63d5b829b66ef24516f9e2c33fde0288f9a8
2022-03-03 11:41:22 -05:00
Yue Tao
4a709349a9 meta_data.yaml: add sha256sum checksum
Test Plan:
Pass: Verify sha256sum checksum via "download -s"

Story: 2008846
Task: 44578

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Change-Id: I78d9dff2af0afb18c6db4e8d2d39ef79b5cf5864
2022-03-03 14:30:40 +08:00
Zuul
bba2bc0ace Merge "Add debian package for ldapscripts" 2021-11-23 18:18:46 +00:00
Yue Tao
39bc6c35f1 Add debian package for ldapscripts
Porting all CentOS patches, and also align the file permission
with CentOS.

Test Plan: Verify the building, installing and booting test

PASS: Verify package build
PASS: Verify system install
PASS: Verify system boot

Story: 2009221
Task: 43415
Signed-off-by: Yue Tao <yue.tao@windriver.com>
Change-Id: I7766d4aa26420c6f701a0dffaa7e9bf6b77e0c75
2021-11-23 08:48:30 +08:00
Yue Tao
2821680c8b Add debian package for openldap
Ported all patches from CentOS.
Ported patch rootdn-should-not-bypass-ppolicy.patch + deleted unit test for it.

meta_data patches were not needed as they were only modifying the rpm spec.

Disabled unit tests part of debian build.
Ran the unit tests once before disabling and they pass.

Story: 2009221
Task: 43407
Signed-off-by: Yue Tao <yue.tao@windriver.com>
Change-Id: Ia0b640c5cd2594daae5722b1c9743a3a800485ab
2021-10-18 13:41:34 +08:00
Dongqi Chen
af359d4938 Add auto-versioning to starlingx/integ packages
This update makes use of the PKG_GITREVCOUNT variable
to auto-version the packages in this repo.

Story: 2007750
Task: 39951
Change-Id: I854419c922b9db4edbbf6f1e987a982ec2ec7b59
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
2020-06-24 09:48:28 +08:00
Scott Little
e80813bb81 Relocated some packages to repo 'config-files'
List of relocated subdirectories:

base/centos-release-config
base/dhcp-config
base/dnsmasq-config
base/haproxy-config
base/initscripts-config
base/lighttpd-config
base/net-snmp-config
base/openssh-config
base/setup-config
base/systemd-config
config-files/audit-config
config-files/docker-config
config-files/io-scheduler
config-files/iptables-config
config-files/memcached-custom
config-files/ntp-config
config-files/pam-config
config-files/rsync-config
config-files/shadow-utils-config
config-files/sudo-config
config-files/syslog-ng-config
config-files/util-linux-config
filesystem/filesystem-scripts
filesystem/iscsi-initiator-utils-config
filesystem/nfs-utils-config
ldap/openldap-config
logging/logrotate-config
networking/mellanox/mlx4-config
networking/openvswitch-config

Story: 2006166
Task: 35687
Depends-On: I665dc7fabbfffc798ad57843eb74dca16e7647a3
Change-Id: I3dc0fc9f88931c5e0963d00274408ff7a16fae3a
Signed-off-by: Scott Little <scott.little@windriver.com>
Depends-On: I761b0f76150881c765b70b2ccd255244c754bd5d
2019-09-05 20:32:09 -04:00
Saul Wold
83c6575d51 integ: Convert wrsroot -> sysadmin
This also changes the group wrs_protected to sys_protected
to de-brand the user and group names.

Depends-On: I887464a20fc17d66529caea03be2b445156f9426
Change-Id: Ic2ea06d3ac15c31854a604af5f4cecf9094fcaea
Story: 2004716
Task: 28748
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-06-14 15:09:09 -07:00
Erich Cordoba
6bfca507bd Add notices to Intel authored files.
Story: 2005265
Task:  30090

Change-Id: I7cc22cf39d971fbf7fa149b89a892de27b8e6b64
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-03-20 10:31:10 -06:00
Zhe Hu
eb96c9a6e9 rebase openldap patch to CentOS 7.6 version
Test:
Pass build and simplex deploy test

Depends-On: https://review.openstack.org/626503

Story: 2004522
Task: 28398

Change-Id: If4ba828526724f7888a39d9bb5fb15cd7c6c5815
Signed-off-by: Zhe Hu <zhe.hu@intel.com>
2018-12-25 09:12:05 +08:00
zhipengl
beec03a095 Remove hardcoded configure options for openldap
The openldap-spec-file.patch contains some modifications to the
default configure command line.
After evaluated by Saul in task 27731, we should be able to remove
the part of configure options change in this patch. 
However, it seems still some other changes in this patch could not be
removed, so the patch could not be reverted so far.

Deployment test pass and slapd service works.

Story: 2004216
Task: 28015

Signed-off-by: zhipengl <zhipengs.liu@intel.com>

Change-Id: I55e4961bf2ceb69bb0592f3fb34b4fded3a2e8fd
2018-12-04 08:21:31 +00:00
zhipengl
462fa4fc08 Refactor patches for nss-pam-ldapd package
The change of 3 meta patches refers to %post section in spec file.
The comment in the patch mentions that we don't want change our custom
binddn and bindpw in nslcd.conf.
However, in spec file, "source" variabe could not be assigned to a valid
file name, as we could not find these *.conf files in /etc/ folder.

if test -s /etc/nss-ldapd.conf ; then
        source=/etc/nss-ldapd.conf
elif test -s /etc/nss_ldap.conf ; then
        source=/etc/nss_ldap.conf
elif test -s /etc/pam_ldap.conf ; then
        source=/etc/pam_ldap.conf
else
        source=/etc/ldap.conf

So it will not change nslcd.conf even if we do not remove
below code.

if grep -E -q '^base[[:blank:]]' $source 2> /dev/null ; then
     # Comment out the packaged default base and replace it.
        sed -i -r -e 's,^(base[[:blank:]].*),# \1,g' $target
        grep -E '^base[[:blank:]]' $source >> $target
fi

grep -E '^(binddn|bindpw|port|scope|ssl|pagesize)[[:blank:]]'
   $source 2> /dev/null >> $target

We can use RPM instead of SRPM for nss-pam-ldapd package,
since related patches are not used anymore.

Deployment test pass.

Story: 2003768
Task: 28045
Depends-on: https://review.openstack.org/#/c/619976/

Change-Id: Ia4fa723d1a6ff9a7a8059fc2db1afec640ea41b1
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
2018-11-28 02:25:22 +00:00
slin14
822420e2d3 refactor openldap
Package openldap-config is added to config customized config file
of openldap.

Here is the customized change in slapd.service:
"
-After=syslog.target network-online.target
+Before=rsyncd.service
+After=network.target syslog-ng.target

-PIDFile=/var/run/openldap/slapd.pid
+PIDFile=/var/run/slapd.pid

-ExecStart=/usr/sbin/slapd -u ldap -h ${SLAPD_URLS} $SLAPD_OPTIONS
+ExecStart=/etc/init.d/openldap start
+ExecStop=/etc/init.d/openldap stop
+ExecReload=/etc/init.d/openldap restart
+RemainAfterExit=yes
"
Here is the customized change in slapd.sysconfig:
"
-#SLAPD_OPTIONS=""
+SLAPD_OPTIONS=""
"

Test:
Pass build and multi node deploy test. Confirmed related config
file is the same as before in deploy node.

Story: 2003768
Task: 26462
Depends-On: https://review.openstack.org/618440

Change-Id: I2559a8e43619449d6179ed913181052d653fa91d
Signed-off-by: slin14 <shuicheng.lin@intel.com>
2018-11-19 23:29:42 +08:00
slin14
6a6ea416e1 remove lshell
There is security related issue with lshell, and it is not
maintained now. So remove it from our system to avoid
security issue.

To remove lshell:
1. Package sudo-config is created for wrs.sudo configure file
following the refactor process.
2. ldapusersetup in ldapscripts is modified to use bash only.
lshell support is removed.

ldapusersetup related patches are merged into 1 for easy
maintenance.

Test has been done:
Build and deploy test is done, also unit tests for ldap are
executed with pass, except lshell related test.

Closes-Bug: 1795451

Change-Id: Ia5de1bc94d22eb6c9bea6d9a96e92564ad848b19
Signed-off-by: slin14 <shuicheng.lin@intel.com>
2018-10-30 02:22:54 +08:00
Sun Austin
5514b84469 de-fuzz nss-pam-ldapd patches
Problem:
- Centos 7.5 upgraded nss-pam-ldapds.
- Porting of nss-pam-ldapds patches did not resolve and 'fuzz' in the line
  numbers of the patches.
- If nss-pam-ldapd is built by rpm 4.11, or default version of rpm
  until 4.14 is compiled, a fuzzy patch results in the creating
  of an .orig file.
- Packaging of nss-pam-ldapds failes due to the unexpected, and
  unpackaged .orig file

Solution:
  Safest solution is to de-fuzz our nss-pam-ldapds patches.

Story: 2003389
Task: 26755

Change-Id: I82092c3ff4d7cf711d0e1542e61bccb491bd8388
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-09-28 09:01:42 +08:00
zhipengl
d501c0be15 upgrade nss-pam-ldapd to CentOS 7.5 version
Story: 2003389
Task: 24502

Change-Id: Ibf2db2bfcefd8b4102eb6c93036024203e415ebd
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
2018-08-27 06:35:56 +00:00
slin14
b76800636e rebase openldap patch to CentOS7.5
Story: 2003389
Task: 24468

Change-Id: Ib9e04a1fa46ef10dd3f63c2ec386f03dea1585e3
Signed-off-by: slin14 <shuicheng.lin@intel.com>
2018-08-27 03:01:20 +00:00
Kam Nasim
8c1837205d Multi-Region: Support shared LDAP service
Decouple NSLCD from the open-ldap SM service and manage it by PMOND
instead. This is needed because in the Shared LDAP case, we deprovision
the open-ldap service on the Secondary Region which renders NSLCD
unmanaged.

Additionally, we allow the Secondary Region or Sub Clouds to bind
anonymously, but still need to support LDAP read operations in these
regions such as ldapfinger or lsldap. For this purpose, the ldapscripts
runtime library has been modified to allow anonymous binds during LDAP
search operations.

Change-Id: I3d4a709d058963be61a0311a539cd020f54118d6
Signed-off-by: Jack Ding <jack.ding@windriver.com>
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-01 15:31:55 -04:00
Scott Little
69be80651e Relocate ldapscripts to stx-integ/ldap/ldapscripts
Move content from stx-gplv2 into stx-integ

Packages will be relocated to

stx-integ:
    base/
        bash
        cgcs-users
        cluster-resource-agents
        dpkg
        haproxy
        libfdt
        netpbm
        rpm

    database/
        mariadb

    filesystem/
        iscsi-initiator-utils

    filesystem/drbd/
        drbd-tools

    kernel/kernel-modules/
        drbd
        integrity
        intel-e1000e
        intel-i40e
        intel-i40evf
        intel-ixgbe
        intel-ixgbevf
        qat17
        tpmdd

    ldap/
        ldapscripts

    networking/
        iptables
        net-tools

Change-Id: I688cd576de5e8fb9fbe7ad727b9e5321ad4b0e45
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-01 15:31:54 -04:00
Scott Little
bab9bb6b69 Internal restructuring of stx-integ
Create new directories:
   ceph
   config
   config-files
   filesystem
   kernel
   kernel/kernel-modules
   ldap
   logging
   strorage-drivers
   tools
   utilities
   virt

Retire directories:
   connectivity
   core
   devtools
   support
   extended

Delete two packages:
   tgt
   irqbalance

Relocated packages:
   base/
      dhcp
      initscripts
      libevent
      lighttpd
      linuxptp
      memcached
      net-snmp
      novnc
      ntp
      openssh
      pam
      procps
      sanlock
      shadow
      sudo
      systemd
      util-linux
      vim
      watchdog

   ceph/
      python-cephclient

   config/
      facter
      puppet-4.8.2
      puppet-modules

   filesystem/
      e2fsprogs
      nfs-utils
      nfscheck

   kernel/
      kernel-std
      kernel-rt

   kernel/kernel-modules/
      mlnx-ofa_kernel

   ldap/
      nss-pam-ldapd
      openldap

   logging/
      syslog-ng
      logrotate

   networking/
      lldpd
      iproute
      mellanox
      python-ryu
      mlx4-config

   python/
      python-2.7.5
      python-django
      python-gunicorn
      python-setuptools
      python-smartpm
      python-voluptuous

   security/
      shim-signed
      shim-unsigned
      tboot

   strorage-drivers/
      python-3parclient
      python-lefthandclient

   virt/
      cloud-init
      libvirt
      libvirt-python
      qemu

   tools/
      storage-topology
      vm-topology

   utilities/
      tis-extensions
      namespace-utils
      nova-utils
      update-motd

Change-Id: I37ade764d873c701b35eac5881eb40412ba64a86
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-01 10:06:31 -04:00