-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# This is a combination of 3 commits.
# This is the 1st commit message: First bunch of major changes # This is the commit message #2: Renaming # This is the commit message #3: tmp
- Loading branch information
Showing
98 changed files
with
577 additions
and
5,956 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
config/config.ini | ||
config/keys-sync | ||
config/keys-sync.pub | ||
config/cert-sync | ||
config/cert-sync.pub | ||
extensions/*.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
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,7 +1,7 @@ | ||
; SSH Key Authority config file | ||
; SCA Key Authority config file | ||
[web] | ||
enabled = 1 | ||
baseurl = https://ska.example.com | ||
baseurl = https://sca.example.com | ||
logo = /logo-header-itmettke.png | ||
; footer may contain HTML. Literal & " < and > should be escaped as & | ||
; " < $gt; | ||
|
@@ -14,23 +14,17 @@ timeout_util = GNU coreutils | |
; used on e.g. alpine | ||
; timeout_util = BusyBox | ||
|
||
key_expiration_enabled = 0 | ||
key_expiration_days = 180 | ||
|
||
minimum_rsa_key_size = 4096 | ||
minimum_ecdsa_key_size = 384 | ||
|
||
[security] | ||
; It is important that SKA is able to verify that it has connected to the | ||
; It is important that SCA is able to verify that it has connected to the | ||
; server that it expected to connect to (otherwise it could be tricked into | ||
; syncing the wrong keys to a server). The simplest way to accomplish this is | ||
; through SSH host key verification. Setting either of the 2 options below to | ||
; '0' can weaken the protection that SSH host key verification provides. | ||
|
||
; Determine who can reset a server's SSH host key in SKA: | ||
; Determine who can reset a server's SSH host key in SCA: | ||
; 0: Allow server admins to reset the SSH host key for servers that they | ||
; administer | ||
; 1: Full SKA admin access is required to reset a server's host key | ||
; 1: Full SCA admin access is required to reset a server's host key | ||
host_key_reset_restriction = 1 | ||
|
||
; Determine what happens if multiple servers have the same SSH host key: | ||
|
@@ -47,35 +41,25 @@ host_key_collision_protection = 1 | |
; Determine how hostname verification is performed: | ||
; 0: Do not perform hostname verification | ||
; 1: Compare with the result of `hostname -f` | ||
; 2: Compare with /var/local/keys-sync/.hostnames, fall back to `hostname -f` | ||
; 2: Compare with /var/local/cert-sync/.hostnames, fall back to `hostname -f` | ||
; if the file does not exist | ||
; 3: Compare with /var/local/keys-sync/.hostnames, abort sync if the file | ||
; 3: Compare with /var/local/cert-sync/.hostnames, abort sync if the file | ||
; does not exist | ||
; The last option provides the most solid verification, as a server will only | ||
; be synced to if it has been explicitly allowed on the server itself. | ||
hostname_verification = 0 | ||
|
||
[defaults] | ||
; This setting will cause new servers to always have a managed account called | ||
; "root" and for that account to be automatically added into the | ||
; "root-accounts" group: | ||
; | ||
; account_groups[root] = "root-accounts" | ||
; | ||
; Any number of these can be specified | ||
account_groups[root] = "accounts-root" | ||
|
||
[email] | ||
enabled = 1 | ||
; The mail address that outgoing mails will be sent from | ||
from_address = ska@example.com | ||
from_name = "SSH Key Authority system" | ||
from_address = sca@example.com | ||
from_name = "SCA Key Authority system" | ||
; Where to mail security notifications to | ||
report_address = [email protected] | ||
report_name = "SSH Key Authority reports" | ||
report_name = "SCA Key Authority reports" | ||
; Where users should contact for help | ||
admin_address = [email protected] | ||
admin_name = "SSH Key Authority administrators" | ||
admin_name = "SCA Key Authority administrators" | ||
; You can use the reroute directive to redirect all outgoing mail to a single | ||
; mail address - typically for temporary testing purposes | ||
;reroute = [email protected] | ||
|
@@ -84,9 +68,9 @@ admin_name = "SSH Key Authority administrators" | |
; Connection details to the MySQL database | ||
hostname = localhost | ||
port = 3306 | ||
username = ska-user | ||
username = sca-user | ||
password = password | ||
database = ska-db | ||
database = sca-db | ||
|
||
[ldap] | ||
enabled = 0 | ||
|
@@ -114,48 +98,16 @@ user_name = cn | |
user_email = mail | ||
;user_superior = superioremployee | ||
|
||
; If inactive users exist in your LDAP directory, filter with the following | ||
; settings: | ||
; Field to filter on: | ||
;user_active = organizationalstatus | ||
; Use *one* of user_active_true or user_active_false | ||
; user_active_true means user is active if the user_active field equals its | ||
; value | ||
;user_active_true = 'current' | ||
; user_active_false means user is active if the user_active field does not | ||
; equal its value | ||
;user_active_false = 'former' | ||
|
||
; Group membership attributes. Examples below are for typical setups: | ||
; | ||
; POSIX groups | ||
; group_member = memberUid | ||
; group_member_value = uid | ||
; | ||
; Group-of-names groups | ||
; group_member = member | ||
; group_member_value = dn | ||
; | ||
; Attribute of group where members are stored | ||
group_member = memberUid | ||
; User attribute to compare with | ||
group_member_value = uid | ||
|
||
; Members of admin_group are given full admin access to SSH Key Authority web | ||
; interface | ||
admin_group_cn = ska-administrators | ||
; By default only the admin_group_cn will be synced. This option enabled | ||
; synchronisation of every group a user is in | ||
full_group_sync = 0 | ||
filter = sca-administrators | ||
|
||
[inventory] | ||
; SSH Key Authority will read the contents of the file /etc/uuid (if it | ||
; SCA Key Authority will read the contents of the file /etc/uuid (if it | ||
; exists) when syncing with a server. If a value is found, it can be used as a | ||
; link to an inventory system. | ||
; %s in the url directive will be replaced with the value found in /etc/uuid | ||
;url = "https://inventory.example.com/device/%s" | ||
|
||
[gpg] | ||
; SSH Key Authority can GPG sign outgoing emails sent from the | ||
; SCA Key Authority can GPG sign outgoing emails sent from the | ||
; email.from_address. To do this it needs to know an appropriate key ID to use | ||
;key_id = 0123456789ABCDEF0123456789ABCDEF01234567 |
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,13 +1,13 @@ | ||
FROM alpine | ||
LABEL maintainer="Marc Mettke <[email protected]>" | ||
|
||
ENV SYSTEM https://github.com/mettke/ssh-key-authority.git | ||
ENV SYSTEM https://github.com/mettke/ssl-cert-authority.git | ||
ADD entrypoint.sh /entrypoint.sh | ||
ADD healthcheck.sh /healthcheck.sh | ||
ADD cron /var/spool/cron/crontabs/root | ||
|
||
RUN mkdir -p /var/log/keys/ /run/php/ /ska/ && \ | ||
adduser --system --disabled-password keys-sync && \ | ||
RUN mkdir -p /var/log/keys/ /run/php/ /sca/ && \ | ||
adduser --system --disabled-password cert-sync && \ | ||
apk add openssh \ | ||
php7 \ | ||
php7-fpm \ | ||
|
@@ -25,13 +25,13 @@ RUN mkdir -p /var/log/keys/ /run/php/ /ska/ && \ | |
echo "" >> /etc/php7/php-fpm.conf && \ | ||
chmod +x /entrypoint.sh /healthcheck.sh && \ | ||
ln -sf /dev/stderr /var/log/php7/error.log | ||
RUN apk add git && \ | ||
git clone ${SYSTEM} /ska && \ | ||
apk del git && \ | ||
chown -R keys-sync:nogroup /ska/config | ||
# RUN apk add git && \ | ||
# git clone ${SYSTEM} /sca && \ | ||
# apk del git && \ | ||
# chown -R cert-sync:nogroup /sca/config | ||
|
||
EXPOSE 9000 | ||
VOLUME /ska/config | ||
VOLUME /sca/config | ||
VOLUME /public_html | ||
|
||
ENTRYPOINT "/entrypoint.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 |
---|---|---|
@@ -1,2 +1 @@ | ||
0 1 * * * /ska/scripts/cron.php | ||
*/1 * * * * /bin/ash -c "PID=$(cat /var/run/keys-sync.pid) && [ -n ${PID} -a -d /proc/${PID} ] || /ska/scripts/syncd.php --user keys-sync" | ||
*/1 * * * * /bin/ash -c "PID=$(cat /var/run/cert-sync.pid) && [ -n ${PID} -a -d /proc/${PID} ] || /sca/scripts/syncd.php --user cert-sync" |
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
Oops, something went wrong.