| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 331d3ff806f4d1b146d8599b1e226e7962f7d7b2)
|
|
|
|
|
| |
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 35d84a44f2bec3754fca0604d8bb6a3a598b8441)
|
| |
|
|
|
|
|
|
|
| |
This is a follow up of commit de7a3d88c78cdf400fcee78f71946da8b12ec74f.That
commit introduced an SQL error when eDBregister_attempts() was attempting
to update certificate digest attempt records. Overhauled and fixed the
complete eDBregister_attempts() function.
|
|
|
|
|
| |
This makes sure that all interactions with the database will convert
the digest strings to lower case.
|
| |
|
|
|
|
| |
This only affects functions related to MAC address and certificate depth
|
| |
|
| |
|
|
|
|
| |
This also improves debugging as well, if debug logging is enabled and log level is >= 40.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to the current implementation of SHA512 salts, it could be
experienced as if the application hung on wrong passwords. This is
because the rounds count for the passwords are scrambled, with values
based on the given password. When a wrong password is given, this will
also result in getting a wrong salt length and hash rounds for the
following hash calculation.
Due to this, the extracted rounds value from the salt string could
return some really high number of rounds on wrong
passwords (possibly the max value if integer). And this is why the
"hang" is experienced.
To avoid this, a check is added to make sure the rounds is not
unreasonably much higher than the configured max rounds values. If the
descrambled rounds number from the salt exceeds max rounds * 1.5, the
password (most probaly) is wrong. In this case we do a sleep() to slow
down bruteforce attacks and return NULL.
The drawback is if the maxrounds later on is changed to a value which
hits this scenario:
passwordsalt_rounds > maxrounds_cfg * 1.5
In this case these old passwords will be invalidated by that
configuration change. This is considered to be a feature and not a bug.
The reason for mulitiplying by 1.5, is to allow a little room for a
degrading the max rounds setting. By adjusting the max rounds up again,
these passwords will be valid again.
Added also a sleep() when wrong username is attempted.
|
| |
|
|
|
|
|
| |
Made sure we only include needed include files and checked that
the copyright headers are equal and correct
|
|
|
|
| |
Follow up from commit 062a3c92343a5fa371f8637f8bca88aacca14cc4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to prepare eurephia-auth plugin to use other and
more CPU intensive hashing algorithms for passwords. In addition,
open sessions will now not be rejected/closed due to wrong
password if the user changes the password with an open session
running.
The patch adds a new server_salt attribute in the eurephiaCTX
structure. This is used as a temporary salt and is created of
random data when OpenVPN is started.
When a user is being authenticated (eurephia.c/eurephia_userauth)
a authentication session (not the same as a 'normal' session) is
opened and checked for a cached password. If it does not exist
or match, normal password check will be done against the user
database. If a cached password is found and matches, it is
considered to be authenticated.
The cached password uses the SHA512 algorithm, together with the
eurephiaCTX->server_salt.
|
|
|
|
| |
hashing algorithms
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- cmd_Logout(...) used the wrong argv[] index for sessionkey.
- Improved eDBadminValidateSession(...) to set status to '5' on sessions
which are getting logged out due to missing privileges
|
|
|
|
| |
user is about to logout
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Added one more status code, for active sessions. Auto-logout will now
also delete session variables
|
|
|
|
| |
Auto-logout implemented as well
|
| |
|
|
|
|
|
|
| |
Follow up of commit 103acd7c2e1467401f0795930be9140dc5ed47ff. Seems
to work fine via both plugin mode and eurephiadm, regarding core dumping
too.
|
|\ |
|
| |
| |
| |
| | |
if config parameters is not set
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
One part is a generic session handling part
(common/eurephiadb_session_common.[ch]) and the other part
is left in the old plugin/eurephiadb_session.[ch].
This splitting should make it easiser to reuse some of the session
handling functions for the admin utils.
|
|/ |
|
|
|