• last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
merge with missing files

  1. … 1453 more files in changeset.
merge from oacs-5-10

    • -4
    • +6
    ./upgrade/upgrade--5.9.1d15-5.9.1d16.sql
  1. … 8085 more files in changeset.
Small update for cluster support

- Improved visualization of cluster nodes that we lost contact to

- New kernel parameters to reduce hard-coded values and to make purpose more explicit

* new parameter ClusterHeartbeatInterval (default 20s),

was hardcoded before to the new default value

* renamed PreferredLocationRegexp -> ClusterPreferredLocationRegexp

* renamed EnableLoggingP -> ClusterEnableLoggingP

- Bumped version numbers:

* acs-kernel to 5.10.1b3

* acs-tcl to 5.10.1b2

* acs-admin to 5.10.1b2

acs-kernel acs-admin acs-tcl/

    • -0
    • +24
    ./upgrade/upgrade-5.10.1b2-5.10.1b3.sql
  1. … 7 more files in changeset.
file upgrade-5.10.1b2-5.10.1b3.sql was initially added on branch oacs-5-10.

    • -0
    • +0
    ./upgrade/upgrade-5.10.1b2-5.10.1b3.sql
  1. … 1 more file in changeset.
fixed typo

  1. … 4 more files in changeset.
file upgrade-5.10.1d10-5.18.1d19.sql was initially added on branch oacs-5-10.

    • -0
    • +0
    ./upgrade/upgrade-5.10.1d10-5.18.1d19.sql
made names of SQL functions explicit to ease calling directly from the Tcl level

    • -0
    • +680
    ./upgrade/upgrade-5.10.1d10-5.18.1d19.sql
  1. … 3 more files in changeset.
Remove no_alarms_until column

Rationale: the column or the related api is never used in upstream code to check whether notifications should be sent or not or not. The UI to manage the column's value was not linked anywhere. On the instances accessible by me downstream, no tuple was found where this column had a value.

    • -0
    • +200
    ./upgrade/upgrade-5.10.1d17-5.10.1d18.sql
  1. … 16 more files in changeset.
file upgrade-5.10.1d17-5.10.1d18.sql was initially added on branch oacs-5-10.

    • -0
    • +0
    ./upgrade/upgrade-5.10.1d17-5.10.1d18.sql
  1. … 1 more file in changeset.
Added proc "membership_rel::expire" so that all membership states are now covered. Note: The Oracle part is best effort only!

    • -0
    • +249
    ./upgrade/upgrade-5.10.1d16-5.10.1d17.sql
  1. … 8 more files in changeset.
file upgrade-5.10.1d16-5.10.1d17.sql was initially added on branch oacs-5-10.

    • -0
    • +0
    ./upgrade/upgrade-5.10.1d16-5.10.1d17.sql
  1. … 1 more file in changeset.
Added membership "expired" to membership states. "expired" can be

used for "dormant" accounts, which are neither "banned" nor "deleted".

    • -0
    • +9
    ./upgrade/upgrade-5.10.1d8-5.10.1d9.sql
  1. … 3 more files in changeset.
file upgrade-5.10.1d8-5.10.1d9.sql was initially added on branch oacs-5-10.

    • -0
    • +0
    ./upgrade/upgrade-5.10.1d8-5.10.1d9.sql
  1. … 1 more file in changeset.
Align names used in utility db functions in Oracle and PostgreSQL

Over the years, the names used in the function for PostgreSQL and

Oracle drifted away, which is a problem when using call-by-name

convention for stored procedures. Furthermore, recent Oracle versions

do not allow attributes named "table" (for table_name). So the longer

version is now used uniformily. Fortunately, nsf allow abbreviation

for named parameters (like Tcl does), such one can use both

"-table_name" and "-table".

Bumped version number to 5.10.1d7.

    • -0
    • +312
    ./upgrade/upgrade-5.10.1d6-5.10.1d7.sql
  1. … 3 more files in changeset.
