UniversalLoginModule.java

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
LDEV-5440 Add role logging

LDEV-5440 Add missing dependencies

  1. … 1 more file in changeset.
LDEV-5440 Add compilation parameter for legacy Spring binding

  1. … 14 more files in changeset.
LDEV-5440 Further code upgrade to conform new WF libraries

  1. … 61 more files in changeset.
LDEV-5440 Revert some unnecessary package name changes

  1. … 464 more files in changeset.
LDEV-5440 Refactor packages of imported classes

  1. … 481 more files in changeset.
LDEV-5440 Rewrite config files and library references

  1. … 955 more files in changeset.
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. … 1074 more files in changeset.
LDEV-3776: Clean up and format all LAMS Java code.

    • -309
    • +289
    ./UniversalLoginModule.java
  1. … 2120 more files in changeset.
LDEV-3776: Clean up and format all LAMS Java code.

  1. … 1860 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. … 23 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.

    • -204
    • +332
    ./UniversalLoginModule.java
  1. … 12 more files in changeset.
LDEV-3383: Remove Web authentication method.

  1. … 5 more files in changeset.
LDEV-3383: Remove Web authentication method.

  1. … 5 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. … 15 more files in changeset.
LDEV-3335, LDEV-3340: Remove or simplify SSO components. Fix sysadmin LoginAs functionality.

  1. … 17 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.