-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Security ssh detection update (#943)
* Updated ssh user detection and added nested group detection. * Script returns string instead of array. Added separate run for ssh group detection. * Add SSH groups to client details summary * Migration attempt * Growing pains on syntax * More syntax learning * Fixed migration. Removed user verbiage for ssh_group output * Remove debug code. * Commit correct migration code * Tightened up code, removed extra for loop.
- Loading branch information
1 parent
891029d
commit 9c05815
Showing
7 changed files
with
105 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
app/modules/security/migrations/2018_01_19_234938_security.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Capsule\Manager as Capsule; | ||
|
||
class Security extends Migration | ||
{ | ||
private $tableName = 'security'; | ||
|
||
public function up() | ||
{ | ||
|
||
$capsule = new Capsule(); | ||
|
||
$capsule::schema()->table($this->tableName, function (Blueprint $table) { | ||
$table->string('ssh_groups')->after('sip'); | ||
|
||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
|
||
$capsule = new Capsule(); | ||
|
||
$capsule::schema()->table($this->tableName, function (Blueprint $table) { | ||
$table->dropColumn('ssh_groups'); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters