Alon Bar-Lev has posted comments on this change.

Change subject: aaa: Added usage of AuthRecord.VALID_TO
......................................................................


Patch Set 15:

(5 comments)

http://gerrit.ovirt.org/#/c/26975/15/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java:

Line 217
Line 218
Line 219
Line 220
Line 221
I still do not understand why you keep this? ^^^^^^^^^^^ it will not execute 
the entire valid_to mechanism, please remove.


http://gerrit.ovirt.org/#/c/26975/15/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LoginBaseCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LoginBaseCommand.java:

Line 120:             // backward compatibility with session expiration when 
session was expired after moving
Line 121:             // from new generation to old generation and then got 
expired - this happened after
Line 122:             // 2 * UserSessionTimeoutInterval minutes
Line 123:             
SessionDataContainer.getInstance().setSoftLimit(DateUtils.addMinutes(new Date(),
Line 124:                     2 * Config.<Integer> 
getValue(ConfigValues.UserSessionTimeOutInterval)));
hmmmm.... how is this done for this specific session?

nevermind... I think yo can just call getData with refersh and the soft timeout 
will set for you, no?
Line 125: 
Line 126:             int maxSessionInterval = Config.<Integer> 
getValue(ConfigValues.MaxSessionTimeoutInterval);
Line 127:             Date validTo =
Line 128:                     DateUtils.addMinutes(new Date(), 
maxSessionInterval == 0 ? Integer.MAX_VALUE : maxSessionInterval);


Line 122:             // 2 * UserSessionTimeoutInterval minutes
Line 123:             
SessionDataContainer.getInstance().setSoftLimit(DateUtils.addMinutes(new Date(),
Line 124:                     2 * Config.<Integer> 
getValue(ConfigValues.UserSessionTimeOutInterval)));
Line 125: 
Line 126:             int maxSessionInterval = Config.<Integer> 
getValue(ConfigValues.MaxSessionTimeoutInterval);
again, this is not interval.
Line 127:             Date validTo =
Line 128:                     DateUtils.addMinutes(new Date(), 
maxSessionInterval == 0 ? Integer.MAX_VALUE : maxSessionInterval);
Line 129:             try {
Line 130:                 Date fromExtension =


http://gerrit.ovirt.org/#/c/26975/15/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/session/SessionDataContainer.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/session/SessionDataContainer.java:

Line 25:             this.sessionId = sessionId;
Line 26:         }
Line 27:     }
Line 28: 
Line 29:     private List<SessionInfo> sessionInfoList = new ArrayList<>();
again.... I do not see any reason to hold a list if you have the map.
Line 30: 
Line 31:     private static final String USER_PARAMETER_NAME = "user";
Line 32:     private static final String PASSWORD_PARAMETER_NAME = "password";
Line 33:     private static final String HARD_LIMIT_PARAMETER_NAME = 
"hard_limit";


Line 92:                 synchronized (sessionInfo) {
Line 93:                     Date softLimit = (Date) 
sessionInfo.sessionMap.get(SOFT_LIMIT_PARAMETER_NAME);
Line 94:                     if (softLimit == null) {
Line 95:                         softLimit = now;
Line 96:                     }
how can it be null? and if it is null then it means no soft limit, no?
Line 97:                     softLimit =
Line 98:                             DateUtils.addMinutes(softLimit,
Line 99:                                     2 * Config.<Integer> 
getValue(ConfigValues.UserSessionTimeOutInterval));
Line 100:                     
sessionInfo.sessionMap.put(SOFT_LIMIT_PARAMETER_NAME, softLimit);


-- 
To view, visit http://gerrit.ovirt.org/26975
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I53e4a371c1bae8d2480ddd2af921a560c6fe9a85
Gerrit-PatchSet: 15
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to