Updated Branches: refs/heads/camel-2.12.x 0e3ed7f3d -> 2f3a336e4 refs/heads/master 8ad63b860 -> 6d8af2f2b
CAMEL-7079: Favor storing the encrypted shiro token instead of unecrypted. Thanks to Colm for the patch. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6d8af2f2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6d8af2f2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6d8af2f2 Branch: refs/heads/master Commit: 6d8af2f2b79ae84ed8353b4b91cfb6d74740a79f Parents: 8ad63b8 Author: Claus Ibsen <[email protected]> Authored: Fri Dec 20 18:50:05 2013 +0100 Committer: Claus Ibsen <[email protected]> Committed: Fri Dec 20 18:50:05 2013 +0100 ---------------------------------------------------------------------- .../camel/component/shiro/security/ShiroSecurityProcessor.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/6d8af2f2/components/camel-shiro/src/main/java/org/apache/camel/component/shiro/security/ShiroSecurityProcessor.java ---------------------------------------------------------------------- diff --git a/components/camel-shiro/src/main/java/org/apache/camel/component/shiro/security/ShiroSecurityProcessor.java b/components/camel-shiro/src/main/java/org/apache/camel/component/shiro/security/ShiroSecurityProcessor.java index 99226ee..e942912 100644 --- a/components/camel-shiro/src/main/java/org/apache/camel/component/shiro/security/ShiroSecurityProcessor.java +++ b/components/camel-shiro/src/main/java/org/apache/camel/component/shiro/security/ShiroSecurityProcessor.java @@ -97,6 +97,9 @@ public class ShiroSecurityProcessor extends DelegateAsyncProcessor { if (token instanceof ShiroSecurityToken) { ShiroSecurityToken sst = (ShiroSecurityToken) token; encryptedToken = ShiroSecurityHelper.encrypt(sst, policy.getPassPhrase(), policy.getCipherService()); + // Remove unencrypted token + replace with an encrypted token + exchange.getIn().removeHeader(ShiroSecurityConstants.SHIRO_SECURITY_TOKEN); + exchange.getIn().setHeader(ShiroSecurityConstants.SHIRO_SECURITY_TOKEN, encryptedToken); } else if (token instanceof String) { String data = (String) token; if (policy.isBase64()) {
