• last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Stronger password hashes for OpenACS

This change introduces the possibility to use either the classical

OpenACS password hash algorithm "salted-sha1" or the SCRAM passord

function "scram-sha-256". The latter can be used by (a) using the

most recent version of NaviServer (from Sept 28, 2021 or newer) and

(b) by configuring the password hash preferences via Kernel package

parameter "PasswordHashAlgorithm". The package parameter can contain a

list of multiple hash algorithms in preference order. The most

preferred available algorithm is chosen.

By default, the "PasswordHashAlgorithm" is "salted-sha1", and the

behavior is as before. After upgrading to the new version of acs-tcl

and acs-kernel, the preference list can be configured. When a user

logs in and the preferred available algorithm is different from the

previously used algorithm, the upgrade is performed for the user

automatically.

The usage of SHA1 in OpenACS is easily target of security audits (see

[1]). The biggest danger is that if somebody gets full access to the

"users" table (e.g. when decommissioning a hard disk). In this case

the hashes can be attacked with dictionaries by using some crypto

hardware (when someone gets raw access to the DB, one has usually some

other big problems). However, by using the "scram-sha-256" hash

function this danger is substantially reduced. This function computes

a password hash using PBKDF2 (Password-Based Key Derivation Function

2). This function is used to reduce vulnerabilities of brute-force

attacks against password hashes. The hash function of SCRAM is PBKDF2

[RFC2898] with HMAC as the pseudorandom function (PRF) and with dkLen

== output length of HMAC == output length of the digest function. So,

it uses a better hash algorithm (sha-256 vs. sha1) and applies this a

high number of times (15K times for a password hash computation).

NaviServer supports as well the even better SCRYPT algorithm, but this

is only available when NaviServer is compiled with OpenSSL 3.0 or

newer. On the contrary, scram-sha-256 (actually PKCS5_PBKDF2_HMAC) is

available since OpenSSL 1.0.0 (2015).

All the improved hash functions require NaviServer with its tight

integration to the crypto functions of OpenSSL.

[1] https://openacs.org/forums/message-view?message_id=5522562

  1. … 6 more files in changeset.
fix release dates in .info files

  1. … 82 more files in changeset.
release work

  1. … 204 more files in changeset.
bump version numbers of 5.9|5.10 packages to 5.10.0b1

adjust dependencies

  1. … 87 more files in changeset.
Update italian localization

  1. … 3 more files in changeset.
Update es_ES translation

  1. … 7 more files in changeset.
Add the 'relative' flag to 'util_url_valid_p', to check also relative URLs. Extend 'acs_tcl__util_url_valid_p' test case and bump package version.

  1. … 2 more files in changeset.
Added page_contract filter "object_id"

This change adds the page_contract filter "object_id", which validates

values whether these are syntactically acceptable as object_ids in

PostgreSQL and Oracle.

Note that before one is able to use the filter, the server has to be

restarted. Otherwise, when e.g. "apm/version_reload.tcl" would be

executed with the new filter, it would fail. So, one has to be careful

on update scripts, when people upgrade from old version not to create

a blocking mutual blocking condition.

  1. … 4 more files in changeset.
added page contract filter "printable" to avoid passing of binary values to certain pages

  1. … 2 more files in changeset.
remove dependency of general-comments on acs-mail-lite

  1. … 3 more files in changeset.
Cleanup of low-level DB-interace: use dict instead of list with fixed positions

VS: ----------------------------------------------------------------------

  1. … 3 more files in changeset.
Added support for trailing non-positional arguments

The change makes the old hack with the own trailing-argument-parser

"ad_arg_parser" obsolete by using directly the c-level argument parser

which is anyhow capable of handling trailing arguments. A few changes

were necessary for api doc to handle there trailing arguments as well.

The proc "db_string" is already converted to use native arguments.

  1. … 7 more files in changeset.
Fix for issue #3442 to support range types in .xql files

PostgreSQL supports range types since 9.5. When using range types,

square braces have to be used in SQL statements. Since OpenACS uses

always Tcl substitution in .xql files, and OpenACS does NOT allow

backslash substitution in these files, square brackets could not be

escaped and therefore not be used in .xql files so far. This change

allows now a developer to deactivate the substitution by passing

e.g. "-subst none" to the db_* command using the .xql file. Valid

values for "-subst" are "all", "none", "vars", and "commands", default

is "all" which is exactly the behavior of before. Therefore, this

change is fully backward compatible.

  1. … 3 more files in changeset.
bump version number

added backward compatibility proc for AOLserver "ns_trim"

  1. … 1 more file in changeset.
added "ad_conn bot_p" to check, whether request was initiated by a bot

This feature is based on a simple heuristic based on the user-agent

(which can be certainly extended). It is useful to avoid e.g. Google

bot to run into "notifications subscribe" + login attempts, which

are useful for not-logged-in user, but not for bots. These attemps

lead to failures in google statistics that might reduce the google

ranking of a web site.

  1. … 2 more files in changeset.
introduced "ad_file" as a means to avoid unexpected tilde substitution in file names

  1. … 50 more files in changeset.
- icanuse: added nsv_dict

- bumped version number to 5.10.0d37

  1. … 1 more file in changeset.
don't depend on the node-id cache, which is only available, when xotcl-core is loaded

  1. … 4 more files in changeset.
acs::per_request_cache: standardize per-request caching

- added per-request cache verfsy similar to acs::per_thread_cache

- use per-request-cache on several occasions

- bump version number of acs-tcl to 5.10.0d35

  1. … 9 more files in changeset.
acs::per_thread_cache: standardize per-thread caching

- added per-thread cache based on namespaced Tcl variables.

- use per-thread-cache on several occasions

- bump version number of acs-tcl to 5.10.0d34

  1. … 14 more files in changeset.
move ad_get_host_node_map and security-locations-host-names from db_cache_pool to partitioned cache

  1. … 3 more files in changeset.
provide compatibility function ns_dbquotelist, which is available in newer versions of NaviServer

  1. … 1 more file in changeset.
don't pass sensitive information (e.g. password) as query variable, but use client properties instead.

see also issue #3344

  1. … 5 more files in changeset.
bugfix: unmounting a package could lead to a deletion of services used in other packages

A new API call "site_node::unmount_services" can be used to unmount all services in a first step.

unmount services before calling "site_node::delete -node_id $node_id -delete_subnodes -delete_package"

prevents collateral damage.

  1. … 3 more files in changeset.
moved "populate_secrect" to "sec_*" prefix to reduce clobbering of global namespace

  1. … 6 more files in changeset.
backport security patch from oacs-5-10

  1. … 1 more file in changeset.
new API call "http_auth::basic_authentication_decode" to replace 3 distinct implementations of this logic

  1. … 6 more files in changeset.
new funcion: util::inline_svg_from_dot: refactored version from private api-procs function.

use new function in api-doc

CVS: ----------------------------------------------------------------------

  1. … 3 more files in changeset.
improve spelling

  1. … 13 more files in changeset.