file upgrade-5.10.1d6-5.10.1d7.sql was initially added on branch oacs-5-10.

    • -0
    • +0
    ./upgrade/upgrade-5.10.1d6-5.10.1d7.sql
  1. … 1 more file in changeset.
Fixes for Oracle 19c: uppercase consistently in schema queries

All names in the schema data model are in Oracle in uppercase.

Fixes for Oracle 19c: fixed more cases with Problems with Boolean data types

This fixes e.g. the following problem

[16/Feb/2022:20:55:19][3908.7fa5364fa700][-conn:oacs-5-10-0:default:1:9-] Error: SQL(): nsoracle.c:863:OracleExecPLSQLBind: error in `OCIStmtExecute ()': ORA-06550: line 1, column 13:

: PLS-00382: expression is of wrong type

: ORA-06550: line 1, column 7:

: PL/SQL: Statement ignored

:

: SQL: BEGIN :1 := util.foreign_key_exists(table_name => :table_name,column => :column,reftable => :reftable,refcolumn => :refcolumn); END;

[16/Feb/2022:20:55:19][3908.7fa5364fa700][-conn:oacs-5-10-0:default:1:9-] Notice: ### db_with_handle returned error <nsoracle.c:863:OracleExecPLSQLBind: error in `OCIStmtExecute ()': ORA-06550: line 1, column 13:

: PLS-00382: expression is of wrong type

: ORA-06550: line 1, column 7:

: PL/SQL: Statement ignored

:

Fixes for Oracle 19c: output potential errors after command

Fixes for Oracle 19c:

- types defined inside an package cannot be used from the outside;

so utility function get_primary_keys() was not usable

- fix various problems with boolean values

Two sample errors raised before the fix:

[16/Feb/2022:16:12:52][20833.7fa027de8940][-main:oacs-5-10-0-] Error: SQL(): nsoracle.c:863:OracleExecPLSQLBind: error in `OCIStmtExecute ()': ORA-06550: line 1, column 13:

: PLS-00382: expression is of wrong type

: ORA-06550: line 1, column 7:

: PL/SQL: Statement ignored

:

: SQL: BEGIN :1 := util.table_column_exists(t_name => :t_name,c_name => :c_name); END;

16/Feb/2022:18:16:39][27419.7fb7a518a940][-main:oacs-5-10-0-] Error: SQL(): nsoracle.c:863:OracleExecPLSQLBind: error in `OCIStmtExecute ()': ORA-06550: line 1, column 13:

: PLS-00382: expression is of wrong type

: ORA-06550: line 1, column 7:

: PL/SQL: Statement ignored

:

: SQL: BEGIN :1 := util.get_primary_keys(table_name => :table_name); END;

[16/Feb/2022:18:16:39][27419.7fb7a518a940][-main:oacs-5-10-0-] Notice: ### db_with_handle returned error <nsoracle.c:863:OracleExecPLSQLBind: error in 'OCIStmtExecute ()': ORA-06550: line 1, column 13:

: PLS-00382: expression is of wrong type

: ORA-06550: line 1, column 7:

: PL/SQL: Statement ignored

:

: SQL: BEGIN :1 := util.get_primary_keys(table_name => :table_name); END;> for statement

: #:log "sql=BEGIN :1 := util.get_primary_keys($sql_args); END;, sql_command=ns_ora exec_plsql_bind $db $sql 1 """

: return [ ns_ora exec_plsql_bind $db $sql 1 "" ]

:

Fixes for Oracle 19c for membership and composition triggers

Warning: Trigger created with compilation errors.

Errors for TRIGGER MEMBERSHIP_RELS_IN_TR:

LINE/COL ERROR

-------- -----------------------------------------------------------------

14/3 PL/SQL: SQL Statement ignored

16/3 PL/SQL: ORA-00947: not enough values

32/3 PL/SQL: Statement ignored

