Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Merge remote-tracking branch 'origin/LDEV-5302' into v4.7

Conflicts:

lams_admin/conf/language/lams/ApplicationResources_zh_CN.properties

lams_admin/src/java/org/lamsfoundation/lams/admin/web/controller/UserController.java

lams_admin/src/java/org/lamsfoundation/lams/admin/web/controller/UserOrgRoleSaveController.java

lams_admin/src/java/org/lamsfoundation/lams/admin/web/controller/UserRolesSaveController.java

lams_admin/web/user.jsp

lams_central/conf/language/lams/ApplicationResources_zh_CN.properties

lams_central/src/java/org/lamsfoundation/lams/web/DisplayGroupController.java

lams_common/src/java/org/lamsfoundation/lams/usermanagement/service/UserManagementService.java

  1. … 58 more files in changeset.
LDEV-5320 Initial commits for audits

These are some initial commits that might change via Marcin's aspect approach.

  1. … 6 more files in changeset.
LDEV-5302 Sysadmin is always appadmin

  1. … 2 more files in changeset.
LDEV-5302 Rename sysadmin role to appadmin

  1. … 181 more files in changeset.
LDEV-3578 Increase auth token life time for long auth delays

LDEV-4901 Rewrite session invalidation mechanism

On WildFly 8 session invalidation mechanism had some bugs. Marek

introduced a workaround in LDEV-3413. The mechanism was adjusted in

LDEV-4293, especially in this commit

https://code.lamsfoundation.org/fisheye/changelog/lams-github?cs=131ce42e64069f574a2a4a9bc1e5c4be4918e5bb

Newer WildFly versions do not seem to have this bug. A part of

workaround was removed in LDEV-4696, but invalidation mechanism stayed

as if the bugs were still present. The mechanism introduced the problem

with timeouts. Now that the bugs seems to be gone, the invalidation

mechanism was rewritten to a more straightforward version which should

have been used from the start.

It is worth keeping in mind that when one user session is present and

another is being created (another browser, integration call, sysadmin's

LoginAs feature), then user gets authenticated, then old session gets

invalidated and the user gets authenticated AGAIN by WildFly using

cached credentials. Caching is so useful that we can not turn it off. It

means that, though, we need to keep login token generated by

LoginRequestServlet for longer than just first authentication, as we get

authentication call twice. Now we keep it until it is timed out.

  1. … 3 more files in changeset.
LDEV-4293 Skip isSysAdmin check when there is no session

The code that checks if user is sysadmin depends on HTTP session being

present in SessionManager. It is normally present as the authentication

request goes through SsoHandler which initiates the session. It is not

the case, though, when session gets replicated and UniversalLoginModule

is accessed directly.

The fix skips the check in no session is present, which means that

sysadmin will need to authenticate same as regular user, which is OK for

this edge situation. Session failover still works.

LDEV-4030 :Disable login for a few minutes after X number of attempts

  1. … 5 more files in changeset.
LDEV-3776: Remove $Id CVS keyword.

  1. … 779 more files in changeset.
LDEV-3776: Clean up and format all LAMS Java code.

  1. … 1856 more files in changeset.
LDEV-3674: Remove multiple Flash elements: Authoring, icons, themes, i18n files, WDDX libraries and classes, methods, servlets etc. Rename/rewrite methods for Flashless use.

  1. … 420 more files in changeset.
LDEV-3578: Use single-use passwords for internal authentication in LoginRequestServlet and LoginAsAction.

  1. … 3 more files in changeset.
LDEV-3578: Convert passwords from sha1 to sha256 with salt after successful authentication and on password change. Remove password hashing in browser. Change internal authentication mechanism for LoginRequestServlet and LoginAsAction.

  1. … 22 more files in changeset.
LDEV-3591: Flatten UniversalLoginModule hierarchy - it was just a single leaf anyway. Format code. Clean up logs, errors and comments. Move queries from config files to code.

    • -307
    • +0
    ./AbstractServerLoginModule.java
    • -204
    • +332
    ./UniversalLoginModule.java
    • -340
    • +0
    ./UsernamePasswordLoginModule.java
  1. … 5 more files in changeset.
LDEV-3383: Remove Web authentication method.

  1. … 3 more files in changeset.
LDEV-3335, LDEV-3340: Make SessionManager a storage for servlet context, so it can be accesses by other classes at any time. Remove obsolete SSO classes.

  1. … 13 more files in changeset.
LDEV-3335, LDEV-3340: Remove or simplify SSO components. Fix sysadmin LoginAs functionality.

  1. … 15 more files in changeset.
LDEV-3335, LDEV-3334: Use SSO mechanism introduced in WildFly 9. Do not create web.xml files with XDoclet as it can not produce them based on 3.1 schema. Use static ones instead. Make SessionManager just a proxy to webserver's HTTP session. Remov custom shared sessions and JSESSIONIDSSO cookie as they are obsolete. Remove own session monitoring as the container should take care of invalidation. Move injecting UserDTO into session to SsoHandler intead of UniversalLoginModule as an authentication request may not reach the latter due to WildFly credentials caching.

    • -308
    • +282
    ./UniversalLoginModule.java
  1. … 226 more files in changeset.
LDEV-3275: Remove duplicate error log.

LDEV-3275: Add SsoConsumer in LAMS Central as requests (index.jsp, index.do) immediate after j_security_check are also being authenticated. They also are considered an authentication attempt, but they bypass shared session creation in SsoProducer and it causes errors. This was addressed by a simple check - no shared session in UniversalLoginModule, no authentication attempt.

  1. … 2 more files in changeset.
LDEV-3315: Clean up roles and paths to secured resources in all modules. Remove AUTHOR ADMIN role.

    • -287
    • +307
    ./UniversalLoginModule.java
  1. … 72 more files in changeset.
LDEV-3275: Introduce SSO using Undertow mechanisms.

Valves do not exist in Undertow. Another approach had to be used.

In each WAR there is a file in META-INF/service dir which adds a class in request processing chaing.

For Central it is SsoProducer which put the authenticated account into shared session.

All other modules use SsoConsumer which takes the account and puts it into its security context.

In standalone.xml caching of credentials was switched off as it would prevent UniversalLoginModule from putting UserDTO into shared session.

TODO: use a simple pass-all authentication mechanism for static files like images and JS files.

    • -308
    • +287
    ./UniversalLoginModule.java
  1. … 12 more files in changeset.
SIF-4 Making single-signon capabilities for openid

    • -282
    • +313
    ./UniversalLoginModule.java
  1. … 31 more files in changeset.
LDEV-2420 Removing uneccessary data structures and tables from the db, as well as implementing the same theme settings for flash themes

  1. … 49 more files in changeset.
LDEV-2420 Adding functionality to add new themes to the database. All that is left now is to remove the defunct tables that are not used

  1. … 21 more files in changeset.
immediately return false if login blank

LDEV-2029 implement initial bind user for ldap

  1. … 10 more files in changeset.
LDEV-2028 ldap authentication now uses a general search filter instead of manually setting tree paths.

  1. … 11 more files in changeset.
use Sun 120 formatting standard

    • -226
    • +239
    ./UniversalLoginModule.java
LDEV-1937 try another method of getting spring bean when NoSuchBeanDefinitionException encountered