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) { > Good, but as we may need to generate random strings in more than one place I was just going to write you... but if you wrote it here... your grep is incorrect... $ git grep RandomUtils | grep -v /test/ backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHandlingCommandBase.java:import org.ovirt.engine.core.utils.RandomUtils; backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHandlingCommandBase.java: return RandomUtils.instance().pickRandom(hosts); backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/ClusterUtils.java:import org.ovirt.engine.core.utils.RandomUtils; backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/ClusterUtils.java: return RandomUtils.instance().pickRandom(servers); I will remove the RandomUtils from source tree, it should be available only for tests. this class should be obsolete. 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
