-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c6a453
commit 1105f47
Showing
8 changed files
with
64 additions
and
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
type: script | ||
scripts: | ||
- authselect.sh | ||
- addauthramp.sh | ||
- optoutauthselect.sh | ||
- setfilepermissions.sh |
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,25 @@ | ||
# AuthRamp Configuration File | ||
# This file configures the behavior of the AuthRamp PAM module. | ||
# | ||
[Configuration] | ||
# Directory where tally information is stored. | ||
# Each user has a separate file in this directory to track authentication failures. | ||
# tally_dir = /var/run/authramp | ||
# | ||
# Number of allowed free authentication attempts before applying delays. | ||
# During these free tries, the module allows authentication without introducing delays. | ||
# free_tries = 6 | ||
# | ||
# Base delay applied to each authentication failure. | ||
# This is the initial delay applied after the free tries are exhausted. | ||
# base_delay_seconds = 30 | ||
# | ||
# Multiplier for the delay calculation based on the number of failures. | ||
# The delay for each subsequent failure is calculated as follows: | ||
# delay = ramp_multiplier * (fails - free_tries) * ln(fails - free_tries) + base_delay_seconds | ||
# ramp_multiplier = 50 | ||
# | ||
# Even lock out the root user. Enabling this can be dangerous and may result in a total system lockout. | ||
# For auditing purposes, the tally will still be created for the root user, even if this setting is disabled. | ||
# If you plan to enable this feature, make sure there isn't any tally stored under <tally_dir>/root, or you risk immediate lockout. | ||
even_deny_root = true |
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
echo "Configuring PAM to use pam_athramp" | ||
|
||
system_service="/etc/pam.d/system-auth" | ||
password_service="/etc/pam.d/password-auth" | ||
|
||
header="# Generated by Secureblue" | ||
authramp_preauth="auth required libpam_authramp.so preauth" | ||
authramp_authfail="auth [default=die] libpam_authramp.so authfail" | ||
authramp_account="account required libpam_authramp.so" | ||
|
||
update_pam_service() { | ||
local file="$1" | ||
|
||
sed -i "/^# Generated by authselect/,/^# See authselect(8) for more details./c$header" "$file" | ||
sed -i "/^auth\\s\\+sufficient\\s\\+pam_unix\\.so/i$authramp_preauth" "$file" | ||
sed -i "/^auth\\s\\+required\\s\\+pam_deny\\.so/i$authramp_authfail" "$file" | ||
sed -i "/^account\\s\\+required\\s\\+pam_unix\\.so/i$authramp_account" "$file" | ||
} | ||
|
||
update_pam_service "$system_service" | ||
update_pam_service "$password_service" | ||
|
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Tell build process to exit if there are any errors. | ||
set -oue pipefail | ||
|
||
echo "Opting-out of 'authselect' profile generation" | ||
|
||
rm /etc/authselect/authselect.conf | ||
authselect opt-out 1> /dev/null |