Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
anklimsk committed Sep 20, 2020
2 parents c0ba791 + 64352bb commit 9db638d
Show file tree
Hide file tree
Showing 12 changed files with 425 additions and 234 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Changelog


## v1.0.12 (2020-09-20)

### New

* Added support for alternative directory services.

### Fix

* Fixed internal authentication issue after saving settings.


## v1.0.11 (2020-04-02)

### Fix
Expand Down
66 changes: 51 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
[![Latest Stable Version](https://poser.pugx.org/anklimsk/wpkg-express-2/v/stable)](https://packagist.org/packages/anklimsk/wpkg-express-2)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

A web-based frontend to [WPKG](https://wpkg.org) ([presentation](https://anklimsk.github.io/wpkg-express-2/presentation/))
A web-based frontend to [WPKG](https://wpkg.org)

WPKG Express 2 based on [wpkgExpress](https://code.google.com/archive/p/wpkgexpress)
by Brian White ©2009.

[WPKG](https://wpkg.org/WPKG_overview) is an automated software deployment, upgrade and removal program for Windows.

## WPKG Express 2 UI

![WPKG Express 2 UI](https://anklimsk.github.io/wpkg-express-2/img/slideshow.gif)

See the project [presentation](https://anklimsk.github.io/wpkg-express-2/presentation/).

## This frontend to WPKG provides next features:

- User authentication by username and password and LDAP security group membership;
Expand Down Expand Up @@ -44,31 +50,61 @@ by Brian White ©2009.
## Requirements

- Apache module `mod_rewrite`;
- PHP 5.4.0 or greater;
- [GraphViz](https://www.graphviz.org);
- smbclient.
- PHP 5.4 or greater (up to 7.4);
- PHP Extensions: `pdo`, `ldap`, `bz2`, `xml` amd `openssl`;
- Ldap server (`Active Directory`,`Samba` or `OpenLDAP`) to authenticate
(only `Active Directory`) and get a list of computers to create `Profiles` and `Hosts` from template;
- Database server (`MySQL`, `Postgres`).

### Not necessary

- [Composer](https://getcomposer.org/download/) to install the application;
- [GraphViz](https://www.graphviz.org) to create dependency graph of `Packages`, `Profiles`
and `Hosts`;
- [smbclient](https://www.samba.org/samba/docs/current/man-html/smbclient.1.html) to access
log files and databases of client computers.

## Installation

1. Install WPKG Express 2 using composer:
`composer create-project anklimsk/wpkg-express-2 /path/to/wpkg`.
2. Copy applicaton files from `/path/to/wpkg`
to VirtualHost document root directory, e.g.: `/var/www/wpkg`.
3. If you are using OPcache you should set the [opcache.blacklist_filename](https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.blacklist-filename)
`composer create-project anklimsk/wpkg-express-2 /var/www/wpkg`,
where `/var/www/wpkg` is Document Root directory.
Or just download the [latest release](https://github.com/anklimsk/wpkg-express-2/releases/latest)
from [Releases](https://github.com/anklimsk/wpkg-express-2/releases) and extract
the archive to the Document Root directory.
2. Set the [DocumentRoot directive](https://httpd.apache.org/docs/trunk/mod/core.html#documentroot)
for the domain to [`DocumentRoot /var/www/wpkg/app/webroot`](https://book.cakephp.org/2/en/installation.html#production).
3. Make sure that an `.htaccess` [override is allowed](https://book.cakephp.org/2/en/installation/url-rewriting.html#apache-and-mod-rewrite-and-htaccess)
and that `AllowOverride` is set to `All` for the correct DocumentRoot. For users having apache
2.4 and above, you need to modify the configuration file for your `httpd.conf`
or virtual host configuration to look like the following:
```apacheconf
<Directory /var/www/wpkg>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
```
4. If you are using OPcache you should set the [opcache.blacklist_filename](https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.blacklist-filename)
configuration value with a file path to your blacklist (View cache):
- For example, create a new file:
`/etc/php5/apache2/opcache-blacklist.txt`;
`/etc/php/7.4/apache2/opcache-blacklist.txt`;
- Specify the path for excluding files, e.g.: `/var/www/wpkg/app/tmp/cache/views/wpkg_*.php`;
- Add the blacklist file path to your `php.ini` file:
`opcache.blacklist_filename=/etc/php5/apache2/opcache-blacklist.txt`;
`opcache.blacklist_filename=/etc/php/7.4/apache2/opcache-blacklist.txt`;
- Reload apache configuration: `sudo service apache2 reload`.
4. Navigate to the directory `app` application (`/var/www/wpkg/app`),
5. Navigate to the directory `app` application (`/var/www/wpkg/app`),
and run the following command: `sudo ./Console/cake CakeInstaller`
to start interactive shell of installer.
5. After the installation process is complete, in your browser go to the link
`http://wpkg.fabrikam.com/settings` to change settings of application,
where `http://wpkg.fabrikam.com` - base URL of installited WPKG Express 2.
6. Fill in the fields in the `Authentication` group settings and click the `Save` button.
6. After the installation process is complete, in your browser go to the link
`https://wpkg.fabrikam.com/settings` to change settings of application,
where `https://wpkg.fabrikam.com` - base URL of installited WPKG Express 2.
7. Fill in the fields in the `Authentication` group settings (if required)
and click the `Save` button.

## Update

[Update frontend to WPKG](docs/update.md)

## Using

Expand Down
4 changes: 2 additions & 2 deletions app/Config/cakeinstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@
],
'login' => [
'defaultValue' => '',
'label' => __d('cake_installer_label', 'User principal name (user@fabrikam.com)'),
'validationPattern' => '/\w{2,}\@\w{2,}\.\w{2,}/',
'label' => __("LDAP Bind RDN: RDN (cn=user,ou=users,dc=fabrikam,dc=com) for OpenLDAP or User principal name (user@fabrikam.com) for ActiveDirectory"),
'validationPattern' => '/(^([a-z][a-z0-9-]*)=(?![ #])(((?![\\="+,;<>]).)|(\\[ \\#="+,;<>])|(\\[a-f0-9][a-f0-9]))*(,([a-z][a-z0-9-]*)=(?![ #])(((?![\\="+,;<>]).)|(\\[ \\#="+,;<>])|(\\[a-f0-9][a-f0-9]))*)*$)|(\w{2,}\@\w{2,}\.\w{2,})/i',
],
'password' => [
'alowEmpty' => false,
Expand Down
13 changes: 12 additions & 1 deletion app/Config/project_constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* Default value ``
*/
if (!defined('PROJECT_VERSION')) {
define('PROJECT_VERSION', '1.0.11');
define('PROJECT_VERSION', '1.0.12');
}

/**
Expand Down Expand Up @@ -2496,6 +2496,17 @@
define('XML_CREATE_LIST_XML_CONFIG_URL', 'https://wpkg.org/Category:Silent_Installers');
}

/**
* LDAP attribute `uid`
*
* The 'uid' attribute type contains computer system login names associated with the object
* <a href="https://tools.ietf.org/html/rfc4519#section-2.39">RFC4519</a>
* @link https://tools.ietf.org/html/rfc4519#section-2.39
*/
if (!defined('LDAP_ATTRIBUTE_UID')) {
define('LDAP_ATTRIBUTE_UID', 'uid');
}

/**
* Cache configuration for store statistics information of model `Host`
*
Expand Down
Binary file modified app/Locale/rus/LC_MESSAGES/default.mo
Binary file not shown.
Loading

0 comments on commit 9db638d

Please sign in to comment.