Alon Bar-Lev has posted comments on this change.

Change subject: aaa: bll: generate engine session as plain random string
......................................................................


Patch Set 1:

(1 comment)

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

Line 117:         try {
Line 118:             byte s[] = new byte[64];
Line 119:             SecureRandom.getInstance("SHA1PRNG").nextBytes(s);
Line 120:             engineSessionId = new Base64(0).encodeToString(s);
Line 121:         } catch (NoSuchAlgorithmException e) {
> Great, more elegant than what we have at RandomUtils.java,
RandomUtils is much more complex than it should... it will be good to drop this 
legacy.

the above code is simple and uses java to generate random and Base64 to have 
printable string, not sure why there is advantage of moving these 3 lines of 
code to own class.
Line 122:             throw new RuntimeException(e);
Line 123:         }
Line 124:         SessionDataContainer.getInstance().setUser(engineSessionId, 
getCurrentUser());
Line 125:         SessionDataContainer.getInstance().refresh(engineSessionId);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f7e18e782c42990a19033c190b448f223b57634
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to