Skip to content

Commit 26c3f1d

Browse files
Merge pull request #3 from VirgilSecurity/develop
Merge develop into master (v0.1.0)
2 parents c177610 + 1015d89 commit 26c3f1d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+5654
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2019, Passw0rd
3+
Copyright (c) 2019, Virgil Security, Inc.
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Virgil Pure WordPress Plugin
2+
3+
[Introduction](#introduction) | [Features](#features) | [Installation](#installation) | [How To Use Plugin](#how-to-use-plugin) | [F.A.Q](#faq) | [License](#license) | [Support](#support)
4+
5+
## Introduction
6+
<img src="https://cdn.virgilsecurity.com/assets/images/github/logos/pure_plugin.png" align="left" hspace="0" vspace="0"></a>
7+
Virgil Pure Wordpress Plugin is a free tool that protects user passwords from data breaches and both online and offline attacks, and renders stolen passwords useless even if your database has been compromised.
8+
9+
The Pure based on a powerful and revolutionary cryptographic technology that provides stronger and more modern security and can be used within any database or login system that uses a password, so it's accessible for business of any industry or size.
10+
11+
Learn more about the Pure technology [here](https://virgilsecurity.com/announcing-purekit).
12+
13+
14+
## Features
15+
16+
#### Available
17+
- Zero knowledge of users' passwords
18+
- Passwords protection from online and offline attacks
19+
- Instant invalidation of stolen database
20+
21+
#### Coming soon
22+
- User data encryption with a personal key
23+
- Plugin deactivation and restoration of the previous authorization system
24+
25+
## Installation
26+
27+
The plugin is currently unavailable at the WP Store but you can get it by downloading from this official repository.
28+
29+
### Install Virgil Pure WordPress Plugin from the GitHub
30+
31+
The package is available for PHP version 7.2.
32+
33+
#### Add the vsce_phe_php extension before using the plugin
34+
35+
* [Download virgil-crypto-c-{latest version} archive from the CDN](https://cdn.virgilsecurity.com/virgil-crypto-c/php/) according to your server operating system
36+
* Place the *vsce_phe_php.{so/dll}* file from the archive (/lib folder) into the directory with extensions
37+
* Add the *extension=vsce_phe_php* string in to the php.ini file
38+
* Restart your web-service (apache or nginx): *sudo service {apache2/nginx} restart*
39+
40+
##### Tips:
41+
42+
* PHP version: *php --version*
43+
* php.ini: *php --ini | grep "Loaded Configuration File"*
44+
* Extension dir: *php -i | grep extension_dir*
45+
46+
#### Add plugin
47+
48+
- [Download the WordPress Virgil_Pure plugin](https://github.com/VirgilSecurity/virgil-pure-wordpress/releases)
49+
- Navigate to WordPress Dashboard
50+
- Open "Plugins → Add New" tab
51+
- Upload the Virgil_Pure.zip file
52+
- Activate the plugin
53+
54+
## How To Use Plugin
55+
56+
### Setup Credentials
57+
To start working with the plugin, at the plugin tab at your WordPress dashboard you'll need to place some credentials in corresponding fields. In order to do that, go through the following steps:
58+
- create an account at [Virgil Dashboard](https://dashboard.virgilsecurity.com/)
59+
- create Pure application
60+
- copy your Pure application's credentials such as: `APP_TOKEN`, `APP_SECRET_KEY`, `SERVICE_PUBLIC_KEY`
61+
- paste them into the corresponding fields
62+
63+
### Migration
64+
65+
Migration is a phase during which the plugin requests cryptographic data from Virgil server to associate users'
66+
passwords (user_pass) with cryptographic enrollments provided by the server. Then enrollment records are created and
67+
stored in your database (wp_usermeta) instead of users' passwords.
68+
69+
> Note! The plugin removes the default passwords hashes ONLY when you turn off DEMO mode.
70+
71+
Simply click the "Start migration" button to start migration.
72+
73+
### Records Update (optional)
74+
75+
This function allows you to use a special `UPDATE_TOKEN` to update all of the enrollment records in your database. This action doesn't requite changing users' passwords or modifying the scheme of the existing table.
76+
77+
Navigate to your Pure application panel at [Virgil Dashboard](https://dashboard.virgilsecurity.com/), press "BEGIN
78+
ROTATION PROCESS", then “SHOW UPDATE TOKEN” button to get the `UPDATE_TOKEN`. Insert the `UPDATE_TOKEN` into the field at the Virgil Pure plugin tab.
79+
80+
## F.A.Q.
81+
82+
#### - What is Demo mode?
83+
84+
Demo mode is a mode in which no data in your database will be altered. To demonstrate how Virgil Pure works, a new column will be created to hold the newly protected password data. When you're ready to go live, your password hashes will be translated into cryptographically protected data.
85+
86+
It is required to migrate all users before switching demo mod off.
87+
88+
#### - Do users have to change their passwords if the database has been compromised?
89+
If a database has been stolen, users do not need to change their original passwords. However, you need to rotate all user records in your database. This will use cryptography to disconnect the compromised Pure records from the original passwords, leaving any unauthorized party empty handed.
90+
91+
#### - How much does it cost?
92+
Pure is a FREE toolkit. All libraries are open source and can be found on GitHub, where they are available for free to any user.
93+
94+
#### - What if an App Private Key gets lost?
95+
There is no way to restore the `APP_SECRET_KEY`. The database becomes inaccessible and therefore useless. So, it makes sense to immediately make a backup of the key in any convenient form.
96+
97+
## License
98+
See [LICENSE](https://github.com/VirgilSecurity/virgil-pure-wordpress/tree/master/LICENSE) for details.
99+
100+
## Support
101+
Our developer support team is here to help you. Find out more information on our [Help Center](https://help.virgilsecurity.com/).
102+
103+
You can find us on [Twitter](https://twitter.com/VirgilSecurity) or send us email [email protected].
104+
105+
Also, get extra help from our support team on [Slack](https://virgilsecurity.com/join-community).

README.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
=== Plugin Name ===
2+
Contributors: virgilsecuritycom
3+
Donate link:
4+
Tags: password, crypto, security
5+
Requires at least: 5.0.0
6+
Tested up to: 5.1.1
7+
Stable tag:
8+
License: GPLv2 or later
9+
License URI: https://github.com/VirgilSecurity/virgil-cli/blob/master/LICENSE
10+
11+
Free tool that protects user passwords from data breaches and both online and offline attacks, and renders stolen passwords useless even if your database has been compromised.
12+
13+
== Description ==
14+
15+
Virgil Pure Wordpress Plugin is a free tool that protects user passwords from data breaches and both online and offline attacks, and renders stolen passwords useless even if your database has been compromised.
16+
17+
The Pure based on a powerful and revolutionary cryptographic technology that provides stronger and more modern security and can be used within any database or login system that uses a password, so it's accessible for business of any industry or size.
18+
19+
Learn more about the Pure technology here: https://virgilsecurity.com/announcing-purekit
20+
21+
== Installation ==
22+
23+
The package is available for PHP version 7.2.
24+
25+
= Add the vsce_phe_php extension before using the plugin =
26+
* [Download `virgil-crypto-c-{latest version}`](https://cdn.virgilsecurity.com/virgil-crypto-c/php/) archive from the CDN according to your server operating system
27+
* Place the vsce_phe_php.{so/dll} file from the archive (/lib folder) into the directory with extensions
28+
* Add the `extension=vsce_phe_php` string in to the php.ini file
29+
* Restart your web-service (apache or nginx): `sudo service {apache2/nginx} restart`
30+
31+
Tips:
32+
* PHP version: `php --version`
33+
* php.ini: `php --ini | grep "Loaded Configuration File"`
34+
* Extension dir: `php -i | grep extension_dir`
35+
36+
= Add plugin =
37+
* [Download the WordPress Virgil_Pure plugin](https://github.com/VirgilSecurity/virgil-pure-wordpress/releases)
38+
* Navigate to WordPress Dashboard
39+
* Open "Plugins → Add New" tab
40+
* Upload the Virgil_Pure.zip file
41+
42+
== Frequently Asked Questions ==
43+
44+
= What is Demo mode? =
45+
46+
Demo mode is a mode in which no data in your database will be altered. To demonstrate how Virgil Pure works, a new column will be created to hold the newly protected password data. When you're ready to go live, your password hashes will be translated into cryptographically protected data.
47+
48+
It is required to migrate all users before switching demo mod off.
49+
50+
= Do users have to change their passwords if the database has been compromised? =
51+
52+
If a database has been stolen, users do not need to change their original passwords. However, you need to rotate all user records in your database. This will use cryptography to disconnect the compromised Pure records from the original passwords, leaving any unauthorized party empty handed.
53+
54+
= How much does it cost? =
55+
56+
Pure is a FREE toolkit. All libraries are open source and can be found on GitHub, where they are available for free to any user.
57+
58+
= What if an App Private Key gets lost? =
59+
60+
There is no way to restore the APP_SECRET_KEY. The database becomes inaccessible and therefore useless. So, it makes sense to immediately make a backup of the key in any convenient form.
61+
62+
== Screenshots ==
63+
64+
== Changelog ==
65+
66+
= 1.0.0 =
67+
* Init plugin
68+
69+
== Upgrade Notice ==

Virgil_Pure.php

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?php
2+
3+
/**
4+
* Plugin Name: Virgil Pure
5+
* Plugin URI: http://virgilsecurity.com/
6+
* Description: Free tool that protects user passwords from data breaches and both online and offline attacks, and renders stolen passwords useless even if your database has been compromised. The Pure based on <a href="https://virgilsecurity.com/announcing-purekit" target="_blank">powerful and revolutionary cryptographic technology</a> that provides stronger and more modern security and can be used within any database or login system that uses a password, so it's accessible for business of any industry or size.
7+
* Version: 0.1.0
8+
* Author: Virgil Security
9+
* Author URI: http://virgilsecurity.com/
10+
* License: GPL-2.0+
11+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12+
* Text Domain: virgil-pure
13+
* Domain Path: /languages
14+
*/
15+
16+
use Dotenv\Dotenv;
17+
18+
require plugin_dir_path(__FILE__) . 'admin/core/vendor/autoload.php';
19+
20+
if (!defined('PLUGIN_PURE_CORE')) {
21+
define('PLUGIN_PURE_CORE', __DIR__ . DIRECTORY_SEPARATOR .'admin'. DIRECTORY_SEPARATOR. 'core');
22+
}
23+
24+
if (!defined('PLUGIN_PURE_CORE_ENV_FILE')) {
25+
define('PLUGIN_PURE_CORE_ENV_FILE', PLUGIN_PURE_CORE . DIRECTORY_SEPARATOR .'.env');
26+
}
27+
28+
if(!is_file(PLUGIN_PURE_CORE_ENV_FILE)) {
29+
copy(PLUGIN_PURE_CORE_ENV_FILE."-example", PLUGIN_PURE_CORE_ENV_FILE);
30+
}
31+
32+
(new Dotenv(PLUGIN_PURE_CORE))->overload();
33+
34+
if (!defined('WPINC')) {
35+
die;
36+
}
37+
38+
define('VIRGIL_PURE_VERSION', '0.1.0');
39+
40+
function activate_Virgil_Pure()
41+
{
42+
require_once plugin_dir_path(__FILE__) . 'includes/class-virgil-pure-activator.php';
43+
Virgil_Pure_Activator::activate();
44+
}
45+
46+
function deactivate_Virgil_Pure()
47+
{
48+
require_once plugin_dir_path(__FILE__) . 'includes/class-virgil-pure-deactivator.php';
49+
Virgil_Pure_Deactivator::deactivate();
50+
}
51+
52+
function uninstall_Virgil_Pure()
53+
{
54+
require_once plugin_dir_path(__FILE__) . 'includes/class-virgil-pure-uninstaller.php';
55+
Virgil_Pure_Uninstaller::uninstall();
56+
}
57+
58+
register_activation_hook(__FILE__, 'activate_Virgil_Pure');
59+
register_deactivation_hook(__FILE__, 'deactivate_Virgil_Pure');
60+
register_uninstall_hook(__FILE__, 'uninstall_Virgil_Pure');
61+
62+
require plugin_dir_path(__FILE__) . 'includes/class-virgil-pure.php';
63+
64+
function run_Virgil_Pure()
65+
{
66+
$plugin = new Virgil_Pure();
67+
$plugin->run();
68+
}
69+
70+
run_Virgil_Pure();

0 commit comments

Comments
 (0)