32/6 PLS-00201: identifier 'V_COMPOSABLE_P' must be declared

Trigger created.

No errors.

Warning: Trigger created with compilation errors.

Errors for TRIGGER COMPOSITION_RELS_IN_TR:

LINE/COL ERROR

-------- -----------------------------------------------------------------

72/21 PL/SQL: SQL Statement ignored

72/48 PL/SQL: ORA-00918: column ambiguously defined

83/7 PL/SQL: Statement ignored

83/47 PLS-00364: loop index variable 'MEMBERS' use is invalid

86/5 PL/SQL: SQL Statement ignored

91/6 PL/SQL: ORA-00918: column ambiguously defined

Trigger created.

No errors.

    • -3
    • +5
    ./upgrade/upgrade--5.9.1d15-5.9.1d16.sql
The composite_p attribute for acs_object_type.create_type() was missing

This fixes in essence the following errors.

acs_rel_type.create_type (

*

ERROR at line 35:

ORA-06550: line 35, column 2:

PLS-00306: wrong number or types of arguments in call to 'CREATE_TYPE'

ORA-06550: line 35, column 2:

PL/SQL: Statement ignored

ORA-06550: line 54, column 2:

PLS-00306: wrong number or types of arguments in call to 'CREATE_TYPE'

ORA-06550: line 54, column 2:

PL/SQL: Statement ignored

ORA-06550: line 70, column 2:

PLS-00306: wrong number or types of arguments in call to 'CREATE_TYPE'

ORA-06550: line 70, column 2:

PL/SQL: Statement ignored

No errors

insert into group_type_rels

*

ERROR at line 1:

ORA-02291: integrity constraint (OPENACS.GROUP_TYPE_RELS_GROUP_TYPE_FK)

violated - parent key not found

insert into group_type_rels

*

ERROR at line 1:

ORA-02291: integrity constraint (OPENACS.GROUP_TYPE_RELS_GROUP_TYPE_FK)

violated - parent key not found

providing compatibility with Oracle 19c

Either these scripts never worked for Oracle, or these Oracle changed over the years

improving Oracle upgrade scripts

Oracle has no "ALTER TABLE ADD COLUMN ...."

Oracle has no "ALTER TABLE ADD COLUMN if exists .."

    • -1
    • +1
    ./upgrade/upgrade--5.9.1d15-5.9.1d16.sql
  1. … 8 more files in changeset.
file upgrade-5.10.1d2-5.10.1d3.sql was initially added on branch oacs-5-10.

    • -0
    • +0
    ./upgrade/upgrade-5.10.1d2-5.10.1d3.sql
  1. … 1 more file in changeset.
stick to the original names with the "-" since this is also the naming convention outside of OpenACS (e.g. "scram-sha-256")

    • -0
    • +9
    ./upgrade/upgrade-5.10.1d2-5.10.1d3.sql
  1. … 6 more files in changeset.
file upgrade-5.10.1d1-5.10.1d2.sql was initially added on branch oacs-5-10.

    • -0
    • +0
    ./upgrade/upgrade-5.10.1d1-5.10.1d2.sql
  1. … 1 more file in changeset.
Complete reform introduced in https://cvs.openacs.org/changelog/OpenACS?cs=oacs-5-10%3Agustafn%3A20210928124647

- add datamodel change to the creation script

- refactor algorithm names in a way that the new procs will comply with acs-tcl.naming__proc_naming automated test

    • -0
    • +9
    ./upgrade/upgrade-5.10.1d1-5.10.1d2.sql
  1. … 5 more files in changeset.
file upgrade-5.10.0-5.10.1d1.sql was initially added on branch oacs-5-10.

    • -0
    • +0
    ./upgrade/upgrade-5.10.0-5.10.1d1.sql
  1. … 1 more file in changeset.
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

    • -0
    • +57
    ./upgrade/upgrade-5.10.0-5.10.1d1.sql
  1. … 6 more files in changeset.