-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from indiana-university/duo_passcode
Rsyslog feature
- Loading branch information
Showing
12 changed files
with
91 additions
and
18 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This class creates a configuration file | ||
# (/etc/rsyslog.d/60-duo_unix.conf) to direct | ||
# login_duo messages into the system's auth log | ||
# | ||
# @summary This class configures rsyslog.d to send Duo-related auth logs | ||
# into the system's auth log in addition to its default syslog logging destination. | ||
# This is to facilitate the use of fail2ban with Duo conditions by | ||
# confining all auth-related activity to the auth log. | ||
# | ||
# @example | ||
# include duo_unix::rsyslog | ||
class duo_unix::rsyslog inherits duo_unix::params { | ||
package { 'rsyslog': } | ||
file { '/etc/rsyslog.d/60-duo_unix.conf': | ||
content => "# This file is managed by Puppet. DO NOT EDIT.\nlogin_duo\t\t${duo_unix::params::auth_logfile}", | ||
} | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "iu-duo_unix", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"author": "Anthony Vitacco <[email protected]>, Mark Addonizio <[email protected]>, Will Meredith <[email protected]>", | ||
"summary": "Installs, configures, and manages Duo Unix", | ||
"license": "MIT", | ||
|
@@ -76,7 +76,7 @@ | |
"version_requirement": ">= 7.0.0 < 9.0.0" | ||
} | ||
], | ||
"pdk-version": "3.0.1", | ||
"pdk-version": "3.2.0", | ||
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main", | ||
"template-ref": "tags/3.2.0-0-gb257ef1" | ||
"template-ref": "heads/main-0-g1829b3f" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
rsyslog_config_file = '/etc/rsyslog.d/60-duo_unix.conf' | ||
|
||
# manage_ssh is needed for testing because sshd is already used for | ||
# the testing environment and gives false failures without setting to false here | ||
pp_static_content = <<-PUPPETCODE | ||
class { 'duo_unix': | ||
usage => 'login', | ||
ikey => 'ikey', | ||
skey => 'skey', | ||
host => 'host', | ||
manage_ssh => false, | ||
duo_rsyslog => true, | ||
} | ||
PUPPETCODE | ||
|
||
def test_rsyslog(pp, filename) | ||
idempotent_apply(pp) | ||
expect(file(filename)).to be_file | ||
end | ||
|
||
describe 'rsyslog configuration' do | ||
context 'applying rsyslog configuration' | ||
it do | ||
test_rsyslog(pp_static_content, rsyslog_config_file) | ||
end | ||
end |
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