+accountExternalValidationProgram
+
+- Type
+string (path to a binary)
+
+- Default
+""
+
+- Example
+"$BASEDIR/bin/other/check-active-account-simple.pl"
+
+
+Binary or script that will be called by the bastion, with the account name in parameter, to check whether this account should be allowed to connect to the bastion. If empty, this check is skipped. $BASEDIR
is a magic token that is replaced by where the bastion code lives (usually, /opt/bastion
).
+You can use this configuration parameter to counter-verify all accounts against an external system, for example an LDAP, an Active Directory, or any system having a list of identities, right when they're connecting to the bastion (on the ingress side). However, it is advised to avoid calling an external system in the flow of an incoming connection, as this violates the "the bastion must be working at all times, regardless of the status of the other components of the company's infrastructure" rule. Instead, you should have a cronjob to periodically fetch all the allowed accounts from said external system, and store this list somewhere on the bastion, then write a simple script that will be called by the bastion to verify whether the connecting account is present on this locally cached list.
+An account present in this list is called an active account, in the bastion's jargon. An inactive account is an account existing on the bastion, but not in this list, and won't be able to connect. Note that for security reasons, inactive bastions administrators would be denied as any other account.
+The result is interpreted from the program's exit code. If the program return 0, the account is deemed active. If the program returns 1, the account is deemed inactive. A return code of 2, 3 or 4 indicates a failure of the program in determining the activeness of the account. In this case, the decision to allow or deny the access is determined by the accountExternalValidationDenyOnFailure
option below. Status code 3 additionally logs the stderr
of the program silently to the syslog: this can be used to warn admins of a problem without leaking information to the user. Status code 4 does the same, but the stderr
is also shown directly to the user. Any other return code deems the account inactive (same behavior that return code 1).
+
+
+accountExternalValidationDenyOnFailure
+
+- Type
+boolean
+
+- Default
+true
+
+
+If we can't validate an account using the program configured in accountExternalValidationProgram
, for example because the path doesn't exist, the file is not executable, or because the program returns the exit code 4 (see above for more information), this configuration option indicates whether we should deny or allow access.
+Note that the bastion admins will always be allowed if the accountExternalValidationProgram
doesn't work correctly, because they're expected to be able to fix it. They would be denied, as any other account, if accountExternalValidationProgram
works correctly and denies them access, however. If you're still testing your account validation procedure, and don't want to break your users workflow while you're not 100% sure it works correctly, you can say false
here, and return 4 instead of 1 in your accountExternalValidationProgram
when you would want to deny access.
+
+